Skip to content

Commit

Permalink
Merge pull request #584 from mansurskTarento/odcs-designations
Browse files Browse the repository at this point in the history
Odcs designations
  • Loading branch information
christyfernandes authored Jul 25, 2024
2 parents 41a99e2 + bf0c383 commit 17eee31
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 24 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.18",
"@sunbird-cb/taxonomy-editor": "^0.0.19",
"@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
Expand Up @@ -64,13 +64,13 @@ export class RequestListComponent implements OnInit {
fullProfile: any
rootOrgId: any
constructor(private sanitizer: DomSanitizer,
private homeService: ProfileV2Service,
private datePipe: DatePipe,
private activeRoute: ActivatedRoute,
private dialog: MatDialog,
private router: Router,
private snackBar: MatSnackBar,
private loaderService: LoaderService,
private homeService: ProfileV2Service,
private datePipe: DatePipe,
private activeRoute: ActivatedRoute,
private dialog: MatDialog,
private router: Router,
private snackBar: MatSnackBar,
private loaderService: LoaderService,
) { }
requestList: any[] = [
`You can request new content by filling out the request form. You will have the option to choose your content provider and
Expand Down Expand Up @@ -242,7 +242,7 @@ export class RequestListComponent implements OnInit {
if (res) {
setTimeout(() => {
this.getRequestList()
}, 1000)
}, 1000)
}

this.snackBar.open('Marked as Invalid')
Expand All @@ -264,7 +264,7 @@ export class RequestListComponent implements OnInit {
if (_res && _res.data === 'confirmed') {
setTimeout(() => {
this.getRequestList()
}, 1000)
}, 1000)
this.snackBar.open('Assigned submitted Successfully')
} else {
// this.snackBar.open('error')
Expand All @@ -285,7 +285,7 @@ export class RequestListComponent implements OnInit {
if (_res && _res.data === 'confirmed') {
setTimeout(() => {
this.getRequestList()
}, 1000)
}, 1000)

this.snackBar.open('Re-assign submitted Successfully')
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<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
Import from iGOT master
</button>
</div>
</div>
Expand All @@ -13,9 +13,9 @@
<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 class="flex gap-4">
<div>
<mat-icon class="infoIcon">info_outlined</mat-icon>
<mat-icon class="infoIcon">error_outline</mat-icon>
</div>
<div>
<p>{{step.title}}</p>
Expand Down Expand Up @@ -57,7 +57,7 @@
<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>
<p class="empty-desigantions-text">No designation has been imported from iGOT master.</p>
</div>
<div class="mt-4">
<button mat-raised-button class="importBtn" [routerLink]="'import-designation'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export class DesignationsComponent implements OnInit {

initializeDefaultValues() {
this.configSvc = this.activateRoute.snapshot.data['configService']
this.designationsService.setUserProfile(_.get(this.configSvc, 'userProfileV2'))
this.orgId = _.get(this.configSvc, 'userProfile.rootOrgId')
this.actionMenuItem = [
// {
Expand Down Expand Up @@ -133,7 +134,7 @@ export class DesignationsComponent implements OnInit {
} else {
setTimeout(() => {
this.getOrgReadData()
}, 10000)
}, 10000)
}
// console.log('orgFramework Details', res)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
height: 20px;
color: #797979;
pointer-events: all;
cursor: pointer;
}

.header-text {
Expand Down Expand Up @@ -129,10 +130,10 @@
}

.custom-user-card {
width: 292px;
width: 360px;
border: 1px solid rgba(0, 0, 0, 0.16);
border-radius: 4px;
height: 70px;
height: 82px;
}

.disableCard {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ export class ImportDesignationComponent implements OnInit, OnDestroy {
requestedFields: [],
pageSize: this.pageSize,
}
// this.startIndex
if (searchKey) {
requestParams['searchString'] = searchKey
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,21 @@ export class DesignationsService {
orgDesignationList: any = []
selectedDesignationList: any = []
frameWorkInfo: any
userProfile: any

constructor(
private http: HttpClient,
private configSvc: ConfigurationsService,
) { }

setUserProfile(profileDetails: any) {
this.userProfile = profileDetails
}

get userProfileDetails() {
return this.userProfile
}

createFrameWork(frameworkName: string, orgId: string, termName: string) {
return this.http.get<any>(API_END_POINTS.CREATE_FRAME_WORK(frameworkName, orgId, termName))
}
Expand Down Expand Up @@ -126,7 +135,9 @@ export class DesignationsService {
if (associations.length > 0) {
Object.assign(c, { children: associations })
}
c['importedByName'] = _.get(c, 'additionalProperties.importedByName'),
const importedBy = _.get(c, 'additionalProperties.importedById', null) === _.get(this.userProfile, 'userId', '')
? 'You' : _.get(c, 'additionalProperties.importedById', null)
c['importedByName'] = importedBy,
c['importedOn'] = _.get(c, 'additionalProperties.importedOn'),
c['importedById'] = _.get(c, 'additionalProperties.importedById')
return c
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class OdcsMappingComponent implements OnInit {
callResizeEvent(_event: any) {
setTimeout(() => {
window.dispatchEvent(new Event('resize'))
}, 100)
}, 100)
}

createFreamwork() {
Expand All @@ -79,7 +79,7 @@ export class OdcsMappingComponent implements OnInit {
} else {
setTimeout(() => {
this.getOrgReadData()
}, 10000)
}, 10000)
}
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import * as fileSaver from 'file-saver'

const API_ENDPOINTS = {
// bulkUpload: `/apis/proxies/v8/user/v1/bulkupload`,
bulkUpload: `/apis/proxies/v8/user/v2/bulkupload`, //csv support
bulkUpload: `/apis/proxies/v8/user/v2/bulkupload`, // csv support
downloadReport: `/apis/protected/v8/admin/userRegistration/bulkUploadReport`,
getBulkUploadData: '/apis/proxies/v8/user/v1/bulkupload',
getBulkApproval: '/apis/proxies/v8/workflow/admin/bulkupdate/getstatus',
// bulkApprovalUpload: `/apis/proxies/v8/workflow/admin/transition/bulkupdate`,
bulkApprovalUpload: '/apis/proxies/v8/workflow/admin/v2/bulkupdate/transition', //csv support
bulkApprovalUpload: '/apis/proxies/v8/workflow/admin/v2/bulkupdate/transition', // csv support
}

@Injectable()
Expand Down

0 comments on commit 17eee31

Please sign in to comment.