Commit c2ec3cb7 by sawit

เพิ่มช่อง Description(CHINA) position

parent 138bdc0e
...@@ -5,6 +5,7 @@ export interface CompanyPositionModel { ...@@ -5,6 +5,7 @@ export interface CompanyPositionModel {
positionId: string positionId: string
thName: string thName: string
engName: string engName: string
chinaName: string
remark: string remark: string
} }
...@@ -12,6 +13,7 @@ export class CompanyPositionModel extends BaseModel implements CompanyPositionMo ...@@ -12,6 +13,7 @@ export class CompanyPositionModel extends BaseModel implements CompanyPositionMo
positionId: string positionId: string
thName: string thName: string
engName: string engName: string
chinaName: string
remark: string remark: string
constructor(data?: Partial<CompanyPositionModel>, translateService?: TranslateService) { constructor(data?: Partial<CompanyPositionModel>, translateService?: TranslateService) {
...@@ -20,6 +22,7 @@ export class CompanyPositionModel extends BaseModel implements CompanyPositionMo ...@@ -20,6 +22,7 @@ export class CompanyPositionModel extends BaseModel implements CompanyPositionMo
this.positionId = data?.positionId! this.positionId = data?.positionId!
this.thName = data?.thName! this.thName = data?.thName!
this.engName = data?.engName! this.engName = data?.engName!
this.chinaName = data?.chinaName!
this.remark = data?.remark! this.remark = data?.remark!
} }
} }
\ No newline at end of file
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<th scope="col" class="text-start">{{ 'PositionId' | translate}}</th> <th scope="col" class="text-start">{{ 'PositionId' | 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">{{ 'Remark' | 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>
</tr> </tr>
</thead> </thead>
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
<td> <td>
<div> <div>
<span class="block mb-1"> <span class="block mb-1">
{{item.remark}} {{item.chinaName}}
</span> </span>
</div> </div>
</td> </td>
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
<div class="ti-modal-content"> <div class="ti-modal-content">
<div class="ti-modal-header"> <div class="ti-modal-header">
<h6 class="modal-title text-[1rem] font-semibold text-defaulttextcolor" id="mail-ComposeLabel"> <h6 class="modal-title text-[1rem] font-semibold text-defaulttextcolor" id="mail-ComposeLabel">
{{ (modalStatus == 'add' ? ('Create' | translate) : ('Edit' | translate)) + ' ' + ('Position Information' | translate) }} {{ (action == 'add' ? ('Create' | translate) : ('Edit' | translate)) + ' ' + ('Position Information' | translate) }}
</h6> </h6>
<button type="button" class="hs-dropdown-toggle !text-[1rem] !font-semibold !text-defaulttextcolor" <button type="button" class="hs-dropdown-toggle !text-[1rem] !font-semibold !text-defaulttextcolor"
...@@ -165,32 +165,39 @@ ...@@ -165,32 +165,39 @@
<div class="grid grid-cols-12 gap-4"> <div class="grid grid-cols-12 gap-4">
<div class="xl:col-span-12 col-span-12"> <div class="xl:col-span-12 col-span-12">
<label for="deal-title" class="form-label">{{'PositionId' | translate}}</label> <label for="positionId" class="form-label">{{'PositionId' | translate}}</label>
<input type="text" class="form-control" [ngClass]="{ '!bg-input-readonly': action === 'edit' }" <input type="text" class="form-control" id="positionId" placeholder="" [(ngModel)]="selectModel.positionId"
id="deal-title" placeholder="" [(ngModel)]="selectModel.positionId" [readonly]="action === 'edit'"> [ngClass]="{ '!bg-input-readonly': action === 'edit' }" [readonly]="action === 'edit'">
<div class="text-danger" *ngIf="!selectModel.positionId"> <div class="text-danger" *ngIf="!selectModel.positionId">
{{'Please fill in information' | translate}} {{'Please fill in information' | translate}}
</div> </div>
</div> </div>
<div class="xl:col-span-12 col-span-12" *ngIf="modalStatus=='add'"> <div class="xl:col-span-12 col-span-12">
<label for="deal-title" class="form-label">{{ 'Description(TH)' | translate}}</label> <label for="thName" class="form-label">{{ 'Description(TH)' | translate}}</label>
<input type="text" class="form-control" id="deal-title" placeholder="" <input type="text" class="form-control" id="thName" placeholder=""
[(ngModel)]="selectModel.thName"> [(ngModel)]="selectModel.thName">
<div class="text-danger" *ngIf="!selectModel.thName"> <div class="text-danger" *ngIf="!selectModel.thName">
{{'Please fill in information' | translate}} {{'Please fill in information' | translate}}
</div> </div>
</div> </div>
<div class="xl:col-span-12 col-span-12" *ngIf="modalStatus=='add'"> <div class="xl:col-span-12 col-span-12">
<label for="deal-title" class="form-label">{{ 'Description(ENG)' | translate}}</label> <label for="engName" class="form-label">{{ 'Description(ENG)' | translate}}</label>
<input type="text" class="form-control" id="deal-title" placeholder="" [(ngModel)]="selectModel.engName"> <input type="text" class="form-control" id="engName" placeholder="" [(ngModel)]="selectModel.engName">
<div class="text-danger" *ngIf="!selectModel.engName"> <div class="text-danger" *ngIf="!selectModel.engName">
{{'Please fill in information' | translate}} {{'Please fill in information' | translate}}
</div> </div>
</div> </div>
<div class="xl:col-span-12 col-span-12">
<label for="chinaName" class="form-label">{{ 'Description(CHINA)' | translate}}</label>
<input type="text" class="form-control" id="chinaName" placeholder="" [(ngModel)]="selectModel.chinaName">
<div class="text-danger" *ngIf="!selectModel.chinaName">
{{'Please fill in information' | translate}}
</div>
</div>
<div class="xl:col-span-12 col-span-12" *ngIf="modalStatus=='add'"> <div class="xl:col-span-12 col-span-12" *ngIf="modalStatus=='add'">
<label for="deal-title" class="form-label">{{ 'Remark' | translate}}</label> <label for="remark" class="form-label">{{ 'Remark' | translate}}</label>
<input type="text" class="form-control" id="deal-title" placeholder="" <input type="text" class="form-control" id="remark" placeholder=""
[(ngModel)]="selectModel.remark"> [(ngModel)]="selectModel.remark">
<!-- <div class="text-danger" *ngIf="!selectModel.remark"> <!-- <div class="text-danger" *ngIf="!selectModel.remark">
{{'Please fill in information' | translate}} {{'Please fill in information' | translate}}
...@@ -205,8 +212,8 @@ ...@@ -205,8 +212,8 @@
{{'Cancel' | translate}} {{'Cancel' | translate}}
</button> </button>
<button type="button" (click)="save()" class="ti-btn bg-primary text-white !font-medium" <button type="button" (click)="save()" class="ti-btn bg-primary text-white !font-medium"
[class.ti-btn-disabled]="!selectModel.positionId||!selectModel.thName||!selectModel.engName" [class.ti-btn-disabled]="!selectModel.positionId||!selectModel.thName||!selectModel.engName||!selectModel.chinaName"
[disabled]="!selectModel.positionId||!selectModel.thName||!selectModel.engName">{{'Save' | translate}}</button> [disabled]="!selectModel.positionId||!selectModel.thName||!selectModel.engName||!selectModel.chinaName">{{'Save' | translate}}</button>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -130,6 +130,7 @@ export class CompanyPositionComponent { ...@@ -130,6 +130,7 @@ export class CompanyPositionComponent {
x.positionId?.toLowerCase().indexOf(v.toLowerCase()) !== -1 || x.positionId?.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?.toLocaleLowerCase().indexOf(v.toLocaleLowerCase()) !== -1 ||
x.remark?.toLowerCase().indexOf(v.toLowerCase()) !== -1 x.remark?.toLowerCase().indexOf(v.toLowerCase()) !== -1
// x.getStatus().toLowerCase().indexOf(v.toLowerCase()) !== -1 // x.getStatus().toLowerCase().indexOf(v.toLowerCase()) !== -1
); );
...@@ -164,6 +165,7 @@ export class CompanyPositionComponent { ...@@ -164,6 +165,7 @@ export class CompanyPositionComponent {
this.selectModel.positionId = ""; this.selectModel.positionId = "";
this.selectModel.thName = ""; this.selectModel.thName = "";
this.selectModel.engName = ""; this.selectModel.engName = "";
this.selectModel.chinaName ="";
this.selectModel.remark = ""; this.selectModel.remark = "";
} }
......
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