Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
.fileuploadcontainer label {
color: #FF4081;
width: 148px;
height: 44px;
height: 52px;
border-radius: 5px;
background: #FFFFFF;
padding: 10px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ <h3>{{labelanddatas.title |translate}}</h3>
{{data.label | translate }}
</mat-option>
</mat-select>
<mat-error *ngIf="uploadForm.controls.operation.touched">
{{"genericerror.fieldValidation" | translate}}
<mat-error *ngIf="uploadForm.controls.operation.touched && uploadForm.controls.operation.hasError('required')">
{{'bulkUpload.validationMessages.operation.required' | translate}}
</mat-error>
</mat-form-field>
<div style="width:100%;display:inline">
Expand All @@ -45,9 +45,9 @@ <h3>{{labelanddatas.title |translate}}</h3>
{{data.value | translate }}
</mat-option>
</mat-select>
<mat-error *ngIf="uploadForm.controls.tableName.touched && !showDownloadBtn">
{{'genericerror.fieldValidation' | translate}}
</mat-error>
<mat-error *ngIf="uploadForm.controls.tableName.touched && uploadForm.controls.tableName.hasError('required') && !showDownloadBtn">
{{'bulkUpload.validationMessages.tableName.required' | translate}}
</mat-error>
</mat-form-field>
<mat-label style="width:2%" *ngIf="showDownloadBtn" (click)="downloadCSV()" (keypress)="downloadCSV()"><img src="assets/images/download-csv.png" alt="Download CSV" height="18px" width="18px" style="cursor:pointer;" /></mat-label>
<mat-label style="width:2%" *ngIf="showDownloadBtn" (click)="downloadExcel()" (keypress)="downloadExcel()"><img src="assets/images/download-excel.png" alt="Download Excel" height="18px" width="18px" style="cursor:pointer;" /></mat-label>
Expand All @@ -62,8 +62,9 @@ <h3>{{labelanddatas.title |translate}}</h3>
{{'genericerror.fieldValidation' | translate}}
</mat-error>
</div> -->
<label class="labelfileupload" for="fileInput">{{'uploadcertificate.uploadYourFile' | translate}} <span style="color:red;">*</span></label>
<div class="fileuploadcontainer" appDnd (fileDropped)="onFileDropped($event)" id="custom-file-input">
<label class="labelfileupload" for="fileInput" [style.color]="uploadForm.controls.fileName.touched && uploadForm.controls.fileName.hasError('required') ? 'red' : 'rgba(0, 0, 0, 0.54)'">{{'uploadcertificate.uploadYourFile' | translate}} <span style="color:red;">*</span></label>
<div class="fileuploadcontainer" appDnd (fileDropped)="onFileDropped($event)" id="fileName">
<mat-error *ngIf="uploadForm.controls.fileName.touched && uploadForm.controls.fileName.hasError('required')">{{ 'bulkUpload.validationMessages.file.required' | translate }}</mat-error>
<input (click)="$event.target.value=null" type="file" accept=".xlsx, .xls, .csv" #fileInput id="fileInput" (change)="onFileSelect($event)"/>
<label style="margin-right: 1rem;display: flex;" for="fileInput">
<svg id="upload_icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24.042"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export class CreateComponent {
labelanddatas:any;
subscribed: any;
popupMessages:any;
fileNameError:boolean = false;
buttonalignment = 'ltr';
serverError:any;
tableName: string;
Expand Down Expand Up @@ -132,7 +131,6 @@ export class CreateComponent {
this.uploadForm.get('files').setValue(file);
this.uploadForm.get('fileName').setValue(file.name);
//document.getElementById("fileName").classList.remove('addredborder');
this.fileNameError = false;
}
}

Expand All @@ -142,43 +140,29 @@ export class CreateComponent {
}

submit(){
if (this.uploadForm.valid) {
this.auditService.audit(24, 'ADM-333', 'Master Data Upload Form');
let data = {};
data = {
case: 'CONFIRMATION',
title: this.popupMessages['popup1'].title,
message: this.popupMessages['popup1'].message[0] + this.uploadForm.get('operation').value + this.popupMessages['popup1'].message[1] + this.uploadForm.get('tableName').value + this.popupMessages['popup1'].message[2],
yesBtnTxt: this.popupMessages['popup1'].yesBtnText,
noBtnTxt: this.popupMessages['popup1'].noBtnText
};
const dialogRef = this.dialog.open(DialogComponent, {
width: '650px',
data
});
dialogRef.afterClosed().subscribe(response => {
if(response){
this.auditService.audit(18, 'ADM-334', 'Master Data Upload Form');
this.saveData();
}
});
} else {
for (const i in this.uploadForm.controls) {
if (this.uploadForm.controls[i]) {
if(i === "fileName"){
if(!this.uploadForm.get('fileName').value){
document.getElementById("fileName").classList.add('addredborder');
this.fileNameError = true;
}else{
console.log("this.uploadForm.get('fileName').value>>>"+this.uploadForm.get('fileName').value);
}
}else{
this.uploadForm.controls[i].markAsTouched();
}

}
if (this.uploadForm.invalid) {
this.uploadForm.markAllAsTouched();
return;
}
this.auditService.audit(24, 'ADM-333', 'Master Data Upload Form');
let data = {};
data = {
case: 'CONFIRMATION',
title: this.popupMessages['popup1'].title,
message: this.popupMessages['popup1'].message[0] + this.uploadForm.get('operation').value + this.popupMessages['popup1'].message[1] + this.uploadForm.get('tableName').value + this.popupMessages['popup1'].message[2],
yesBtnTxt: this.popupMessages['popup1'].yesBtnText,
noBtnTxt: this.popupMessages['popup1'].noBtnText
};
const dialogRef = this.dialog.open(DialogComponent, {
width: '650px',
data
});
dialogRef.afterClosed().subscribe(response => {
if(response){
this.auditService.audit(18, 'ADM-334', 'Master Data Upload Form');
this.saveData();
}
}
});
}

saveData(){
Expand Down
11 changes: 11 additions & 0 deletions admin-ui/src/assets/i18n/ara.json
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,17 @@
"upload": "تحميل",
"cancel": "يلغي",
"tableNames":[{"id":"applicant_valid_document","value":"وثيقة مقدم الطلب سارية المفعول"},{"id":"biometric_attribute","value":"السمة البيومترية"},{"id":"biometric_type","value":"البيومترية"},{"id":"blocklisted_words","value":"الكلمات المحظورة"},{"id":"daysofweek_list","value":"ايام الاسبوع"},{"id":"device_master","value":"جهاز"},{"id":"device_spec","value":"الجهاز"},{"id":"device_type","value":"نوع الجهاز"},{"id":"doc_category","value":"فئة الوثيقة"},{"id":"doc_type","value":"نوع الوثيقة"},{"id":"dynamic_field","value":"مجال ديناميكي"},{"id":"reg_exceptional_holiday","value":"استثنائي"},{"id":"gender","value":"جنس تذكير أو تأنيث"},{"id":"loc_holiday","value":"عطلة"},{"id":"id_type","value":"نوع المعرف"},{"id":"individual_type","value":"النوع الفردي"},{"id":"language","value":"لغة"},{"id":"location","value":"موقع"},{"id":"loc_hierarchy_list","value":"التسلسل الهرمي"},{"id":"machine_master","value":"آلة"},{"id":"machine_spec","value":"آلةالمواصفات"},{"id":"machine_type","value":"نوع الآلة"},{"id":"module_detail","value":"الوحدة النمطية"},{"id":"reason_category","value":"السببالفئة"},{"id":"reason_list","value":"قائمة الأسباب"},{"id":"reg_exceptional_holiday","value":"عطلة رسمية"},{"id":"registration_center","value":"مركز التسجيل"},{"id":"reg_center_type","value":"نوع التسجيل"},{"id":"reg_working_nonworking","value":"ريج العمل غير العامل"},{"id":"template","value":"نموذج"},{"id":"template_file_format","value":"تنسيق ملف القالب"},{"id":"template_type","value":"نوع النموذج"},{"id":"title","value":"عنوان"},{"id":"user_detail","value":"بيانات المستخدم"},{"id":"valid_document","value":"مستند صالح"},{"id":"zone","value":"منطقة"},{"id":"zone_user","value":"مستخدم المنطقة"}],
"validationMessages": {
"operation": {
"required": "العملية مطلوبة"
},
"tableName": {
"required": "اسم الجدول مطلوب"
},
"file": {
"required": "الملف مطلوب"
}
},
"popupMessages": {
"popup1": {
"title": "تأكيد تحميل البيانات الرئيسية المجمعة",
Expand Down
11 changes: 11 additions & 0 deletions admin-ui/src/assets/i18n/eng.json
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,17 @@
"upload": "UPLOAD",
"cancel": "Cancel",
"tableNames":[{"id":"applicant_valid_document","value":"Applicant Valid Document"},{"id":"biometric_attribute","value":"BiometricAttribute"},{"id":"biometric_type","value":"BiometricType"},{"id":"blocklisted_words","value":"BlocklistedWords"},{"id":"daysofweek_list","value":"DaysOfWeek"},{"id":"device_master","value":"Device"},{"id":"device_spec","value":"DeviceSpecification"},{"id":"device_type","value":"DeviceType"},{"id":"doc_category","value":"DocumentCategory"},{"id":"doc_type","value":"DocumentType"},{"id":"dynamic_field","value":"DynamicField"},{"id":"reg_exceptional_holiday","value":"ExceptionalHoliday"},{"id":"gender","value":"Gender"},{"id":"loc_holiday","value":"Holiday"},{"id":"id_type","value":"IdType"},{"id":"individual_type","value":"IndividualType"},{"id":"language","value":"Language"},{"id":"location","value":"Location"},{"id":"loc_hierarchy_list","value":"LocationHierarchy"},{"id":"machine_master","value":"Machine"},{"id":"machine_spec","value":"MachineSpecification"},{"id":"machine_type","value":"MachineType"},{"id":"module_detail","value":"ModuleDetail"},{"id":"reason_category","value":"ReasonCategory"},{"id":"reason_list","value":"ReasonList"},{"id":"reg_exceptional_holiday","value":"RegExceptionalHoliday"},{"id":"registration_center","value":"RegistrationCenter"},{"id":"reg_center_type","value":"RegistrationCenterType"},{"id":"reg_working_nonworking","value":"RegWorkingNonWorking"},{"id":"template","value":"Template"},{"id":"template_file_format","value":"TemplateFileFormat"},{"id":"template_type","value":"TemplateType"},{"id":"title","value":"Title"},{"id":"user_detail","value":"UserDetails"},{"id":"valid_document","value":"ValidDocument"},{"id":"zone","value":"Zone"},{"id":"zone_user","value":"ZoneUser"}],
"validationMessages": {
"operation": {
"required": "Operation is required"
},
"tableName": {
"required": "Table Name is required"
},
"file": {
"required": "File is required"
}
},
"popupMessages": {
"popup1": {
"title": "Confirm Bulk Master Data Upload",
Expand Down
11 changes: 11 additions & 0 deletions admin-ui/src/assets/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,17 @@
{ "id": "zone", "value": "Zona" },
{ "id": "zone_user", "value": "Usuario de zona" }
],
"validationMessages": {
"operation": {
"required": "La operación es requerida"
},
"tableName": {
"required": "El nombre de la tabla es requerido"
},
"file": {
"required": "El archivo es requerido"
}
},
"popupMessages": {
"popup1": {
"title": "Confirmar carga masiva de datos maestros",
Expand Down
11 changes: 11 additions & 0 deletions admin-ui/src/assets/i18n/fra.json
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,17 @@
"value": "ZoneUtilisateur"
}
],
"validationMessages": {
"operation": {
"required": "L'opération est requise"
},
"tableName": {
"required": "Le nom de la table est requis"
},
"file": {
"required": "Le fichier est requis"
}
},
"popupMessages": {
"popup1": {
"title": "Confirmer le téléchargement en bloc des données de base",
Expand Down
11 changes: 11 additions & 0 deletions admin-ui/src/assets/i18n/hin.json
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,17 @@
"id": "zone_user",
"value": "क्षेत्र उपयोगकर्ता "
}],
"validationMessages": {
"operation": {
"required": "कार्य आवश्यक है"
},
"tableName": {
"required": "तालिका का नाम आवश्यक है"
},
"file": {
"required": "फ़ाइल आवश्यक है"
}
},
"popupMessages": {
"popup1": {
"title": "बल्क मास्टर डेटा अपलोड की पुष्टि करें",
Expand Down
11 changes: 11 additions & 0 deletions admin-ui/src/assets/i18n/kan.json
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,17 @@
"id": "zone_user",
"value": "ವಲಯ ಬಳಕೆದಾರ"
}],
"validationMessages": {
"operation": {
"required": "ಕಾರ್ಯಾಚರಣೆ ಅಗತ್ಯ"
},
"tableName": {
"required": "ಅட்டಿಯ ಹೆಸರು ಅಗತ್ಯ"
},
"file": {
"required": "ಫೈಲ್ ಅಗತ್ಯವಿದೆ"
}
},
"popupMessages": {
"popup1": {
"title": "ಬೃಹತ್ ಮಾಸ್ಟರ್ ಡೇಟಾ ಅಪ್‌ಲೋಡ್ ಅನ್ನು ದೃirೀಕರಿಸಿ",
Expand Down
11 changes: 11 additions & 0 deletions admin-ui/src/assets/i18n/tam.json
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,17 @@
"id": "zone_user",
"value": "மண்டல பயனர் "
}],
"validationMessages": {
"operation": {
"required": "செயல்பாடு தேவை"
},
"tableName": {
"required": "அட்டவணை தேவை"
},
"file": {
"required": "கோப்பு தேவை"
}
},
"popupMessages": {
"popup1": {
"title": "மொத்த முதன்மை தரவு பதிவேற்றத்தை உறுதிப்படுத்தவும்",
Expand Down
Loading