Commit 66a640a4 by sawit

เพิ่มช่อง Description(CHINA) country-registration

parent acddd10d
...@@ -5,16 +5,19 @@ export interface CountryModel { ...@@ -5,16 +5,19 @@ export interface CountryModel {
countryId: string countryId: string
thName: string thName: string
engName: string engName: string
chinaName: string
} }
export class CountryModel extends BaseModel implements CountryModel { export class CountryModel extends BaseModel implements CountryModel {
countryId: string countryId: string
thName: string thName: string
engName: string engName: string
chinaName: string
constructor(data?: Partial<CountryModel>, translateService?: TranslateService) { constructor(data?: Partial<CountryModel>, translateService?: TranslateService) {
super(data, translateService) super(data, translateService)
this.countryId = checkData(data?.countryId) this.countryId = checkData(data?.countryId)
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() {
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</div> </div>
<div class="flex flex-wrap gap-2"> <div class="flex flex-wrap gap-2">
<a href="javascript:void(0);" class="hs-dropdown-toggle ti-btn ti-btn-primary-full me-2" (click)="new()" <a href="javascript:void(0);" class="hs-dropdown-toggle ti-btn ti-btn-primary-full me-2" (click)="new()"
data-hs-overlay="#modal-detail"><i class="ri-add-line font-semibold align-middle"></i>{{ 'Add' | data-hs-overlay="#modal-detail"><i class="ri-add-line font-semibold align-middle"></i>{{ 'Create' |
translate}} translate}}
</a> </a>
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
<th scope="col" class="text-start">{{ 'Country ID' | translate}}</th> <th scope="col" class="text-start">{{ 'Country 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(ENG)' | translate}}</label>
<input type="text" class="form-control" id="deal-title" placeholder="" [(ngModel)]="country.chinaName">
<div class="text-danger" *ngIf="!country.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]="!country.countryId||!country.thName||!country.engName" <button type="button" (click)="save()" [class.ti-btn-disabled]="!country.countryId||!country.thName||!country.engName||!country.chinaName"
[disabled]="!country.countryId||!country.thName||!country.engName" class="ti-btn bg-primary text-white !font-medium">{{'Save' | [disabled]="!country.countryId||!country.thName||!country.engName||!country.chinaName" class="ti-btn bg-primary text-white !font-medium">{{'Save' |
translate}}</button> translate}}</button>
</div> </div>
</div> </div>
......
...@@ -79,7 +79,8 @@ export class CountryRegistrationComponent { ...@@ -79,7 +79,8 @@ export class CountryRegistrationComponent {
(x) => (x) =>
x.countryId?.toLowerCase().indexOf(v.toLowerCase()) !== -1 || x.countryId?.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