Skip to content

Commit

Permalink
Merge pull request #580 from sunbird-cb/odcs-mapping
Browse files Browse the repository at this point in the history
Odcs mapping
  • Loading branch information
christyfernandes authored Jul 24, 2024
2 parents 62044c5 + c90ff6a commit 886995e
Show file tree
Hide file tree
Showing 9 changed files with 362 additions and 241 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@sunbird-cb/micro-surveys": "2.0.13",
"@sunbird-cb/rain-dashboards": "0.4.33",
"@sunbird-cb/resolver": "^1.0.0",
"@sunbird-cb/taxonomy-editor": "^0.0.15",
"@sunbird-cb/taxonomy-editor": "^0.0.18",
"@sunbird-cb/utils": "^1.0.18",
"@types/file-saver": "^2.0.1",
"brace": "^0.11.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,57 +1,87 @@
<div class="flex flex-4 flex-column">
<mat-card>
<mat-card-title class="flex-4 mobile-margin mat-h2">
My Designation Master
</mat-card-title>
<mat-card-content class="designationTable pt-4">
<ng-container *ngIf="!showCreateLoader; else fw_create_loader">
<div class="w-full flex justify-between items-center mb-6">
<div class="flex items-center">
<div class="search">
<div class=rsearch>
<mat-icon class="color-60 search-icon">search</mat-icon>
<input [formControl]="searchControl" class="sinput color-60" type="Standard" placeholder="Search">
</div>
<div class="flex flex-column gap-4 pt-4">
<div class="flex justify-between items-center">
<div class="mobile-margin text-capitalize mat-h2">{{designationConfig.mainHeading}}</div>
<div>
<button mat-raised-button class="importBtn" [routerLink]="'import-designation'" type="button">
Import from Igot master
</button>
</div>
</div>

<mat-card class="mb-4">
<mat-card-content class="flex gap-4">
<div class="section-1">
<div class="flex-4 mobile-margin text-capitalize mat-h2">{{designationConfig?.topsection?.heading}}</div>
<ng-container *ngFor="let step of designationConfig?.topsection?.steps">
<div class="flex gap-4 mb-4">
<div>
<mat-icon class="infoIcon">info_outlined</mat-icon>
</div>
<div>
<p>{{step.title}}</p>
</div>
</div>
<div class="flex items-center">
<button class="font-normal ws-mat-primary-border attendBtn mat-raised-button"
[routerLink]="'import-designation'" type="button">
Import from Igot master
</button>
</ng-container>
</div>
<ng-container *ngIf="designationConfig?.topsection?.guideVideo?.enabled">
<video width="173" height="102" controls>
<source src="{{designationConfig?.topsection?.guideVideo?.url}}"
type="{{designationConfig?.topsection?.guideVideo?.type}}">
</video>
</ng-container>
<!-- <div class="designationsDemo flex justify-end section-2">
<div class="designationsDemoVideo flex flex-column flex-middle justify-center" (click)="openVideoPopup()">
<mat-icon class="video_icon mb-2">play_circle</mat-icon>
<div>
Watch how it works
</div>
</div>
<ng-container *ngIf="!showLoader">
<ng-container *ngIf="designationsList.length === 0; else designationsTable">
<div class="w-full flex flex-col justify-center items-center emptyDesignations">
<div></div>
<div>
<p>No designations have been added to your master's list yet</p>
</div>
<div class="mt-4">
<button mat-raised-button [routerLink]="'import-designation'">
<mat-icon class="download-icon">download</mat-icon>Start Importing</button>
</div>
</div> -->
</mat-card-content>
</mat-card>

<div class="w-full">
<ng-container *ngIf="!showCreateLoader; else fw_create_loader">
<div class="w-full flex justify-between items-center mb-6">
<div class="flex items-center">
<div class="search">
<div class=rsearch>
<mat-icon class="color-60 search-icon">search</mat-icon>
<input [formControl]="searchControl" class="sinput color-60" type="Standard" placeholder="Search">
</div>
</div>
</div>
</div>
<ng-container *ngIf="!showLoader">
<ng-container *ngIf="designationsList.length === 0; else designationsTable">
<div class="w-full flex flex-col justify-center items-center emptyDesignations">
<img src="/assets/icons/empty_data.svg" class="empty-desigantions-img">
<div>
<p class="empty-desigantions-text">No deisgnation has been imported from iGOT master.</p>
</div>
<div class="mt-4">
<button mat-raised-button class="importBtn" [routerLink]="'import-designation'">
Start Importing</button>
</div>
</ng-container>
<ng-template #designationsTable>
<ws-widget-org-user-table [tableData]="tableData" [data]="filteredDesignationsList"
[actionMenuItem]="actionMenuItem" [isSearchBar]=false
(actionsClick)="menuSelected($event)"></ws-widget-org-user-table>
</ng-template>
</ng-container>
<ng-container *ngIf="showLoader">
<div class="flex flex-1 items-center justify-center loader-box w-full designations-loader">
<mat-spinner strokeWidth="3" diameter="50"></mat-spinner>
</div>
</ng-container>
<ng-template #designationsTable>
<ws-widget-org-user-table [tableData]="tableData" [data]="filteredDesignationsList"
[actionMenuItem]="actionMenuItem" [isSearchBar]=false
(actionsClick)="menuSelected($event)"></ws-widget-org-user-table>
</ng-template>
</ng-container>
<ng-template #fw_create_loader>
<div class="flex flex-col flex-1 w-100 items-center pt-5 text-center">
<mat-spinner class="display-inline-block mb-5" [diameter]="50" [strokeWidth]="3"></mat-spinner>
<p>{{loaderMsg}}</p>
<ng-container *ngIf="showLoader">
<div class="flex flex-1 items-center justify-center loader-box w-full designations-loader">
<mat-spinner strokeWidth="3" diameter="50"></mat-spinner>
</div>
</ng-template>
</mat-card-content>
</mat-card>
</ng-container>
</ng-container>
<ng-template #fw_create_loader>
<div class="flex flex-col flex-1 w-100 items-center pt-5 text-center">
<mat-spinner class="display-inline-block mb-5" [diameter]="50" [strokeWidth]="3"></mat-spinner>
<p>{{loaderMsg}}</p>
</div>
</ng-template>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,32 @@
}
}

.importBtn {
background: #1b4ca1 !important;
color: #ffffff !important;
font-family: "Lato";
height: 40px;
font-size: 14px;
font-weight: 700;
width: 220px;
}

.designationsDemo {
.designationsDemoVideo {
width: 290px;
height: 163px;
border-radius: 5px;
background-color: #FDEAD5;
font-weight: 600;
pointer-events: all;
cursor: pointer;

.video_icon {
font-size: 32px;
}
}
}

.organisation-lable {
font-family: 'lato';
font-weight: 700;
Expand Down Expand Up @@ -58,14 +84,25 @@
}
}

.empty-desigantions-img {
height: 90px;
width: 170px;
}

.emptyDesignations{
height: calc(100vh - 300px);
height: calc(100vh - 600px);
}

.empty-desigantions-text {
font-size: 14px;
font-weight: 600;
font-family: Lato;
}

.download-icon {
margin-right: 5px;
}

.designations-loader {
height: 100px;
height: calc(100vh - 600px);
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export class DesignationsComponent implements OnInit {

environment: any
designationConfig: any
frameworkConfig: any
configSvc: any
loaderMsg = ''
showCreateLoader = false
Expand Down Expand Up @@ -84,8 +83,8 @@ export class DesignationsComponent implements OnInit {
this.tableData = {
columns: [
{ displayName: 'Designation', key: 'name' },
{ displayName: 'Imported by', key: 'Importedby' },
{ displayName: 'Imported on', key: 'Importedon' },
{ displayName: 'Imported by', key: 'importedByName' },
{ displayName: 'Imported on', key: 'importedOn' },
],
needCheckBox: false,
needHash: false,
Expand All @@ -100,7 +99,6 @@ export class DesignationsComponent implements OnInit {
this.environment = environment
this.activateRoute.data.subscribe(data => {
this.designationConfig = data.pageData.data
this.frameworkConfig = this.designationConfig.frameworkConfig
})

// console.log('this.configSvc', this.configSvc.orgReadData)
Expand Down Expand Up @@ -135,7 +133,7 @@ export class DesignationsComponent implements OnInit {
} else {
setTimeout(() => {
this.getOrgReadData()
}, 10000)
}, 10000)
}
// console.log('orgFramework Details', res)
})
Expand Down Expand Up @@ -244,7 +242,12 @@ export class DesignationsComponent implements OnInit {
descriptions: [
{
header: '',
message: `Are you sure you want to remove the ${_.get(event, 'row.name')} designation?`,
messages: [
{
msgClass: '',
msg: `Are you sure you want to remove the ${_.get(event, 'row.name')} designation?`,
},
],
},
],
footerClass: 'items-center justify-end',
Expand Down Expand Up @@ -289,4 +292,6 @@ export class DesignationsComponent implements OnInit {

//#endregion

// openVideoPopup() { }

}
Loading

0 comments on commit 886995e

Please sign in to comment.