Commit c2ec3cb7 by sawit

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

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