Commit 6706f14f by sawit

เพิ่มช่อง Description(CHINA) company-category

parent 79ce6e7b
...@@ -5,17 +5,20 @@ export interface CategoryModel { ...@@ -5,17 +5,20 @@ export interface CategoryModel {
categoryId: string categoryId: string
thName: string thName: string
engName: string engName: string
chinaName: string
} }
export class CategoryModel extends BaseModel implements CategoryModel { export class CategoryModel extends BaseModel implements CategoryModel {
categoryId: string categoryId: string
thName: string thName: string
engName: string engName: string
chinaName: string
constructor(data?: Partial<CategoryModel>, translateService?: TranslateService) { constructor(data?: Partial<CategoryModel>, translateService?: TranslateService) {
super(data, translateService) super(data, translateService)
this.categoryId = checkData(data?.categoryId) this.categoryId = checkData(data?.categoryId)
this.thName = checkData(data?.thName) this.thName = checkData(data?.thName)
this.engName = checkData(data?.engName) this.engName = checkData(data?.engName)
this.chinaName = checkData(data?.chinaName)
} }
getName() { getName() {
return baseGetName(this.thName, this.engName, this.translateService?.currentLang) return baseGetName(this.thName, this.engName, this.translateService?.currentLang)
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
<th scope="col" class="text-start">{{ 'Category ID' | translate}}</th> <th scope="col" class="text-start">{{ 'Category ID' | translate}}</th>
<th scope="col" class="text-start">{{ 'Description(TH)' | translate}}</th> <th scope="col" class="text-start">{{ 'Description(TH)' | translate}}</th>
<th scope="col" class="text-start">{{ 'Description(ENG)' | translate}}</th> <th scope="col" class="text-start">{{ 'Description(ENG)' | translate}}</th>
<th scope="col" class="text-start">{{ 'Description(CHINA)' | translate}}</th>
<th scope="col" class="text-start">{{ 'Action' | translate}}</th> <th scope="col" class="text-start">{{ 'Action' | translate}}</th>
<th scope="col" class="text-start"></th> <th scope="col" class="text-start"></th>
</tr> </tr>
...@@ -65,6 +66,11 @@ ...@@ -65,6 +66,11 @@
<span>{{item.engName}}</span> <span>{{item.engName}}</span>
</div> </div>
</td> </td>
<td>
<div>
<span>{{item.chinaName}}</span>
</div>
</td>
<td> <td>
<div class="flex flex-row items-center !gap-2 "> <div class="flex flex-row items-center !gap-2 ">
...@@ -182,6 +188,13 @@ ...@@ -182,6 +188,13 @@
{{'Please fill in information' | translate}} {{'Please fill in information' | translate}}
</div> </div>
</div> </div>
<div class="xl:col-span-6 col-span-12">
<label for="deal-title" class="form-label">{{'Description(CHINA)' | translate}}</label>
<input type="text" class="form-control" id="deal-title" placeholder="" [(ngModel)]="category.chinaName">
<div class="text-danger" *ngIf="!category.chinaName">
{{'Please fill in information' | translate}}
</div>
</div>
</div> </div>
</div> </div>
<div class="ti-modal-footer"> <div class="ti-modal-footer">
...@@ -189,8 +202,8 @@ ...@@ -189,8 +202,8 @@
data-hs-overlay="#modal-detail"> data-hs-overlay="#modal-detail">
{{'Cancel' | translate}} {{'Cancel' | translate}}
</button> </button>
<button type="button" (click)="save()" [class.ti-btn-disabled]="!category.categoryId||!category.thName||!category.engName" <button type="button" (click)="save()" [class.ti-btn-disabled]="!category.categoryId||!category.thName||!category.engName||!category.chinaName"
[disabled]="!category.categoryId||!category.thName||!category.engName" class="ti-btn bg-primary text-white !font-medium">{{'Save' | [disabled]="!category.categoryId||!category.thName||!category.engName||!category.chinaName" class="ti-btn bg-primary text-white !font-medium">{{'Save' |
translate}}</button> translate}}</button>
</div> </div>
</div> </div>
......
...@@ -76,7 +76,8 @@ export class CategoryCompanyComponent implements OnInit { ...@@ -76,7 +76,8 @@ export class CategoryCompanyComponent implements OnInit {
(x) => (x) =>
x.categoryId?.toLowerCase().indexOf(v.toLowerCase()) !== -1 || x.categoryId?.toLowerCase().indexOf(v.toLowerCase()) !== -1 ||
x.thName?.toLowerCase().indexOf(v.toLowerCase()) !== -1 || x.thName?.toLowerCase().indexOf(v.toLowerCase()) !== -1 ||
x.engName?.toLowerCase().indexOf(v.toLowerCase()) !== -1 x.engName?.toLowerCase().indexOf(v.toLowerCase()) !== -1 ||
x.chinaName?.toLowerCase().indexOf(v.toLowerCase()) !== -1
); );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment