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
148 changes: 148 additions & 0 deletions .github/workflows/admin-ui-push-trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
name: admin-ui push trigger build upon a push

on:
release:
types: [published]
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:
inputs:
message:
description: 'Message for manually triggering'
required: false
default: 'Triggered for Updates'
type: string
push:
branches:
- '!release-branch'
- develop
- release-*
- '!master'
- 1.*
- MOSIP*
- dst-*
- mec-*

jobs:
build-admin-ui:
uses: iiitb-pilot/kattu/.github/workflows/npm-build.yml@master-java21
with:
SERVICE_LOCATION: ./admin-ui
BUILD_ARTIFACT: admin-ui
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

build-docker-admin-ui:
needs: build-admin-ui
strategy:
matrix:
include:
- SERVICE_LOCATION: './admin-ui'
SERVICE_NAME: 'admin-ui'
NPM_BUILD: true
BUILD_ARTIFACT: 'admin-ui'
fail-fast: false
name: ${{ matrix.SERVICE_NAME }}
uses: iiitb-pilot/kattu/.github/workflows/docker-build.yml@master-java21
with:
SERVICE_LOCATION: ${{ matrix.SERVICE_LOCATION }}
SERVICE_NAME: ${{ matrix.SERVICE_NAME }}
NPM_BUILD: ${{ matrix.NPM_BUILD }}
BUILD_ARTIFACT: ${{ matrix.BUILD_ARTIFACT }}
secrets:
DEV_NAMESPACE_DOCKER_HUB: ${{ secrets.DEV_NAMESPACE_DOCKER_HUB }}
ACTOR_DOCKER_HUB: ${{ secrets.ACTOR_DOCKER_HUB }}
RELEASE_DOCKER_HUB: ${{ secrets.RELEASE_DOCKER_HUB }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}


build-maven-uitest-admin:
uses: iiitb-pilot/kattu/.github/workflows/maven-build.yml@master-java21
with:
SERVICE_LOCATION: ./uitest-admin
BUILD_ARTIFACT: uitest-admin
secrets:
OSSRH_USER: ${{ secrets.OSSRH_USER }}
OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
GPG_SECRET: ${{ secrets.GPG_SECRET }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

build-uitest-admin-local:
needs: build-maven-uitest-admin
runs-on: ubuntu-latest
env:
NAMESPACE: ${{ secrets.dev_namespace_docker_hub }}
SERVICE_NAME: uitest-admin
SERVICE_LOCATION: uitest-admin
BUILD_ARTIFACT: uitest-admin-local
steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 21
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Cache local Maven repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-

- name: Setup the settings file for ossrh server
run: echo "<settings> <servers> <server> <id>ossrh</id> <username>${{secrets.ossrh_user}}</username> <password>${{secrets.ossrh_secret}}</password> </server> </servers> <profiles> <profile> <id>ossrh</id> <activation> <activeByDefault>true</activeByDefault> </activation> <properties> <gpg.executable>gpg2</gpg.executable> <gpg.passphrase>${{secrets.gpg_secret}}</gpg.passphrase> </properties> </profile> <profile> <id>allow-snapshots</id> <activation><activeByDefault>true</activeByDefault></activation> <repositories> <repository> <id>snapshots-repo</id> <url>https://oss.sonatype.org/content/repositories/snapshots</url> <releases><enabled>false</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </repository> <repository> <id>releases-repo</id> <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url> <releases><enabled>true</enabled></releases> <snapshots><enabled>false</enabled></snapshots> </repository> </repositories> </profile> <profile> <id>sonar</id> <properties> <sonar.sources>.</sonar.sources> <sonar.host.url>https://sonarcloud.io</sonar.host.url> </properties> <activation> <activeByDefault>false</activeByDefault> </activation> </profile> </profiles> </settings>" > $GITHUB_WORKSPACE/settings.xml

- name: Build residentuitests with Maven
run: |
cd ${{ env.SERVICE_LOCATION}}
mvn -U -B package -Dmaven.wagon.http.retryHandler.count=2 --file pom.xml -s $GITHUB_WORKSPACE/settings.xml


- name: Ready the springboot artifacts
if: ${{ !contains(github.ref, 'master') || !contains(github.ref, 'main') }}
run: |
## FIND JARS & COPY ONLY EXECUTABLE JARs STORED UNDER TARGET DIRECTORY
find ${{ env.SERVICE_LOCATION }} -path '*/target/*' -name '*.jar' -type f -exec zip ${{ env.BUILD_ARTIFACT }}.zip {} +

- name: Upload the springboot jars
if: ${{ !contains(github.ref, 'master') || !contains(github.ref, 'main') }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.BUILD_ARTIFACT }}
path: ${{ env.BUILD_ARTIFACT }}.zip

- uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,author,commit,workflow,job # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
if: failure() # Pick up events even if the job fails or is canceled.


build-docker-uitest-admin:
needs: build-uitest-admin-local
strategy:
matrix:
include:
- SERVICE_LOCATION: 'uitest-admin'
SERVICE_NAME: 'uitest-admin'
BUILD_ARTIFACT: 'uitest-admin-local'
fail-fast: false
name: ${{ matrix.SERVICE_NAME }}
uses: iiitb-pilot/kattu/.github/workflows/docker-build.yml@master-java21
with:
SERVICE_LOCATION: ${{ matrix.SERVICE_LOCATION }}
SERVICE_NAME: ${{ matrix.SERVICE_NAME }}
BUILD_ARTIFACT: ${{ matrix.BUILD_ARTIFACT }}
secrets:
DEV_NAMESPACE_DOCKER_HUB: ${{ secrets.DEV_NAMESPACE_DOCKER_HUB }}
ACTOR_DOCKER_HUB: ${{ secrets.ACTOR_DOCKER_HUB }}
RELEASE_DOCKER_HUB: ${{ secrets.RELEASE_DOCKER_HUB }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

6 changes: 6 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 @@ -198,6 +198,12 @@ export class DataStorageService {
return this.http.post(this.BASE_URL + appConstants.URL["lost-rid-status"], request);
}

getLostRidDetailsPhoto(rid:any): Observable<any> {
return this.http.get(
this.BASE_URL+'admin/lostRid/details/'+rid
);
}

deleteUser(userId: any, actualData: any): Observable<any> {
let url = this.router.url.split('/')[3];
let urlmapping = {"users":"usercentermapping", "zoneuser":"zoneuser"};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!-- <div mat-dialog-title>{{data.case === 'MESSAGE'? 'Error' : ''}}{{data.title}}</div> -->
<!-- <div mat-dialog-content>{{data.message}}</div>
<div mat-dialog-actions>
<button mat-button (click)="onNoClick()" cdkFocusInitial>{{data.btnTxt}}</button>
</div> -->

<!-- <div mat-dialog-title>{{data.case === 'MESSAGE'? 'Error' : ''}}{{data.title}}</div> -->
<div class="pop-up" >
<div class="pop-up-header">
<b mat-dialog-title>{{ data.title }}</b>
<div mat-dialog-content>
<p style="white-space: pre-line">{{ data.message }}</p>
</div>
</div>
<div mat-dialog-actions class="pop-up-footer">
<span
><button mat-button (click)="onNoClick()" cdkFocusInitial>{{data.btnTxt}}</button></span
>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/* This is where you would add your custom CSS styles */
mat-dialog-container {
width: 400px; /* Example width */
}

mat-dialog-title {
font-weight: bold;
}

.mat-div{
padding: 0px !important;
}

mat-dialog-actions {
display: flex;
justify-content: space-between;
padding: 8px 16px;
}
.pop-up {
.pop-up-header {
padding: 16px !important;
}
.mat-dialog-content {
margin: 0 !important;
padding: 0 !important;
font-family:"Roboto", sans-serif;
font-size: small;
}
.pop-up-footer {
background: #e6e7e7;
margin-bottom: 0px;
padding: 0 16px;
.mat-button {
outline: 1px solid #FF4081 !important;
margin: 0 10px;
border-radius: 0;
color: #FF4081;
}
}
.pop-up-footer {
.mat-button:focus {
background: #FF4081 !important;
color: #ffffff;
outline: 0 !important;
}
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { ConfirmDialogComponent } from './confirm-dialog.component';

describe('ConfirmDialogComponent', () => {
let component: ConfirmDialogComponent;
let fixture: ComponentFixture<ConfirmDialogComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ConfirmDialogComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(ConfirmDialogComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { Component, Inject } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';

@Component({
selector: 'app-confirm-dialog',
templateUrl: './confirm-dialog.component.html',
styleUrls: ['./confirm-dialog.component.scss']
})
export class ConfirmDialogComponent {
constructor(
public dialogRef: MatDialogRef<ConfirmDialogComponent>, // Inject MatDialogRef
@Inject(MAT_DIALOG_DATA) public data: any // Keep the data injection
) {}

onNoClick(): void {
// Close the dialog
this.dialogRef.close();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!-- profile-dialog.component.html -->
<h2 mat-dialog-title>
{{ "lostRID.applicationId" | translate }} :{{ data.dataSource[data.i].registrationId }}
</h2>
<div mat-dialog-content class="mat-con">
<div class="dialog-content">
<img
[src]="data.lostData.applicantPhoto"
alt="Profile Photo"
class="profile-photo"
/>
<div class="dialog-info">
<p>
{{ "lostRID.name" | translate }}: <strong>{{ name }}</strong>
</p>
<p>
{{ "lostRID.enrolmentDate" | translate }}:
<strong>{{ data.dataSource[data.i].registartionDate }}</strong>
</p>
<p>
{{ "lostRID.dateOfBirth" | translate }}: <strong>{{ data.lostData.dateOfBirth }}</strong>
</p>
</div>
</div>
</div>
<div class="actions-container">
<!-- <div mat-dialog-actions class="button-row">
<button mat-button mat-stroked-button color="primary" (click)="onPrint()">Print Acknowledgement</button>
<button mat-button mat-stroked-button color="accent" (click)="onResend()">Resend Acknowledgement</button>
</div> -->
<div mat-dialog-actions class="close-button-row">
<button mat-button mat-dialog-close>Close</button>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
.dialog-content {
display: flex;
align-items: center;
overflow: hidden !important;
}

.profile-photo {
width: 7rem;
height: 9rem;
object-fit: cover;
margin-right: 20px;
border-radius: 4px;
}

.dialog-info {
flex-grow: 1;
}

.actions-container {
display: flex;
flex-direction: column;
align-items: flex-start; /* Align items to the start */
}

.button-row {
display: flex;
justify-content: space-between; /* Space the buttons evenly */
width: 100%;
margin-bottom: 10px; /* Add spacing between button rows */
}

.close-button-row {
display: flex;
justify-content: flex-end; /* Align the close button to the end */
width: 100%;
background-color: #f0f0f0; /* Gray background color */
}

/* Optionally adjust the color of the close button */
.mat-button.mat-primary {
background-color: #4f4f4f; /* Deep gray color */
color: white;
}
.dobPadding {
padding-top: 3rem;
}
.mat-con {
overflow: hidden !important;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { ProfileDialogComponent } from './profile-dialog.component';

describe('ProfileDialogComponent', () => {
let component: ProfileDialogComponent;
let fixture: ComponentFixture<ProfileDialogComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ProfileDialogComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(ProfileDialogComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Loading
Loading