Skip to content

Commit

Permalink
MOSIP-22573 : Added packet upload sync (#203)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
balaji-alluru and gsasikumar authored Jul 19, 2023
1 parent 5650c35 commit 10ae932
Show file tree
Hide file tree
Showing 10 changed files with 431 additions and 72 deletions.
1 change: 1 addition & 0 deletions .github/workflows/push_trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- 1.0.*
- develop
- 1.1.*
- MOSIP-27671

jobs:
build-kernel-ref-idobjectvalidator:
Expand Down
4 changes: 4 additions & 0 deletions admin-ui/src/app/core/services/data-storage.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,8 @@ export class DataStorageService {
getCreateUpdateSteps(entity: string) {
return this.http.get(`./assets/create-update-steps/${entity}-steps.json`);
}

getI18NLanguageFiles(langCode:string){
return this.http.get(`./assets/i18n/${langCode}.json`);
}
}
13 changes: 13 additions & 0 deletions admin-ui/src/app/core/services/header.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export class HeaderService {
private Username = '';
private roles = '';
private zone = '';
private userPreferredLanguage = '';

constructor() { }

Expand Down Expand Up @@ -40,6 +41,18 @@ export class HeaderService {
getZone(): string {
return this.zone;
}

setUserPreferredLanguage(userPreferredLanguage: string) {
this.userPreferredLanguage = userPreferredLanguage;
}

getUserPreferredLanguage(): string {
if(this.userPreferredLanguage){
return this.userPreferredLanguage;
}else{
return "eng";
}
}
}


Original file line number Diff line number Diff line change
@@ -1,25 +1,98 @@
<div id="flex-single-view" style="padding-top: 12px;">
<div id="flex-container">
<div id="flex-container" >
<div class="card">
<mat-card>
<div class="item1">
<div class="profile-img">
<img src="./assets/images/icon_center.svg" alt="img">
</div>
<div class="item2">
<h3>Packet Upload</h3>
<h3>{{'packet-upload.header' | translate}}</h3>
</div>
</div>
</mat-card>
</div>
<div id="myDiv" class="flex-body">
<div id="myDiv" class="flex-body">
<mat-card>
<mat-card-content class="forms-container">
<mat-card-content class="forms-container" *ngIf="dynamicDropDown">
<div [formGroup]="uploadForm" class="primary-form" *ngIf="uploadForm">
<mat-form-field>
<mat-label>{{'packet-upload.createView.center' | translate}}</mat-label>
<mat-select formControlName="centerId" id="centerId">
<mat-option
*ngFor="let data of dynamicDropDown['centerList']"
(onSelectionChange)="captureDropDownValue($event, 'centerId')"
[id]="data.fieldCode"
[value]="data.fieldCode"
>
{{ data.fieldValue }} ({{data.fieldCode}})
</mat-option>
</mat-select>
<mat-error *ngIf="uploadForm.controls.centerId.touched">
{{'genericerror.fieldValidation' | translate}}
</mat-error>
</mat-form-field>


<mat-form-field>
<mat-label>{{'packet-upload.createView.sourceLabel' | translate}}</mat-label>
<mat-select formControlName="source" id="source">
<mat-option
*ngFor="let data of dynamicDropDown['source']"
(onSelectionChange)="captureDropDownValue($event, 'source')"
[id]="data.value"
[value]="data.value"
>
{{ data.label }}
</mat-option>
</mat-select>
<mat-error *ngIf="uploadForm.controls.source.touched">
{{'genericerror.fieldValidation' | translate}}
</mat-error>
</mat-form-field>

<mat-form-field>
<mat-label>{{'packet-upload.createView.processLabel' | translate}}</mat-label>
<mat-select formControlName="process" id="process">
<mat-option
*ngFor="let data of dynamicDropDown['process']"
(onSelectionChange)="captureDropDownValue($event, 'process')"
[id]="data.value"
[value]="data.value"
>
{{ data.label }}
</mat-option>
</mat-select>
<mat-error *ngIf="uploadForm.controls.process.touched">
{{'genericerror.fieldValidation' | translate}}
</mat-error>
</mat-form-field>

<mat-form-field>
<mat-label>{{'packet-upload.createView.supervisorStatusLabel' | translate}}</mat-label>
<mat-select formControlName="supervisorStatus" id="supervisorStatus">
<mat-option
*ngFor="let data of dynamicDropDown['supervisorStatus']"
(onSelectionChange)="captureDropDownValue($event, 'supervisorStatus')"
[id]="data.value"
[value]="data.value"
>
{{ data.label }}
</mat-option>
</mat-select>
<mat-error *ngIf="uploadForm.controls.supervisorStatus.touched">
{{'genericerror.fieldValidation' | translate}}
</mat-error>
</mat-form-field>

<div class="custom-file-input">
<input type="button" value="Choose File" class="browseInput">
<input type="file" multiple="multiple" #fileInput (click)="onFileClick($event)" (change)="onFileSelect($event)" placeholder="Upload file..." />
<input type="text" [value]="fileName" placeholder="Upload Your File">
<input type="button" *ngIf="buttonalignment === 'rtl'" value="{{'packet-upload.createView.input-btn-text' | translate}}" class="browseInput">
<input type="file" multiple="multiple" #fileInput (click)="onFileClick($event)" (change)="onFileSelect($event)" required placeholder="{{'packet-upload.createView.input-text1' | translate}}" />
<input type="text" id="fileName" [value]="fileName" placeholder="{{'packet-upload.createView.input-text2' | translate}}">
<input type="button" *ngIf="buttonalignment === 'ltr'" value="{{'packet-upload.createView.input-btn-text' | translate}}" class="browseInput">
<mat-error *ngIf="fileNameError">
{{'genericerror.fieldValidation' | translate}}
</mat-error>
</div>
</div>
</mat-card-content>
Expand All @@ -29,13 +102,13 @@ <h3>Packet Upload</h3>
mat-raised-button
(click)="submit()"
>
UPLOAD
{{'packet-upload.createView.upload-btn' | translate}}
</button>
<button mat-raised-button (click)="cancel()">
CANCEL
{{'packet-upload.createView.cancel-btn' | translate}}
</button>
</mat-card-actions>
</mat-card>
</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ describe('CreateComponent', () => {
it('should create', () => {
expect(component).toBeTruthy();
});
});
});
Loading

0 comments on commit 10ae932

Please sign in to comment.