Commit ea4b8730 by DESKTOP-E3GSHH7\myhr

เพิ่ม disable

parent 618a3b5f
...@@ -45,10 +45,9 @@ ...@@ -45,10 +45,9 @@
</th> </th>
<th scope="col" class="text-start">บริษัท</th> <th scope="col" class="text-start">บริษัท</th>
<th scope="col" class="text-start">ชื่อเจ้าของ</th> <th scope="col" class="text-start">ชื่อเจ้าของ</th>
<th scope="col" class="text-start">ข้อมูลบริษัท</th>
<th scope="col" class="text-start">{{"Status" | translate}}</th> <th scope="col" class="text-start">{{"Status" | translate}}</th>
<!-- <th scope="col" class="text-start">{{"Update Date" | translate}}</th> --> <!-- <th scope="col" class="text-start">{{"Update Date" | 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>
</thead> </thead>
...@@ -82,17 +81,6 @@ ...@@ -82,17 +81,6 @@
</div> </div>
</td> </td>
<td> <td>
<div>
<span class="block mb-1 whitespace-pre-wrap">
<i
class="ri-home-line me-2 align-middle text-[.875rem] text-[#8c9097] dark:text-white/50 inline-flex"></i>
<app-rendered-html class="small-html" [htmlContent]="item.companyDetail"></app-rendered-html>
<!-- {{item.companyDetail}} -->
</span>
</div>
</td>
<td>
<span class="badge bg-{{ item.status == 1 ? 'primary' : 'danger'}} text-white"> <span class="badge bg-{{ item.status == 1 ? 'primary' : 'danger'}} text-white">
{{item.getStatus()}} {{item.getStatus()}}
</span> </span>
...@@ -197,8 +185,8 @@ ...@@ -197,8 +185,8 @@
<span class="avatar avatar-xxl avatar-rounded"> <span class="avatar avatar-xxl avatar-rounded">
<img [src]="selectModel.getPicture()" alt="" id="profile-img"> <img [src]="selectModel.getPicture()" alt="" id="profile-img">
<span class="badge rounded-full bg-primary avatar-badge"> <span class="badge rounded-full bg-primary avatar-badge">
<input (click)="triggerFileInput()" ng2FileSelect [uploader]="uploaderProfile" type="file" name="photo" <input (click)="triggerFileInput()" ng2FileSelect [uploader]="uploaderProfile" type="file"
class="absolute w-full h-full opacity-[0]" id="profile-change"> name="photo" class="absolute w-full h-full opacity-[0]" id="profile-change" [disabled]="action === 'edit'">
<i class="fe fe-camera text-[.625rem]"></i> <i class="fe fe-camera text-[.625rem]"></i>
</span> </span>
</span> </span>
...@@ -207,14 +195,16 @@ ...@@ -207,14 +195,16 @@
<div class="xl:col-span-6 col-span-12"> <div class="xl:col-span-6 col-span-12">
<label for="thName" class="form-label">{{'ชื่อบริษัท ไทย' | translate}}</label> <label for="thName" class="form-label">{{'ชื่อบริษัท ไทย' | translate}}</label>
<input type="text" class="form-control" id="thName" placeholder="" [(ngModel)]="selectModel.thName"> <input type="text" class="form-control" id="thName" placeholder="" [(ngModel)]="selectModel.thName"
[disabled]="action === 'edit'">
<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-6 col-span-12"> <div class="xl:col-span-6 col-span-12">
<label for="thName" class="form-label">{{'ชื่อบริษัท อังกฤษ' | translate}}</label> <label for="thName" class="form-label">{{'ชื่อบริษัท อังกฤษ' | translate}}</label>
<input type="text" class="form-control" id="thName" placeholder="" [(ngModel)]="selectModel.engName"> <input type="text" class="form-control" id="thName" placeholder="" [(ngModel)]="selectModel.engName"
[disabled]="action === 'edit'">
<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>
...@@ -223,7 +213,8 @@ ...@@ -223,7 +213,8 @@
<div class="xl:col-span-12 col-span-12"> <div class="xl:col-span-12 col-span-12">
<label for="companyId" class="form-label">{{'รหัสบริษัท' | translate}}</label> <label for="companyId" class="form-label">{{'รหัสบริษัท' | translate}}</label>
<input type="text" class="form-control" id="companyId" placeholder="" [(ngModel)]="selectModel.companyId" <input type="text" class="form-control" id="companyId" placeholder="" [(ngModel)]="selectModel.companyId"
[readonly]="action === 'edit'" [ngClass]="{ '!bg-input-readonly': action === 'edit' }"> [disabled]="action === 'edit'" [readonly]="action === 'edit'"
[ngClass]="{ '!bg-input-readonly': action === 'edit' }">
<div class="text-danger" *ngIf="!selectModel.companyId && action === 'add'"> <div class="text-danger" *ngIf="!selectModel.companyId && action === 'add'">
{{'Please fill in information' | translate}} {{'Please fill in information' | translate}}
</div> </div>
...@@ -231,33 +222,40 @@ ...@@ -231,33 +222,40 @@
<div class="xl:col-span-12 col-span-12"> <div class="xl:col-span-12 col-span-12">
<label for="companyDetail" class="form-label">{{'ข้อมูลบริษัท' | translate}}</label> <label for="companyDetail" class="form-label">{{'ข้อมูลบริษัท' | translate}}</label>
<input type="text" class="form-control" id="companyDetail" placeholder="" <textarea class="form-control" id="companyDetail" placeholder="" [(ngModel)]="selectModel.companyDetail"
[(ngModel)]="selectModel.companyDetail"> *ngIf="action === 'add'">
</textarea>
<app-rendered-html class="small-html" [htmlContent]="selectModel.companyDetail" *ngIf="action === 'edit'">
</app-rendered-html>
<div class="text-danger" *ngIf="!selectModel.companyDetail"> <div class="text-danger" *ngIf="!selectModel.companyDetail">
{{'Please fill in information' | translate}} {{'Please fill in information' | translate}}
</div> </div>
</div> </div>
<div class="xl:col-span-12 col-span-12"> <div class="xl:col-span-12 col-span-12">
<label for="locationDetail" class="form-label">{{'ที่อยู่' | translate}}</label> <label for="locationDetail" class="form-label">{{'ที่อยู่' | translate}}</label>
<textarea class="form-control" id="locationDetail" placeholder="" <textarea class="form-control" id="locationDetail" placeholder="" [(ngModel)]="selectModel.locationDetail"
[(ngModel)]="selectModel.locationDetail"></textarea> *ngIf="action === 'add'">
</textarea>
<app-rendered-html class="small-html" [htmlContent]="selectModel.locationDetail" *ngIf="action === 'edit'">
</app-rendered-html>
</div> </div>
<div class="xl:col-span-6 col-span-12"> <div class="xl:col-span-6 col-span-12">
<label for="thFirstnameContact" class="form-label">{{'ชื่อเจ้าของ' | translate}}</label> <label for="thFirstnameContact" class="form-label">{{'ชื่อเจ้าของ' | translate}}</label>
<input type="text" class="form-control" id="thFirstnameContact" placeholder="" <input type="text" class="form-control" id="thFirstnameContact" placeholder=""
[(ngModel)]="selectModel.thFirstnameContact"> [disabled]="action === 'edit'" [(ngModel)]="selectModel.thFirstnameContact">
</div> </div>
<div class="xl:col-span-6 col-span-12"> <div class="xl:col-span-6 col-span-12">
<label for="thLastnameContact" class="form-label">{{'นามสกุลเจ้าของ' | translate}}</label> <label for="thLastnameContact" class="form-label">{{'นามสกุลเจ้าของ' | translate}}</label>
<input type="text" class="form-control" id="thLastnameContact" placeholder="" <input type="text" class="form-control" id="thLastnameContact" placeholder="" [disabled]="action === 'edit'"
[(ngModel)]="selectModel.thLastnameContact"> [(ngModel)]="selectModel.thLastnameContact">
</div> </div>
<div class="xl:col-span-12 col-span-12"> <div class="xl:col-span-12 col-span-12">
<label for="phoneContact" class="form-label">{{'เบอร์ติดต่อ' | translate}}</label> <label for="phoneContact" class="form-label">{{'เบอร์ติดต่อ' | translate}}</label>
<input type="text" class="form-control" id="phoneContact" placeholder="" <input type="text" class="form-control" id="phoneContact" placeholder="" [disabled]="action === 'edit'"
[(ngModel)]="selectModel.phoneContact"> [(ngModel)]="selectModel.phoneContact">
</div> </div>
...@@ -423,7 +421,7 @@ ...@@ -423,7 +421,7 @@
<div class="ms-auto"> <div class="ms-auto">
<nav aria-label="Page navigation"> <nav aria-label="Page navigation">
<ul class="ti-pagination mb-0"> <ul class="ti-pagination mb-0">
<li *ngIf="pageIndex>0" class="page-item {{pageIndex==0 ? 'disabled' : ''}}"><a <li *ngIf="pageIndex>0" class="page-item {{pageIndex==0 ? '[disabled]="action === 'edit'"' : ''}}"><a
class="page-link px-3 py-[0.375rem]" class="page-link px-3 py-[0.375rem]"
(click)="pageIndex = pageIndex-1;updatePagedItems()">{{'Previous' | translate}}</a></li> (click)="pageIndex = pageIndex-1;updatePagedItems()">{{'Previous' | translate}}</a></li>
<li class="page-item"><a class="page-link px-3 py-[0.375rem]" href="javascript:void(0);" <li class="page-item"><a class="page-link px-3 py-[0.375rem]" href="javascript:void(0);"
......
...@@ -204,7 +204,7 @@ ...@@ -204,7 +204,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)) + ' ' + ('User' | translate) }} {{ (modalStatus == 'add' ? ('Create' | translate) : ('Edit' | translate)) + ' ' + ('User 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"
...@@ -221,7 +221,7 @@ ...@@ -221,7 +221,7 @@
<span class="avatar avatar-xxl avatar-rounded"> <span class="avatar avatar-xxl avatar-rounded">
<img [src]="selectModel.getPicture()" alt="" id="profile-img"> <img [src]="selectModel.getPicture()" alt="" id="profile-img">
<span class="badge rounded-full bg-primary avatar-badge"> <span class="badge rounded-full bg-primary avatar-badge">
<input (click)="triggerFileInput()" ng2FileSelect [uploader]="uploaderProfile" type="file" name="photo" <input (click)="triggerFileInput()" ng2FileSelect [uploader]="uploaderProfile" type="file" name="photo" [disabled]="action === 'edit'"
class="absolute w-full h-full opacity-[0]" id="profile-change"> class="absolute w-full h-full opacity-[0]" id="profile-change">
<i class="fe fe-camera text-[.625rem]"></i> <i class="fe fe-camera text-[.625rem]"></i>
</span> </span>
...@@ -291,7 +291,7 @@ ...@@ -291,7 +291,7 @@
</div> </div>
<div class="xl:col-span-6 col-span-12" *ngIf="modalStatus=='edit'"> <div class="xl:col-span-6 col-span-12" *ngIf="modalStatus=='edit'">
<label for="deal-title" class="form-label">{{'ชื่อ-นามสกุล(ไทย)' | translate}}</label> <label for="deal-title" class="form-label">{{'ชื่อ-นามสกุล(ไทย)' | translate}}</label>
<input type="text" class="form-control" id="deal-title" placeholder="" [(ngModel)]="selectModel.thFullName"> <input type="text" class="form-control" id="deal-title" placeholder="" [(ngModel)]="selectModel.thFullName" [disabled]="action === 'edit'">
<div class="text-danger" *ngIf="!selectModel.thFullName"> <div class="text-danger" *ngIf="!selectModel.thFullName">
{{'Please fill in information' | translate}} {{'Please fill in information' | translate}}
</div> </div>
...@@ -299,7 +299,7 @@ ...@@ -299,7 +299,7 @@
<div class="xl:col-span-6 col-span-12" *ngIf="modalStatus=='edit'"> <div class="xl:col-span-6 col-span-12" *ngIf="modalStatus=='edit'">
<label for="deal-title" class="form-label">{{'ชื่อ-นามสกุล(อังกฤษ)' | translate}}</label> <label for="deal-title" class="form-label">{{'ชื่อ-นามสกุล(อังกฤษ)' | translate}}</label>
<input type="text" class="form-control" id="deal-title" placeholder="" <input type="text" class="form-control" id="deal-title" placeholder="" [disabled]="action === 'edit'"
[(ngModel)]="selectModel.engFullName"> [(ngModel)]="selectModel.engFullName">
<div class="text-danger" *ngIf="!selectModel.engFullName"> <div class="text-danger" *ngIf="!selectModel.engFullName">
{{'Please fill in information' | translate}} {{'Please fill in information' | translate}}
...@@ -308,7 +308,7 @@ ...@@ -308,7 +308,7 @@
<div class="xl:col-span-6 col-span-12"> <div class="xl:col-span-6 col-span-12">
<label for="deal-title" class="form-label">{{'อีเมล' | translate}}</label> <label for="deal-title" class="form-label">{{'อีเมล' | translate}}</label>
<input type="text" class="form-control" id="deal-title" placeholder="" [(ngModel)]="selectModel.email"> <input type="text" class="form-control" id="deal-title" placeholder="" [(ngModel)]="selectModel.email" [disabled]="action === 'edit'">
<div class="text-danger" *ngIf="!selectModel.email"> <div class="text-danger" *ngIf="!selectModel.email">
{{'Please fill in information' | translate}} {{'Please fill in information' | translate}}
</div> </div>
...@@ -317,7 +317,7 @@ ...@@ -317,7 +317,7 @@
<div class="xl:col-span-6 col-span-12"> <div class="xl:col-span-6 col-span-12">
<label for="deal-title" class="form-label">{{'เบอร์ติดต่อ' | translate}}</label> <label for="deal-title" class="form-label">{{'เบอร์ติดต่อ' | translate}}</label>
<input type="text" class="form-control" id="deal-title" placeholder="" <input type="text" class="form-control" id="deal-title" placeholder="" [disabled]="action === 'edit'"
[(ngModel)]="selectModel.phoneNumberProfile"> [(ngModel)]="selectModel.phoneNumberProfile">
<div class="text-danger" *ngIf="!selectModel.phoneNumberProfile"> <div class="text-danger" *ngIf="!selectModel.phoneNumberProfile">
{{'Please fill in information' | translate}} {{'Please fill in information' | translate}}
......
...@@ -75,5 +75,7 @@ ...@@ -75,5 +75,7 @@
"Time": "Time", "Time": "Time",
"Fail": "Fail", "Fail": "Fail",
"Mobile": "Mobile", "Mobile": "Mobile",
"Candidate ID": "Candidate ID" "Candidate ID": "Candidate ID",
"User Information":"User Information",
"Company":"Company"
} }
...@@ -75,5 +75,7 @@ ...@@ -75,5 +75,7 @@
"Success" : "สำเร็จ", "Success" : "สำเร็จ",
"Fail" : "ผิดพลาด", "Fail" : "ผิดพลาด",
"Mobile" : "เบอร์ติดต่อ", "Mobile" : "เบอร์ติดต่อ",
"Candidate ID": "รหัสสมาชิก" "Candidate ID": "รหัสสมาชิก",
"User Information":"ข้อมูลผู้ใช้งาน",
"Company":"บริษัท"
} }
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