Commit 6706f14f by sawit

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

parent 79ce6e7b
......@@ -5,17 +5,20 @@ export interface CategoryModel {
categoryId: string
thName: string
engName: string
chinaName: string
}
export class CategoryModel extends BaseModel implements CategoryModel {
categoryId: string
thName: string
engName: string
chinaName: string
constructor(data?: Partial<CategoryModel>, translateService?: TranslateService) {
super(data, translateService)
this.categoryId = checkData(data?.categoryId)
this.thName = checkData(data?.thName)
this.engName = checkData(data?.engName)
this.chinaName = checkData(data?.chinaName)
}
getName() {
return baseGetName(this.thName, this.engName, this.translateService?.currentLang)
......
......@@ -37,6 +37,7 @@
<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(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"></th>
</tr>
......@@ -65,6 +66,11 @@
<span>{{item.engName}}</span>
</div>
</td>
<td>
<div>
<span>{{item.chinaName}}</span>
</div>
</td>
<td>
<div class="flex flex-row items-center !gap-2 ">
......@@ -182,6 +188,13 @@
{{'Please fill in information' | translate}}
</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 class="ti-modal-footer">
......@@ -189,8 +202,8 @@
data-hs-overlay="#modal-detail">
{{'Cancel' | translate}}
</button>
<button type="button" (click)="save()" [class.ti-btn-disabled]="!category.categoryId||!category.thName||!category.engName"
[disabled]="!category.categoryId||!category.thName||!category.engName" class="ti-btn bg-primary text-white !font-medium">{{'Save' |
<button type="button" (click)="save()" [class.ti-btn-disabled]="!category.categoryId||!category.thName||!category.engName||!category.chinaName"
[disabled]="!category.categoryId||!category.thName||!category.engName||!category.chinaName" class="ti-btn bg-primary text-white !font-medium">{{'Save' |
translate}}</button>
</div>
</div>
......
......@@ -76,7 +76,8 @@ export class CategoryCompanyComponent implements OnInit {
(x) =>
x.categoryId?.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