Skip to content

Commit 10ae932

Browse files
MOSIP-22573 : Added packet upload sync (#203)
* Merge pull request #158 from balaji-alluru/patchx MOSIP-22573 : Added packet upload sync * Update push_trigger.yml for MOSIP-27671 branch --------- Co-authored-by: Sasikumar Ganesan <gsasikumar@gmail.com>
1 parent 5650c35 commit 10ae932

File tree

10 files changed

+431
-72
lines changed

10 files changed

+431
-72
lines changed

.github/workflows/push_trigger.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- 1.0.*
99
- develop
1010
- 1.1.*
11+
- MOSIP-27671
1112

1213
jobs:
1314
build-kernel-ref-idobjectvalidator:

admin-ui/src/app/core/services/data-storage.service.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,4 +171,8 @@ export class DataStorageService {
171171
getCreateUpdateSteps(entity: string) {
172172
return this.http.get(`./assets/create-update-steps/${entity}-steps.json`);
173173
}
174+
175+
getI18NLanguageFiles(langCode:string){
176+
return this.http.get(`./assets/i18n/${langCode}.json`);
177+
}
174178
}

admin-ui/src/app/core/services/header.service.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export class HeaderService {
88
private Username = '';
99
private roles = '';
1010
private zone = '';
11+
private userPreferredLanguage = '';
1112

1213
constructor() { }
1314

@@ -40,6 +41,18 @@ export class HeaderService {
4041
getZone(): string {
4142
return this.zone;
4243
}
44+
45+
setUserPreferredLanguage(userPreferredLanguage: string) {
46+
this.userPreferredLanguage = userPreferredLanguage;
47+
}
48+
49+
getUserPreferredLanguage(): string {
50+
if(this.userPreferredLanguage){
51+
return this.userPreferredLanguage;
52+
}else{
53+
return "eng";
54+
}
55+
}
4356
}
4457

4558

Lines changed: 83 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,98 @@
11
<div id="flex-single-view" style="padding-top: 12px;">
2-
<div id="flex-container">
2+
<div id="flex-container" >
33
<div class="card">
44
<mat-card>
55
<div class="item1">
66
<div class="profile-img">
77
<img src="./assets/images/icon_center.svg" alt="img">
88
</div>
99
<div class="item2">
10-
<h3>Packet Upload</h3>
10+
<h3>{{'packet-upload.header' | translate}}</h3>
1111
</div>
1212
</div>
1313
</mat-card>
1414
</div>
15-
<div id="myDiv" class="flex-body">
15+
<div id="myDiv" class="flex-body">
1616
<mat-card>
17-
<mat-card-content class="forms-container">
17+
<mat-card-content class="forms-container" *ngIf="dynamicDropDown">
1818
<div [formGroup]="uploadForm" class="primary-form" *ngIf="uploadForm">
19+
<mat-form-field>
20+
<mat-label>{{'packet-upload.createView.center' | translate}}</mat-label>
21+
<mat-select formControlName="centerId" id="centerId">
22+
<mat-option
23+
*ngFor="let data of dynamicDropDown['centerList']"
24+
(onSelectionChange)="captureDropDownValue($event, 'centerId')"
25+
[id]="data.fieldCode"
26+
[value]="data.fieldCode"
27+
>
28+
{{ data.fieldValue }} ({{data.fieldCode}})
29+
</mat-option>
30+
</mat-select>
31+
<mat-error *ngIf="uploadForm.controls.centerId.touched">
32+
{{'genericerror.fieldValidation' | translate}}
33+
</mat-error>
34+
</mat-form-field>
35+
36+
37+
<mat-form-field>
38+
<mat-label>{{'packet-upload.createView.sourceLabel' | translate}}</mat-label>
39+
<mat-select formControlName="source" id="source">
40+
<mat-option
41+
*ngFor="let data of dynamicDropDown['source']"
42+
(onSelectionChange)="captureDropDownValue($event, 'source')"
43+
[id]="data.value"
44+
[value]="data.value"
45+
>
46+
{{ data.label }}
47+
</mat-option>
48+
</mat-select>
49+
<mat-error *ngIf="uploadForm.controls.source.touched">
50+
{{'genericerror.fieldValidation' | translate}}
51+
</mat-error>
52+
</mat-form-field>
53+
54+
<mat-form-field>
55+
<mat-label>{{'packet-upload.createView.processLabel' | translate}}</mat-label>
56+
<mat-select formControlName="process" id="process">
57+
<mat-option
58+
*ngFor="let data of dynamicDropDown['process']"
59+
(onSelectionChange)="captureDropDownValue($event, 'process')"
60+
[id]="data.value"
61+
[value]="data.value"
62+
>
63+
{{ data.label }}
64+
</mat-option>
65+
</mat-select>
66+
<mat-error *ngIf="uploadForm.controls.process.touched">
67+
{{'genericerror.fieldValidation' | translate}}
68+
</mat-error>
69+
</mat-form-field>
70+
71+
<mat-form-field>
72+
<mat-label>{{'packet-upload.createView.supervisorStatusLabel' | translate}}</mat-label>
73+
<mat-select formControlName="supervisorStatus" id="supervisorStatus">
74+
<mat-option
75+
*ngFor="let data of dynamicDropDown['supervisorStatus']"
76+
(onSelectionChange)="captureDropDownValue($event, 'supervisorStatus')"
77+
[id]="data.value"
78+
[value]="data.value"
79+
>
80+
{{ data.label }}
81+
</mat-option>
82+
</mat-select>
83+
<mat-error *ngIf="uploadForm.controls.supervisorStatus.touched">
84+
{{'genericerror.fieldValidation' | translate}}
85+
</mat-error>
86+
</mat-form-field>
87+
1988
<div class="custom-file-input">
20-
<input type="button" value="Choose File" class="browseInput">
21-
<input type="file" multiple="multiple" #fileInput (click)="onFileClick($event)" (change)="onFileSelect($event)" placeholder="Upload file..." />
22-
<input type="text" [value]="fileName" placeholder="Upload Your File">
89+
<input type="button" *ngIf="buttonalignment === 'rtl'" value="{{'packet-upload.createView.input-btn-text' | translate}}" class="browseInput">
90+
<input type="file" multiple="multiple" #fileInput (click)="onFileClick($event)" (change)="onFileSelect($event)" required placeholder="{{'packet-upload.createView.input-text1' | translate}}" />
91+
<input type="text" id="fileName" [value]="fileName" placeholder="{{'packet-upload.createView.input-text2' | translate}}">
92+
<input type="button" *ngIf="buttonalignment === 'ltr'" value="{{'packet-upload.createView.input-btn-text' | translate}}" class="browseInput">
93+
<mat-error *ngIf="fileNameError">
94+
{{'genericerror.fieldValidation' | translate}}
95+
</mat-error>
2396
</div>
2497
</div>
2598
</mat-card-content>
@@ -29,13 +102,13 @@ <h3>Packet Upload</h3>
29102
mat-raised-button
30103
(click)="submit()"
31104
>
32-
UPLOAD
105+
{{'packet-upload.createView.upload-btn' | translate}}
33106
</button>
34107
<button mat-raised-button (click)="cancel()">
35-
CANCEL
108+
{{'packet-upload.createView.cancel-btn' | translate}}
36109
</button>
37110
</mat-card-actions>
38111
</mat-card>
39112
</div>
40113
</div>
41-
</div>
114+
</div>

admin-ui/src/app/features/bulkupload/packetdataupload/create/create.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ describe('CreateComponent', () => {
2222
it('should create', () => {
2323
expect(component).toBeTruthy();
2424
});
25-
});
25+
});

0 commit comments

Comments
 (0)