@idsoftsource/initial-process 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1462,6 +1462,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
1462
1462
|
class StepperComponent {
|
|
1463
1463
|
store;
|
|
1464
1464
|
steps = [
|
|
1465
|
+
'Profile Setup',
|
|
1465
1466
|
'Basic Details',
|
|
1466
1467
|
'Coverage',
|
|
1467
1468
|
'Work Experience',
|
|
@@ -29170,8 +29171,8 @@ class FirstComponent {
|
|
|
29170
29171
|
this.isUploading = true;
|
|
29171
29172
|
setTimeout(() => {
|
|
29172
29173
|
this.store.addSuccess(true);
|
|
29173
|
-
|
|
29174
|
-
this.uploadresume();
|
|
29174
|
+
this.saveAWSFile();
|
|
29175
|
+
// this.uploadresume();
|
|
29175
29176
|
}, 1500);
|
|
29176
29177
|
}
|
|
29177
29178
|
// ✅ MUST ADD THIS LINE
|
|
@@ -29188,73 +29189,75 @@ class FirstComponent {
|
|
|
29188
29189
|
this.store.addSuccess(false);
|
|
29189
29190
|
this.store.nextStep();
|
|
29190
29191
|
}
|
|
29191
|
-
|
|
29192
|
-
|
|
29193
|
-
|
|
29194
|
-
|
|
29195
|
-
|
|
29196
|
-
|
|
29197
|
-
|
|
29198
|
-
|
|
29199
|
-
|
|
29200
|
-
|
|
29201
|
-
|
|
29202
|
-
|
|
29203
|
-
|
|
29204
|
-
|
|
29205
|
-
|
|
29206
|
-
|
|
29207
|
-
|
|
29208
|
-
|
|
29209
|
-
|
|
29210
|
-
|
|
29211
|
-
|
|
29212
|
-
|
|
29213
|
-
|
|
29214
|
-
|
|
29215
|
-
|
|
29216
|
-
|
|
29217
|
-
|
|
29218
|
-
|
|
29219
|
-
|
|
29220
|
-
|
|
29221
|
-
|
|
29222
|
-
|
|
29223
|
-
|
|
29224
|
-
|
|
29225
|
-
|
|
29226
|
-
// const model = {
|
|
29227
|
-
// s3Key: this.model.fileUrl,
|
|
29228
|
-
// userId: this.userId
|
|
29229
|
-
// };
|
|
29230
|
-
// this.resumedetail.uploadResume(model).subscribe({
|
|
29231
|
-
// next: (res: any) => {
|
|
29232
|
-
// if (res?.failed) {
|
|
29233
|
-
// this.isUploading = false;
|
|
29234
|
-
// this.resumeName = null;
|
|
29235
|
-
// this.fileData = null;
|
|
29236
|
-
// this.model = { fileId: null, fileUrl: null, fileName: null };
|
|
29237
|
-
// return;
|
|
29238
|
-
// }
|
|
29239
|
-
// this.handleAutoNavigation();
|
|
29240
|
-
// this.resumeData = res as ResumeProfile;
|
|
29241
|
-
// this.store.setProfile(this.resumeData);
|
|
29242
|
-
// console.log('Resume Loaded Successfully:', this.resumeData);
|
|
29243
|
-
// console.log(`Working with ${this.resumeData.basicDetails.firstName}`);
|
|
29244
|
-
// this.isUploading = false;
|
|
29245
|
-
// },
|
|
29246
|
-
// error: (err) => {
|
|
29247
|
-
// console.error('Upload failed:', err);
|
|
29248
|
-
// this.isUploading = false;
|
|
29249
|
-
// this.resumeName = null;
|
|
29250
|
-
// this.fileData = null;
|
|
29251
|
-
// }
|
|
29252
|
-
// });
|
|
29253
|
-
// }
|
|
29192
|
+
async saveAWSFile() {
|
|
29193
|
+
const fileType = this.fileData.type;
|
|
29194
|
+
const fileExtension = fileType.split('/')[1] || fileType.split('/')[0] || 'file';
|
|
29195
|
+
const fileName = `${new uuid().newId()}.${fileExtension}`;
|
|
29196
|
+
const key = `User/${this.userId}/Resume/${fileName}`;
|
|
29197
|
+
const params = { key, contentType: fileType, Expires: 300 };
|
|
29198
|
+
const result = await this.fileService.uploadImageAsync(this.fileData, params);
|
|
29199
|
+
console.log(result);
|
|
29200
|
+
if (!result.success) {
|
|
29201
|
+
return;
|
|
29202
|
+
}
|
|
29203
|
+
const files = {
|
|
29204
|
+
fileName: this.fileData.name,
|
|
29205
|
+
fileSize: this.fileData.size,
|
|
29206
|
+
fileType: this.fileData.type,
|
|
29207
|
+
fileLocation: result.publicUrl,
|
|
29208
|
+
encrypted: true,
|
|
29209
|
+
publicUrl: result.publicUrl
|
|
29210
|
+
};
|
|
29211
|
+
files.fileLocation = files.fileLocation.replace(/^https?:\/\/[^/]+\//, '');
|
|
29212
|
+
files.publicUrl = files.publicUrl.replace(/^https?:\/\/[^/]+\//, '');
|
|
29213
|
+
console.log(files);
|
|
29214
|
+
this.fileService.awsFileUpload([files]).subscribe((res) => {
|
|
29215
|
+
if (res?.[0]?.fileId) {
|
|
29216
|
+
this.model.fileId = res[0].fileId;
|
|
29217
|
+
this.model.fileUrl = res[0].publicUrl;
|
|
29218
|
+
this.model.fileName = this.fileData.name;
|
|
29219
|
+
this.awsFileUpdate.push({
|
|
29220
|
+
fileId: res?.[0]?.fileId,
|
|
29221
|
+
isActive: true,
|
|
29222
|
+
});
|
|
29223
|
+
}
|
|
29224
|
+
this.uploadresume();
|
|
29225
|
+
});
|
|
29226
|
+
}
|
|
29254
29227
|
uploadresume() {
|
|
29255
|
-
this.
|
|
29256
|
-
|
|
29228
|
+
this.isUploading = true;
|
|
29229
|
+
const model = {
|
|
29230
|
+
s3Key: this.model.fileUrl,
|
|
29231
|
+
userId: this.userId
|
|
29232
|
+
};
|
|
29233
|
+
this.resumedetail.uploadResume(model).subscribe({
|
|
29234
|
+
next: (res) => {
|
|
29235
|
+
if (res?.failed) {
|
|
29236
|
+
this.isUploading = false;
|
|
29237
|
+
this.resumeName = null;
|
|
29238
|
+
this.fileData = null;
|
|
29239
|
+
this.model = { fileId: null, fileUrl: null, fileName: null };
|
|
29240
|
+
return;
|
|
29241
|
+
}
|
|
29242
|
+
this.handleAutoNavigation();
|
|
29243
|
+
this.resumeData = res;
|
|
29244
|
+
this.store.setProfile(this.resumeData);
|
|
29245
|
+
console.log('Resume Loaded Successfully:', this.resumeData);
|
|
29246
|
+
console.log(`Working with ${this.resumeData.basicDetails.firstName}`);
|
|
29247
|
+
this.isUploading = false;
|
|
29248
|
+
},
|
|
29249
|
+
error: (err) => {
|
|
29250
|
+
console.error('Upload failed:', err);
|
|
29251
|
+
this.isUploading = false;
|
|
29252
|
+
this.resumeName = null;
|
|
29253
|
+
this.fileData = null;
|
|
29254
|
+
}
|
|
29255
|
+
});
|
|
29257
29256
|
}
|
|
29257
|
+
// uploadresume() {
|
|
29258
|
+
// this.store.setProfile(this.sample)
|
|
29259
|
+
// this.handleAutoNavigation();
|
|
29260
|
+
// }
|
|
29258
29261
|
onBackClick() {
|
|
29259
29262
|
this.backToParent.emit();
|
|
29260
29263
|
}
|