Commit acddd10d by sawit

เพิ่มช่อง Description(CHINA) career-cluster

parent 1f2dbdb6
......@@ -5,6 +5,7 @@ export interface CareerClusterModel {
careerClusterId: string
thName: string
engName: string
chinaName: string
remark: string
}
......@@ -12,12 +13,14 @@ export class CareerClusterModel extends BaseModel implements CareerClusterModel
careerClusterId: string
thName: string
engName: string
chinaName: string
remark: string;
constructor(data?: Partial<CareerClusterModel>, translateService?: TranslateService) {
super(data, translateService)
this.careerClusterId = checkData(data?.careerClusterId)
this.thName = checkData(data?.thName)
this.engName = checkData(data?.engName)
this.chinaName = checkData(data?.chinaName)
this.remark = checkData(data?.remark)
}
getName() {
......
......@@ -35,6 +35,7 @@
<th scope="col" class="text-start">{{ 'Career Cluster 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">{{ 'Remark' | translate}}</th>
<th scope="col" class="text-start">{{ 'Action' | translate}}</th>
</tr>
......@@ -69,6 +70,13 @@
<td>
<div>
<span class="block mb-1">
{{item.chinaName}}
</span>
</div>
</td>
<td>
<div>
<span class="block mb-1">
{{item.remark}}
</span>
</div>
......@@ -152,7 +160,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)) + ' ' + ('Career Cluster Information' | translate) }}
{{ (action == 'add' ? ('Create' | translate) : ('Edit' | translate)) + ' ' + ('Career Cluster Information' | translate) }}
</h6>
<button type="button" class="hs-dropdown-toggle !text-[1rem] !font-semibold !text-defaulttextcolor"
......@@ -164,16 +172,16 @@
<div class="ti-modal-body px-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" *ngIf="action == 'edit'">
<label for="deal-title" class="form-label">{{'Career Cluster ID' | translate}}</label>
<input type="text" class="form-control" [ngClass]="{ '!bg-input-readonly': action === 'edit' }"
id="deal-title" placeholder="" [(ngModel)]="selectModel.careerClusterId" [readonly]="action === 'edit'">
<div class="text-danger" *ngIf="!selectModel.careerClusterId">
<input type="text" class="form-control !bg-input-readonly" id="deal-title" placeholder=""
[(ngModel)]="selectModel.careerClusterId" [disabled]="action === 'edit'">
<!-- <div class="text-danger" *ngIf="!selectModel.careerClusterId">
{{'Please fill in information' | translate}}
</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>
<input type="text" class="form-control" id="deal-title" placeholder=""
[(ngModel)]="selectModel.thName">
......@@ -181,14 +189,21 @@
{{'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">
<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="text-danger" *ngIf="!selectModel.engName">
{{'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">
<label for="deal-title" class="form-label">{{ 'Description(CHINA)' | translate}}</label>
<input type="text" class="form-control" id="deal-title" 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">
<label for="deal-title" class="form-label">{{ 'Remark' | translate}}</label>
<input type="text" class="form-control" id="deal-title" placeholder=""
[(ngModel)]="selectModel.remark">
......@@ -205,8 +220,8 @@
{{'Cancel' | translate}}
</button>
<button type="button" (click)="save()" class="ti-btn bg-primary text-white !font-medium"
[class.ti-btn-disabled]="!selectModel.careerClusterId||!selectModel.thName||!selectModel.engName"
[disabled]="!selectModel.careerClusterId||!selectModel.thName||!selectModel.engName">{{'Save' | translate}}</button>
[class.ti-btn-disabled]="!selectModel.thName||!selectModel.engName||!selectModel.chinaName"
[disabled]="!selectModel.thName||!selectModel.engName||!selectModel.chinaName">{{'Save' | translate}}</button>
</div>
</div>
</div>
......
......@@ -130,6 +130,7 @@ export class CareerClusterComponent {
x.careerClusterId?.toLowerCase().indexOf(v.toLowerCase()) !== -1 ||
x.thName?.toLowerCase().indexOf(v.toLowerCase()) !== -1 ||
x.engName?.toLowerCase().indexOf(v.toLowerCase()) !== -1 ||
x.chinaName?.toLowerCase().indexOf(v.toLowerCase()) !== -1 ||
x.remark?.toLowerCase().indexOf(v.toLowerCase()) !== -1
// x.getStatus().toLowerCase().indexOf(v.toLowerCase()) !== -1
);
......@@ -164,6 +165,7 @@ export class CareerClusterComponent {
this.selectModel.careerClusterId = "";
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