diff --git a/.circleci/config.yml b/.circleci/config.yml index 0aada78dd74..681cfa58b5b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -54,3 +54,4 @@ workflows: build_and_test: jobs: - test-cases + \ No newline at end of file diff --git a/src/app/client/package.json b/src/app/client/package.json index 617d529232b..e80dcfe5616 100644 --- a/src/app/client/package.json +++ b/src/app/client/package.json @@ -86,7 +86,7 @@ "@project-sunbird/sunbird-video-player-web-component": "1.1.1", "@project-sunbird/telemetry-sdk": "1.3.0", "@project-sunbird/web-extensions": "8.0.1", - "uci-console-v16":"8.0.0", + "uci-console-v16": "8.0.0", "@shikshalokam/sl-questionnaire": "7.0.0", "@shikshalokam/sl-reports-library": "6.0.0", "@swimlane/ngx-datatable": "20.1.0", @@ -245,4 +245,4 @@ "jest-preset-angular/build/serializers/html-comment" ] } -} +} \ No newline at end of file diff --git a/src/app/client/src/app/modules/dashboard/components/list-all-reports/list-all-reports.component.ts b/src/app/client/src/app/modules/dashboard/components/list-all-reports/list-all-reports.component.ts index 4bcf22b7b64..7c9c2f7d158 100644 --- a/src/app/client/src/app/modules/dashboard/components/list-all-reports/list-all-reports.component.ts +++ b/src/app/client/src/app/modules/dashboard/components/list-all-reports/list-all-reports.component.ts @@ -252,7 +252,7 @@ export class ListAllReportsComponent implements OnInit { $(el).on('click', 'tbody tr td:not(.details-control)', (event) => { const rowData = masterTable && masterTable.row(event?.currentTarget).data(); - if (_.get(rowData, 'reportid') && _.get(rowData, 'hashed_val') && rowData.hasOwnProperty('materialize')) { + if (_.get(rowData, 'reportid') && _.get(rowData, 'hashed_val') || (this.reportService.isUserSuperAdmin() && rowData?.hasOwnProperty('materialize'))) { const reportid = _.get(rowData,'reportid'); const hashed_val = _.get(rowData,'hashed_val'); const materialize = _.get(rowData,'materialize'); diff --git a/src/app/client/src/app/modules/merge-account/components/merge-account-status/merge-account-status.component.scss b/src/app/client/src/app/modules/merge-account/components/merge-account-status/merge-account-status.component.scss index be4bb7d9b93..e63083fde09 100644 --- a/src/app/client/src/app/modules/merge-account/components/merge-account-status/merge-account-status.component.scss +++ b/src/app/client/src/app/modules/merge-account/components/merge-account-status/merge-account-status.component.scss @@ -3,4 +3,8 @@ .sb-merged-account-body-para.sb-color-success{ color:var(--success-color); +} + +.sb-certificatePage-logo { + width: calculateRem(150px); } \ No newline at end of file diff --git a/src/app/client/src/app/modules/observation/components/observation-listing/observation-listing.component.spec.ts b/src/app/client/src/app/modules/observation/components/observation-listing/observation-listing.component.spec.ts index 804754de5ad..4fd6fae8193 100644 --- a/src/app/client/src/app/modules/observation/components/observation-listing/observation-listing.component.spec.ts +++ b/src/app/client/src/app/modules/observation/components/observation-listing/observation-listing.component.spec.ts @@ -150,6 +150,7 @@ describe('ObservationListingComponent', () => { }); it('should call playcontent component', () => { + component.categoryKeys = [{code:'solution'}, {code:'solution_type'}, {code:'program'}, {code:'entityType'},{code:'programName'}] const mockEvent = { data: { programId: 'mock-program-id', @@ -167,7 +168,7 @@ describe('ObservationListingComponent', () => { solutionId: data.solutionId, observationId: data._id, solutionName: data.name, - programName: data.subject[0], + programName: data[component.categoryKeys[4].code], entityType: data.entityType }) expect(component.router.navigate).toHaveBeenCalledWith(['observation/details'], { diff --git a/src/app/client/src/app/modules/observation/components/observation-listing/observation-listing.component.ts b/src/app/client/src/app/modules/observation/components/observation-listing/observation-listing.component.ts index efc4fde7d70..81d6be52c20 100644 --- a/src/app/client/src/app/modules/observation/components/observation-listing/observation-listing.component.ts +++ b/src/app/client/src/app/modules/observation/components/observation-listing/observation-listing.component.ts @@ -338,7 +338,7 @@ export class ObservationListingComponent solutionId: data.solutionId, observationId: data._id, solutionName: data.name, - programName: data.subject[0], + programName: data[this.categoryKeys[4].code], entityType:data.entityType }; this.router.navigate(['observation/details'], { diff --git a/src/app/client/src/app/modules/player-helper/components/contentplayer-page/contentplayer-page.component.ts b/src/app/client/src/app/modules/player-helper/components/contentplayer-page/contentplayer-page.component.ts index fcc845d3063..10c15ecfa65 100644 --- a/src/app/client/src/app/modules/player-helper/components/contentplayer-page/contentplayer-page.component.ts +++ b/src/app/client/src/app/modules/player-helper/components/contentplayer-page/contentplayer-page.component.ts @@ -118,7 +118,7 @@ export class ContentPlayerPageComponent implements OnInit, OnDestroy, OnChanges this.playerService.getContent(this.contentId, params) .pipe(takeUntil(this.unsubscribe$)) .subscribe(response => { - this.contentDetails = _.get(response, 'result.content') || _.get(response, 'result.questionset'); + this.contentDetails = _.get(response, 'result.content') || _.get(response, 'result.questionset') || _.get(response, 'result.questionSet'); const status = !_.has(this.contentDetails, 'desktopAppMetadata.isAvailable') ? false : !_.get(this.contentDetails, 'desktopAppMetadata.isAvailable'); this.isContentDeleted.next({value: status}); diff --git a/src/app/client/src/app/modules/player-helper/components/player/player.component.scss b/src/app/client/src/app/modules/player-helper/components/player/player.component.scss index 0e2ff2c9cf2..95f8c9e434a 100644 --- a/src/app/client/src/app/modules/player-helper/components/player/player.component.scss +++ b/src/app/client/src/app/modules/player-helper/components/player/player.component.scss @@ -132,3 +132,6 @@ overflow: hidden; position: relative; } +.contentViewerIframeShadow.player-fullscreen .custom-web-player{ + height: calc(100vh - 4rem); +} \ No newline at end of file diff --git a/src/app/client/src/app/modules/program-dashboard/components/program-datasets/program-datasets.component.html b/src/app/client/src/app/modules/program-dashboard/components/program-datasets/program-datasets.component.html index 956009dcee9..9b15f8ae670 100644 --- a/src/app/client/src/app/modules/program-dashboard/components/program-datasets/program-datasets.component.html +++ b/src/app/client/src/app/modules/program-dashboard/components/program-datasets/program-datasets.component.html @@ -56,26 +56,25 @@

{{reso -
-
-
+ +
+
- - - {{resourceService?.frmelmnts?.lbl?.programLbl}} + + - - {{program.name}} - + [placeholder]="resourceService?.frmelmnts?.lbl?.program" (selectionChange)="programSelection($event)"> + {{program.name}} - +
- - + {{resourceService?.frmelmnts?.lbl?.solutionLbl}} + + [placeholder]="resourceService?.frmelmnts?.lbl?.solution" (selectionChange)="selectSolution($event)"> {{solution.name}} @@ -83,8 +82,8 @@

{{reso

- - + {{ resourceService?.frmelmnts?.lbl?.dashboarddistrictLbl }} + @@ -94,8 +93,8 @@

{{reso

- - + {{ resourceService?.frmelmnts?.lbl?.block }} + @@ -105,8 +104,8 @@

{{reso

- - + {{ resourceService?.frmelmnts?.lbl?.dashboardOrgLbl }} + @@ -116,22 +115,22 @@

{{reso

-
- - +
+ {{resourceService?.frmelmnts?.lbl?.startdate | titlecase }} + - + *{{this.resourceService?.frmelmnts?.msg?.invalidDateMsg | interpolate:'{type}': (resourceService?.frmelmnts?.lbl?.startdate | lowercase)}}
-
- - +
+ {{resourceService?.frmelmnts?.lbl?.enddate | titlecase }} + - + @@ -143,12 +142,10 @@

{{reso - -

-
- - +
+ + {{option}} @@ -169,7 +166,7 @@

{{reso
*{{errorMessage}}
-
+
@@ -178,10 +175,10 @@

{{reso
- + - + {{report?.name}} @@ -215,7 +212,7 @@

{{reso
*{{errorMessage}}
-
@@ -268,26 +265,25 @@

{{reso -
- -
+ +
+
{{resourceService?.frmelmnts?.lbl?.confirmReportRequest}}
+ +
+ +
-
-
-
- -
-
-

- {{resourceService?.frmelmnts?.lbl?.pswdRule}} -

-
+ + + +

+ {{resourceService?.frmelmnts?.lbl?.pswdRule}} +

- @@ -295,7 +291,6 @@

{{reso {{resourceService?.frmelmnts?.btn?.no}}

-
@@ -343,9 +338,8 @@

{{reso
- -
-
+
+
info
@@ -354,11 +348,10 @@

{{reso highlight_off

- -
- -
- +
+
+ {{resourceService?.frmelmnts?.lbl?.programLbl }} + @@ -366,12 +359,11 @@

{{reso {{program.name}} - -

+ +
- -
+
diff --git a/src/app/client/src/app/modules/program-dashboard/components/program-datasets/program-datasets.component.scss b/src/app/client/src/app/modules/program-dashboard/components/program-datasets/program-datasets.component.scss index 98499654903..a3874a8616b 100644 --- a/src/app/client/src/app/modules/program-dashboard/components/program-datasets/program-datasets.component.scss +++ b/src/app/client/src/app/modules/program-dashboard/components/program-datasets/program-datasets.component.scss @@ -1,40 +1,13 @@ @use "@project-sunbird/sb-styles/assets/mixins/mixins" as *; -.sb-modal-actions { - display: flex; - align-items: center; - justify-content: center; -} - -.sb-modal .ui.modal { - margin-top: 15% !important; -} - .ngx-datatable.fixed-header .datatable-header { padding: 0.625rem; } -.sidebar-block { - min-height: 25rem; -} - .ngx-datatable.datatable-header { background: var(--mat-accordion-tab-body-active-bg) !important; } - -/* TODO(mdc-migration): The following rule targets internal classes of select that may no longer apply for the MDC version. */ -/* TODO(mdc-migration): The following rule targets internal classes of select that may no longer apply for the MDC version. */ -.custom_mat_dd .mat-mdc-select-arrow-wrapper { - vertical-align: bottom !important; -} - -.reset-filter{ - color: var(--primary); - background-color: var(--brand-header-tail-text); - width: fit-content; -} - .newData{ color:var(--ck-color-base-error); margin-left: 1.875rem; @@ -53,39 +26,20 @@ color: var(--ck-color-button-cancel); } -.ppFilter{ - margin-top: 1.25rem; -} - .col-gap{ - gap:2rem; -} - -.btn-col{ - flex-grow: 1; - margin-left: 5rem !important; -} - -.modalNote{ - line-height: initial; + gap:1rem; } .infoIcon{ width: 1.125rem; } .sb-graph-section{ - box-shadow: 0 calculateRem(2px) calculateRem(7px) 0 rgba(var(--rc-rgba-black), 0.16); background: var(--sb-graph-section-bg); border: 0.0625rem solid var(--rc-dddddd); } -.sb-last-update-status { - font-size: calculateRem(12px); - font-weight: bold; -} - .sb-label-name { font-size: 1rem; } @@ -107,13 +61,6 @@ /* TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version. */ /* TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version. */ /* TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version. */ - .exportBtn .mat-form-field-wrapper { - float: right; - } - - .cdk-overlay-container{ - z-index: 9 !important; - } .customTable{ sb-dashlets-filters{ @@ -126,10 +73,26 @@ justify-content: flex-end !important; } .chart-title{ - font-weight: 700; + font-weight: 700 !important; + color: var(--primary-color); } - table{ - width: 100% !important; + .export-btn { + position: absolute; + top: -3rem !important; + right: 0 !important; + } + div.dt-container .dt-length, div.dt-container .dt-search, div.dt-container .dt-info, div.dt-container .dt-processing, div.dt-container .dt-paging{ + display: flex; + align-items: center; + flex-direction: row-reverse; + gap: 1rem; + label{ + margin: 0; + text-transform: capitalize; + } + } + div.dt-container div.dt-layout-row.dt-layout-table, div.dt-container div.dt-layout-row.dt-layout-table div.dt-layout-cell{ + overflow: auto; } } .customGraph{ @@ -142,13 +105,6 @@ } } - .customDate{ - /* TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version. */ - /* TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version. */ - /* TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version. */ - .mat-form-field-infix{ - width: 8.75rem !important; - } } .chart-title { font-size: 1rem; @@ -157,52 +113,3 @@ padding-top: 0.5rem; } - - .custom_mat_dd{ - /* TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version. */ - /* TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version. */ - /* TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version. */ - .mat-form-field-flex{ - display: flex; - align-items: center !important; - box-sizing: border-box; - width: 100%; - - input::placeholder{ - color: rgba(0,0,0,.42) !important; - font-weight: bold !important; - } - } - /* TODO(mdc-migration): The following rule targets internal classes of select that may no longer apply for the MDC version. */ - /* TODO(mdc-migration): The following rule targets internal classes of select that may no longer apply for the MDC version. */ - /* TODO(mdc-migration): The following rule targets internal classes of select that may no longer apply for the MDC version. */ - .mat-select-arrow-wrapper { - vertical-align: unset !important; - } - - } - .mat-mdc-select-panel .mat-mdc-option { - white-space: normal !important; - display: inline-table !important; - width: 100% !important; - line-height: 1.5em !important; - padding: 0.625rem 1.5em; - } - /* TODO(mdc-migration): The following rule targets internal classes of option that may no longer apply for the MDC version. */ - /* TODO(mdc-migration): The following rule targets internal classes of option that may no longer apply for the MDC version. */ - /* TODO(mdc-migration): The following rule targets internal classes of option that may no longer apply for the MDC version. */ - .mat-option-text{ - display: flex !important; - } - - .mat-dropdown__options span { - position: unset !important; - } - .mat-dropdown__options span:before { - display: flex !important; - align-self: flex-end !important; - } - .custom_mat_multi.mat-mdc-option{ - display: flex !important; - } -} \ No newline at end of file diff --git a/src/app/client/src/app/modules/report/components/entity-list/entity-list.component.html b/src/app/client/src/app/modules/report/components/entity-list/entity-list.component.html index 1506208bb0f..8c5aa0b7df1 100644 --- a/src/app/client/src/app/modules/report/components/entity-list/entity-list.component.html +++ b/src/app/client/src/app/modules/report/components/entity-list/entity-list.component.html @@ -1,29 +1,25 @@ - + -
+
-
-

{{ resourceService.frmelmnts?.lbl?.selectEntity }}

-
+

{{ resourceService.frmelmnts?.lbl?.selectEntity }}

-
-
-
-
- - -
-
-
-
- +
+
+ + + {{ entity.name }} + +
+
+ +
diff --git a/src/app/client/src/app/modules/report/components/entity-list/entity-list.component.scss b/src/app/client/src/app/modules/report/components/entity-list/entity-list.component.scss index cee92da7cd3..ea07346ca29 100644 --- a/src/app/client/src/app/modules/report/components/entity-list/entity-list.component.scss +++ b/src/app/client/src/app/modules/report/components/entity-list/entity-list.component.scss @@ -1,84 +1,13 @@ @use "@project-sunbird/sb-styles/assets/mixins/mixins" as *; -.add-entity-modal{ - .content{ - max-height: 60vh; - label{ - color: var(--sb-prominent-filter-title); - } - label:hover{ - cursor: pointer; - } - } - .footer{ - width: 100%; - text-align: center; - background: var(--sb-card-bg); - border-top: none; - } - .search-box{ - margin-top: calculateRem(15px); - } -} - -.sb-onboard { - &__header { - width: 100%; - margin: calculateRem(20px) 0px; - padding-left : calculateRem(15px); - } - - &__content { - width: calculateRem(648px); - max-width: 100%; - margin-bottom: auto; - overflow: hidden; - overflow-y: auto; - } - - &__footer { - margin-top: calculateRem(16px); - width: 100%; - text-align: center; - } -} - ::ng-deep { - .sb-onbrd-modal { - @include respond-below(sm) { - .ui.modal { - margin: 0 0 0 0; - top: 0; - left: 0; - right: 0; - bottom: 0; - width: 100%; - } - - .ui.modal.scroll { - position: fixed !important; - top: 0; - width: 100%; - left: 0px; - right: 0px; - margin: 0 !important; + .mat-mdc-radio-group{ + .mat-mdc-radio-button{ + .mdc-form-field{ + label{ + margin: 0 !important; + } } } } -} - .sbt-search-box{ - box-shadow: none; - margin: 0; - } - .load-mr-btn{ - height: 2rem; - font-size: 1rem; - padding: 0.5rem 2rem; - } - .load-mr-bt-center{ - text-align:center -} - - .checked-box{ - background: none; } diff --git a/src/app/client/src/app/modules/shared-feature/components/collection-player/collection-player.component.ts b/src/app/client/src/app/modules/shared-feature/components/collection-player/collection-player.component.ts index 976406b2027..296bdbf271f 100644 --- a/src/app/client/src/app/modules/shared-feature/components/collection-player/collection-player.component.ts +++ b/src/app/client/src/app/modules/shared-feature/components/collection-player/collection-player.component.ts @@ -220,7 +220,7 @@ export class CollectionPlayerComponent implements OnInit, OnDestroy, AfterViewIn this.playerConfig = this.getPlayerConfig(id).pipe(map((content:any) => { if(this.activeContent.mimeType === this.configService.appConfig.PLAYER_CONFIG.MIME_TYPE.questionset) { - const contentDetails = {contentId: id, contentData: content.questionset }; + const contentDetails = { contentId: id, contentData: content.questionset || content.questionSet }; content = this.playerServiceReference.getConfig(contentDetails); this.publicPlayerService.getQuestionSetRead(id).subscribe((data: any) => { _.merge(content.metadata, this.publicPlayerService.getProperties(data.questionset, this.configService.editorConfig.QUESTIONSET_EDITOR.additionalProperties)) diff --git a/src/app/client/src/app/modules/shared-feature/components/global-consent-pii/global-consent-pii.component.ts b/src/app/client/src/app/modules/shared-feature/components/global-consent-pii/global-consent-pii.component.ts index 3c9705b95c6..ae2e9676e2b 100644 --- a/src/app/client/src/app/modules/shared-feature/components/global-consent-pii/global-consent-pii.component.ts +++ b/src/app/client/src/app/modules/shared-feature/components/global-consent-pii/global-consent-pii.component.ts @@ -89,7 +89,7 @@ export class GlobalConsentPiiComponent implements OnInit { getUserInformation() { this.userInformation['name'] = this.usersProfile.lastName ? - `${this.usersProfile.firstName} ${this.usersProfile.lastName}` : this.usersProfile.firstName; + `${this.usersProfile.firstName} ${this.usersProfile.lastName}` : this.usersProfile.firstName; this.userInformation['userid'] = this.usersProfile.userId; this.userInformation['emailId'] = this.usersProfile.email; this.userInformation['phone'] = this.usersProfile.phone; @@ -193,7 +193,7 @@ export class GlobalConsentPiiComponent implements OnInit { if (this.type === 'course-consent') { request.consumerId = this.collection ? this.collection.channel : ''; request.objectId = this.collection ? this.collection.identifier : ''; - } else if ( this.type === 'global-consent') { + } else if (this.type === 'global-consent') { request.consumerId = this.userService.channel; request.objectId = this.userService.channel; const declReq = []; @@ -201,11 +201,11 @@ export class GlobalConsentPiiComponent implements OnInit { declReq.push(this.getDeclarationReqObject(this.usersProfile)); this.updateUserDeclaration(declReq); } - } else if(this.type === 'program-consent'){ + } else if (this.type === 'program-consent') { request.consumerId = this.collection.rootOrganisations; request.objectId = this.collection.programId } - this.csUserService.getConsent(request, { apiPath: '/learner/user/v1' }) + this.csUserService.getConsent(request, { apiPath: '/learner/user/v2' }) .pipe(takeUntil(this.unsubscribe)) .subscribe(res => { if (this.type === 'global-consent') { @@ -239,11 +239,11 @@ export class GlobalConsentPiiComponent implements OnInit { request.consumerId = this.collection ? this.collection.channel : ''; request.objectId = this.collection ? this.collection.identifier : ''; request.objectType = 'Collection'; - } else if ( this.type === 'global-consent') { + } else if (this.type === 'global-consent') { request.consumerId = this.userService.channel; request.objectId = this.userService.channel; request.objectType = 'Organisation'; - } else if(this.type === 'program-consent'){ + } else if (this.type === 'program-consent') { request.consumerId = this.collection.rootOrganisations; request.objectId = this.collection.programId; request.objectType = 'Program' @@ -251,8 +251,8 @@ export class GlobalConsentPiiComponent implements OnInit { this.csUserService.updateConsent(request, { apiPath: '/learner/user/v1' }) .pipe(takeUntil(this.unsubscribe)) .subscribe(() => { - if(this.type === 'program-consent'){ - this.consentShare.emit({consent:true}) + if (this.type === 'program-consent') { + this.consentShare.emit({ consent: true }) } this.type !== 'program-consent' && this.toasterService.success(_.get(this.resourceService, 'messages.smsg.dataSettingSubmitted')); this.getUserConsent(); @@ -262,8 +262,8 @@ export class GlobalConsentPiiComponent implements OnInit { this.isTncAgreed = false; this.toasterService.error(_.get(this.resourceService, 'messages.emsg.m0005')); console.error('Error while updating user consent', error); - if(this.type === 'program-consent'){ - this.consentShare.emit({consent:false}) + if (this.type === 'program-consent') { + this.consentShare.emit({ consent: false }) } }); } @@ -281,9 +281,9 @@ export class GlobalConsentPiiComponent implements OnInit { .pipe(takeUntil(this.unsubscribe)) .subscribe(() => { this.toasterService.success(_.get(this.resourceService, 'messages.smsg.m0037')); - }, err => { - this.toasterService.error(this.resourceService.messages.emsg.m0052); - }); + }, err => { + this.toasterService.error(this.resourceService.messages.emsg.m0052); + }); } getDeclarationReqObject(usersProfile) { let userExternalId = null; @@ -301,7 +301,7 @@ export class GlobalConsentPiiComponent implements OnInit { }; const declarationObj = { operation: 'add', - userId : usersProfile.userId, + userId: usersProfile.userId, orgId: usersProfile.rootOrgId, info: info }; diff --git a/src/app/client/src/app/modules/shared/components/material-auto-complete/material-auto-complete.component.scss b/src/app/client/src/app/modules/shared/components/material-auto-complete/material-auto-complete.component.scss index 7aef5d58b5b..a1e74105aa5 100644 --- a/src/app/client/src/app/modules/shared/components/material-auto-complete/material-auto-complete.component.scss +++ b/src/app/client/src/app/modules/shared/components/material-auto-complete/material-auto-complete.component.scss @@ -7,7 +7,7 @@ &__list { position: absolute; - top: 100%; + top: 0; background: var(--sb-dropdown-menu-bg); border-radius: calculateRem(4px); z-index: 1; @@ -40,11 +40,13 @@ ::ng-deep { .mat-mdc-form-field { width: 100%; - height: calculateRem(32px); - padding: 0 calculateRem(20px); - border: calculateRem(1px) solid var(--gray-100); - background: var(--sb-dropdown-menu-bg); - border-radius: calculateRem(4px); + height: 3rem; + padding: 0 1.25rem; + border-radius: .25rem; + border-radius: 0; + border: none; + padding: 0; + margin: 0; &.mat-form-field-appearance-legacy { /* TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version. */ @@ -92,21 +94,24 @@ } ::ng-deep { - html[layout="joy"] .sb-autocomp-dropdown .mat-mdc-form-field, .sb-autocomp-dropdown__list { - border-radius: calculateRem(24px); - } - /* TODO(mdc-migration): The following rule targets internal classes of checkbox that may no longer apply for the MDC version. */ html[data-mode="darkmode"] .sb-mat__checkbox.sb-mat__checkbox--primary .mat-checkbox-frame { border-color: var(--gray-100); } .sb-autocomp-dropdown__list { - top: 0px !important; + .cdk-text-field-autofill-monitored:not(:-webkit-autofill){ + border-radius: 1.5rem; + border: .0625rem solid var(--gray-100); + width: 100%; + padding: 0.5rem 1.5rem; + margin-top: 0.5rem; + } + } + .mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input, .mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{ + padding: 0; + margin: 0; } .sb-autocomp-dropdown__list ul { list-style: none !important } - .sb-autocomp-dropdown .mat-mdc-form-field { - height: 2.5rem !important; - } } diff --git a/src/app/client/src/app/modules/shared/services/config/url.config.json b/src/app/client/src/app/modules/shared/services/config/url.config.json index f98122e28f6..46a11b738f4 100644 --- a/src/app/client/src/app/modules/shared/services/config/url.config.json +++ b/src/app/client/src/app/modules/shared/services/config/url.config.json @@ -58,8 +58,8 @@ "GET_GENERALISED_RESOURCE": "getGeneralisedResourcesBundles", "OBSERVATION_PREFIX": "/assessment/", "KENDRA_PREFIX": "/kendra/", - "DHITI_PREFIX":"/dhiti/", - "CLOUD_PREFIX":"/cloudUpload/", + "DHITI_PREFIX": "/dhiti/", + "CLOUD_PREFIX": "/cloudUpload/", "CUSTOM_RESOURCE_BUNDLE": "/api/data/v1/form/read", "REPORT": { "READ": "/get", @@ -118,7 +118,7 @@ "USER_EXISTS_GET_USER_BY_KEY": "isUserExists/user/v1/get", "USER_DECLARATION": "user/v1/declarations", "GET_SESSION": "get/user/sessionId", - "DELETE":"user/v1/delete" + "DELETE": "user/v1/delete" }, "CERTIFICATE": { "FETCH_CERTIFICATES": "v1/certs/search", @@ -208,7 +208,7 @@ "ADMIN": { "USER_SEARCH": "user/v3/search", "ORG_SEARCH": "org/v2/search", - "ORG_EXT_SEARCH": "org/v1/ext/search", + "ORG_EXT_SEARCH": "org/v2/search", "BULK": { "USERS_UPLOAD": "user/v2/upload", "ORGANIZATIONS_UPLOAD": "org/v1/upload", @@ -265,7 +265,7 @@ "VERIFY": "otp/v2/verify", "ANONYMOUS": { "GENERATE": "anonymous/otp/v2/generate", - "GENERATE_USERDELETE":"anonymous/delete/otp/v2/generate" + "GENERATE_USERDELETE": "anonymous/delete/otp/v2/generate" } }, "OFFLINE": { @@ -357,26 +357,25 @@ "SEARCH_ENTITY": "observations/mlsurvey/v1/searchEntities", "OBSERVATION_UPDATE_ENTITES": "observations/mlsurvey/v1/updateEntities/", "OBSERVATION_SUBMISSION_CREATE": "observationSubmissions/mlsurvey/v1/create/", - "OBSERVATION_LISTING":"solutions/mlcore/v1/targetedSolutions?type=observation", - "MANDATORY_ENTITY_TYPES_FOR_ROLES":"entities/mlcore/v1/entityTypesByLocationAndRole/", - "OBSERVATION_SUBMISSION_UPDATE":"observationSubmissions/mlsurvey/v1/update/", + "OBSERVATION_LISTING": "solutions/mlcore/v1/targetedSolutions?type=observation", + "MANDATORY_ENTITY_TYPES_FOR_ROLES": "entities/mlcore/v1/entityTypesByLocationAndRole/", + "OBSERVATION_SUBMISSION_UPDATE": "observationSubmissions/mlsurvey/v1/update/", "GET_ASSESSMENT": "observations/mlsurvey/v1/assessment/", "OBSERVATION_REPORT_SOLUTION_LIST": "observationSubmissions/mlsurvey/v1/solutionList?", - "JOIN_PROGRAM":"programs/mlcore/v1/join", - "READ_PROGRAM":"users/mlcore/v1/solutions" + "JOIN_PROGRAM": "programs/mlcore/v1/join", + "READ_PROGRAM": "users/mlcore/v1/solutions" }, "KENDRA": { "TARGETTED_ENTITY_TYPES": "users/mlcore/v1/targetedEntity/", "PRESIGNED_URLS": "cloud-services/mlcore/v1/files/preSignedUrls", "PROGRAMS_BY_PLATFORM_ROLES": "user-extension/mlcore/v1/programsByPlatformRoles", "SOLUTIONS_BY_PROGRAMID": "user-extension/mlcore/v1/solutions", - "DISTRICTS_AND_ORGANISATIONS":"resource/mlreports/v1/filtervalues" + "DISTRICTS_AND_ORGANISATIONS": "resource/mlreports/v1/filtervalues" }, - "DHITI":{ + "DHITI": { "GENERIC_REPORTS": "reports/mlreports/v1/fetch", - "ALL_EVIDENCE":"observations/mlreports/v1/listAllEvidences" + "ALL_EVIDENCE": "observations/mlreports/v1/listAllEvidences" }, "UCI": "/uci" - } -} +} \ No newline at end of file diff --git a/src/app/client/src/assets/styles/global.scss b/src/app/client/src/assets/styles/global.scss index 352cc6a5204..803ddbf5ad5 100644 --- a/src/app/client/src/assets/styles/global.scss +++ b/src/app/client/src/assets/styles/global.scss @@ -1568,3 +1568,9 @@ html[layout="joy"] .sb-modal-content .ui.center.aligned.segment { font-weight: normal; padding: calculateRem(10px) 0; } +.mat-mdc-tab-body.mat-mdc-tab-body-active{ + margin-top: 1rem; +} +.mat-mdc-tab .mdc-tab__text-label { + font-weight: bold; +} \ No newline at end of file diff --git a/src/app/client/yarn.lock b/src/app/client/yarn.lock index d0a2f7f78f9..621003ba9f7 100644 --- a/src/app/client/yarn.lock +++ b/src/app/client/yarn.lock @@ -3336,11 +3336,6 @@ "@project-sunbird/sunbird-player-sdk-v9" "5.1.0" tslib "^2.0.0" -"@project-sunbird/sunbird-epub-player-web-component@1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@project-sunbird/sunbird-epub-player-web-component/-/sunbird-epub-player-web-component-1.2.0.tgz#92a6d4de8ed6d953093ac4d57d6da54733359da2" - integrity sha512-YeunsOyPIRkWkHqr6rGbYcjOKwTkNhrUzcSNMDh8oZ+E/LfyZ54eKtUzSR/+0wjvvOk4W8GFyG7SorSh93pAkw== - "@project-sunbird/sunbird-file-upload-library@1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@project-sunbird/sunbird-file-upload-library/-/sunbird-file-upload-library-1.0.2.tgz#331465c478d4df45cdbaa813c597296609892517" @@ -3368,10 +3363,10 @@ dependencies: ally.js "1.4.1" -"@project-sunbird/sunbird-questionset-editor@8.0.3": - version "8.0.3" - resolved "https://registry.yarnpkg.com/@project-sunbird/sunbird-questionset-editor/-/sunbird-questionset-editor-8.0.3.tgz#84f1ed7bf9f4540bf72134b3ad838c2b6c630f55" - integrity sha512-hszL8sbBBRPvlKbwKVMP74YYmWNbWXZXKVSwW1/U1zwqt5TEerncBYJfRBURhu85Mk2S1YjlU1a7faYttXFMmg== +"@project-sunbird/sunbird-questionset-editor@7.0.4": + version "7.0.4" + resolved "https://registry.yarnpkg.com/@project-sunbird/sunbird-questionset-editor/-/sunbird-questionset-editor-7.0.4.tgz#0414564f8c1ebf1e118a1c9a27c17378f858cda8" + integrity sha512-rhxOsLNaNqutNEAfDU0W7UsVzSZBJhKLmSHTuoT940qd25YPCMtowOLKwbicMop2KrO/ozfRTJjuJQo82k3hOA== dependencies: tslib "^2.0.0" @@ -3383,11 +3378,6 @@ "@project-sunbird/sunbird-player-sdk-v9" "5.1.0" tslib "^2.2.0" -"@project-sunbird/sunbird-quml-player-web-component@4.0.2": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@project-sunbird/sunbird-quml-player-web-component/-/sunbird-quml-player-web-component-4.0.2.tgz#32a1a3bde379a7d1c545d83e14cf161c231449d1" - integrity sha512-qTutKgBYmcvAnwA5QX8cZ8mFVamzvi9Jafl2WMc6ci8G4/cQRFkdrsz3vmQ4BWC2LErOWL+8q59BaL9+XA0naQ== - "@project-sunbird/sunbird-quml-player@7.0.3": version "7.0.3" resolved "https://registry.yarnpkg.com/@project-sunbird/sunbird-quml-player/-/sunbird-quml-player-7.0.3.tgz#ded7524de332e6dbefa76adc1fd8b80055039191" @@ -3396,10 +3386,10 @@ "@project-sunbird/sunbird-player-sdk-v9" "5.1.0" tslib "^2.3.0" -"@project-sunbird/sunbird-resource-library@8.0.2": - version "8.0.2" - resolved "https://registry.yarnpkg.com/@project-sunbird/sunbird-resource-library/-/sunbird-resource-library-8.0.2.tgz#8fa66b98bcd467141c5f0e88b723d46a77a6905a" - integrity sha512-lX8sNCOrkmlIw5pO+TEQvwlD/p+Z0ae179ObLV+86GfinvVfOMF+9moOzA8T/CE0rTd3WCR4j9M/JwltSpOkBw== +"@project-sunbird/sunbird-resource-library@7.0.3": + version "7.0.3" + resolved "https://registry.yarnpkg.com/@project-sunbird/sunbird-resource-library/-/sunbird-resource-library-7.0.3.tgz#16573733455b76b0903b741c705f9cbdac25584a" + integrity sha512-Q1MhBNQIVrFAqGMBHQHq+uqVAbSUAbnaPo1zqy5l1vgvVOj32tm9Xz2kVLNU8vzOnEkRlh95+qsnw/icins5wQ== dependencies: tslib "^2.0.0" diff --git a/src/app/proxy/contentEditorProxy.js b/src/app/proxy/contentEditorProxy.js index 4c74032462c..c5409127397 100644 --- a/src/app/proxy/contentEditorProxy.js +++ b/src/app/proxy/contentEditorProxy.js @@ -2,14 +2,14 @@ const utils = require('../helpers/utils.js'); const proxyUtils = require('./proxyUtils.js') const proxy = require('express-http-proxy') const bodyParser = require('body-parser') -const contentProxyUrl = utils?.defaultHost(utils?.envVariables?.CONTENT_PROXY_URL); -const learnerServiceBaseUrl = utils?.defaultHost(utils?.envVariables?.LEARNER_URL); +const contentProxyUrl = utils?.defaultHost(utils?.envVariables?.CONTENT_PROXY_URL); +const learnerServiceBaseUrl = utils?.defaultHost(utils?.envVariables?.LEARNER_URL); const learner_Service_Local_BaseUrl = utils?.defaultHost(utils?.envVariables?.learner_Service_Local_BaseUrl); const PORTAL_EXT_PLUGIN_URL = utils?.defaultHost(utils?.envVariables?.PORTAL_EXT_PLUGIN_URL); const contentServiceBaseUrl = utils?.defaultHost(utils?.envVariables?.CONTENT_URL); const reqDataLimitOfContentUpload = '30mb' const telemetryHelper = require('../helpers/telemetryHelper') -const learnerURL = utils?.defaultHost(utils?.envVariables?.LEARNER_URL); +const learnerURL = utils?.defaultHost(utils?.envVariables?.LEARNER_URL); const isAPIWhitelisted = require('../helpers/apiWhiteList'); module.exports = function (app) { @@ -68,27 +68,27 @@ module.exports = function (app) { })) app.all('/action/data/v1/page/assemble', - isAPIWhitelisted.isAllowed(), - proxy(learnerServiceBaseUrl, { - proxyReqOptDecorator: proxyUtils.decorateRequestHeaders(learnerServiceBaseUrl), - proxyReqPathResolver: function (req) { - var originalUrl = req.originalUrl - originalUrl = originalUrl.replace('/action/', '') - return require('url').parse(learnerServiceBaseUrl + originalUrl).path - } - })) + isAPIWhitelisted.isAllowed(), + proxy(learnerServiceBaseUrl, { + proxyReqOptDecorator: proxyUtils.decorateRequestHeaders(learnerServiceBaseUrl), + proxyReqPathResolver: function (req) { + var originalUrl = req.originalUrl + originalUrl = originalUrl.replace('/action/', '') + return require('url').parse(learnerServiceBaseUrl + originalUrl).path + } + })) app.all('/action/data/v1/form/read', - isAPIWhitelisted.isAllowed(), - proxy(contentServiceBaseUrl, { - proxyReqOptDecorator: proxyUtils.decorateRequestHeaders(contentServiceBaseUrl), - proxyReqPathResolver: function (req) { - var originalUrl = req.originalUrl - originalUrl = originalUrl.replace('/action/', '') - return require('url').parse(contentServiceBaseUrl + originalUrl).path - } - })) + isAPIWhitelisted.isAllowed(), + proxy(contentServiceBaseUrl, { + proxyReqOptDecorator: proxyUtils.decorateRequestHeaders(contentServiceBaseUrl), + proxyReqPathResolver: function (req) { + var originalUrl = req.originalUrl + originalUrl = originalUrl.replace('/action/', '') + return require('url').parse(contentServiceBaseUrl + originalUrl).path + } + })) const addCorsHeaders = (req, res, next) => { res.header('Access-Control-Allow-Origin', '*') @@ -104,27 +104,27 @@ module.exports = function (app) { } app.all('/action/review/comment/*', - isAPIWhitelisted.isAllowed(), - addCorsHeaders, - proxy(PORTAL_EXT_PLUGIN_URL, { - proxyReqPathResolver: req => { - return req.originalUrl.replace('/action', '/plugin') - }, - userResDecorator: userResDecorator - })) + isAPIWhitelisted.isAllowed(), + addCorsHeaders, + proxy(PORTAL_EXT_PLUGIN_URL, { + proxyReqPathResolver: req => { + return req.originalUrl.replace('/action', '/plugin') + }, + userResDecorator: userResDecorator + })) app.all('/action/textbook/v1/toc/*', - isAPIWhitelisted.isAllowed(), - addCorsHeaders, - proxy(learnerURL, { - proxyReqOptDecorator: proxyUtils.decorateRequestHeaders(learnerURL), - proxyReqPathResolver: (req) => { - var originalUrl = req.originalUrl - originalUrl = originalUrl.replace('/action/textbook/v1/', 'textbook/v1/') - return require('url').parse(learnerURL + originalUrl).path - }, - userResDecorator: userResDecorator - })) + isAPIWhitelisted.isAllowed(), + addCorsHeaders, + proxy(learnerURL, { + proxyReqOptDecorator: proxyUtils.decorateRequestHeaders(learnerURL), + proxyReqPathResolver: (req) => { + var originalUrl = req.originalUrl + originalUrl = originalUrl.replace('/action/textbook/v1/', 'textbook/v1/') + return require('url').parse(learnerURL + originalUrl).path + }, + userResDecorator: userResDecorator + })) app.post('/action/user/v3/search', isAPIWhitelisted.isAllowed(), @@ -148,7 +148,7 @@ module.exports = function (app) { '/action/questionset/v2/comment/read/:do_id', '/action/question/v2/read/:do_id', '/action/questionset/v2/hierarchy/:do_id' - ], + ], isAPIWhitelisted.isAllowed(), addCorsHeaders, proxyUtils.verifyToken(), @@ -172,7 +172,7 @@ module.exports = function (app) { '/action/question/v2/review/:do_id', '/action/question/v2/publish/:do_id', '/action/question/v2/list' - ], + ], isAPIWhitelisted.isAllowed(), addCorsHeaders, proxyUtils.verifyToken(), @@ -193,7 +193,7 @@ module.exports = function (app) { '/action/questionset/v2/comment/update/:do_id', '/action/questionset/v2/add', '/action/question/v2/update/:do_id' - ], + ], isAPIWhitelisted.isAllowed(), addCorsHeaders, proxyUtils.verifyToken(), @@ -228,7 +228,7 @@ module.exports = function (app) { // Collection import & export API's start app.post([ '/action/collection/v1/import/:do_id' - ], + ], isAPIWhitelisted.isAllowed(), addCorsHeaders, proxyUtils.verifyToken(), @@ -244,7 +244,7 @@ module.exports = function (app) { ) app.get([ '/action/collection/v1/export/:do_id' - ], + ], isAPIWhitelisted.isAllowed(), addCorsHeaders, proxyUtils.verifyToken(), @@ -298,31 +298,58 @@ module.exports = function (app) { }) ) app.get('/action/asset/v1/read/:do_id', - isAPIWhitelisted.isAllowed(), - proxy(contentServiceBaseUrl, { - preserveHostHdr: true, - limit: reqDataLimitOfContentUpload, - proxyReqOptDecorator: proxyUtils.decorateRequestHeaders(contentServiceBaseUrl), - proxyReqPathResolver: function (req) { - let originalUrl = req.originalUrl.replace('/action/', '') - return require('url').parse(contentServiceBaseUrl + originalUrl).path - }, - userResDecorator: userResDecorator - }) -) + isAPIWhitelisted.isAllowed(), + proxy(contentServiceBaseUrl, { + preserveHostHdr: true, + limit: reqDataLimitOfContentUpload, + proxyReqOptDecorator: proxyUtils.decorateRequestHeaders(contentServiceBaseUrl), + proxyReqPathResolver: function (req) { + let originalUrl = req.originalUrl.replace('/action/', '') + return require('url').parse(contentServiceBaseUrl + originalUrl).path + }, + userResDecorator: userResDecorator + }) + ) + + app.post('/action/dialcode/v1/reserve/:do_id', + isAPIWhitelisted.isAllowed(), + proxy(contentServiceBaseUrl, { + preserveHostHdr: true, + limit: reqDataLimitOfContentUpload, + proxyReqOptDecorator: proxyUtils.decorateRequestHeaders(contentServiceBaseUrl), + proxyReqPathResolver: function (req) { + let originalUrl = req.originalUrl.replace('/action/', '') + return require('url').parse(contentServiceBaseUrl + originalUrl).path + }, + userResDecorator: userResDecorator + }) + ) + app.get('/action/dialcode/v1/process/status/*', + isAPIWhitelisted.isAllowed(), + proxy(contentServiceBaseUrl, { + preserveHostHdr: true, + limit: reqDataLimitOfContentUpload, + proxyReqOptDecorator: proxyUtils.decorateRequestHeaders(contentServiceBaseUrl), + proxyReqPathResolver: function (req) { + let originalUrl = req.originalUrl.replace('/action/', '') + return require('url').parse(contentServiceBaseUrl + originalUrl).path + }, + userResDecorator: userResDecorator + }) + ) // asset api's ends app.all('/action/*', - bodyParser.json({ limit: '50mb' }), - isAPIWhitelisted.isAllowed(), - telemetryHelper.generateTelemetryForProxy, - proxy(contentProxyUrl, { - preserveHostHdr: true, - limit: reqDataLimitOfContentUpload, - proxyReqOptDecorator: proxyUtils.decorateRequestHeaders(contentProxyUrl), - proxyReqPathResolver: proxyReqPathResolverMethod, - userResDecorator: userResDecorator - })) + bodyParser.json({ limit: '50mb' }), + isAPIWhitelisted.isAllowed(), + telemetryHelper.generateTelemetryForProxy, + proxy(contentProxyUrl, { + preserveHostHdr: true, + limit: reqDataLimitOfContentUpload, + proxyReqOptDecorator: proxyUtils.decorateRequestHeaders(contentProxyUrl), + proxyReqPathResolver: proxyReqPathResolverMethod, + userResDecorator: userResDecorator + })) app.all('/v1/url/fetchmeta', proxy(contentProxyUrl, { proxyReqPathResolver: proxyReqPathResolverMethod @@ -330,11 +357,11 @@ module.exports = function (app) { } const userResDecorator = (proxyRes, proxyResData, req, res) => { try { - const data = JSON.parse(proxyResData.toString('utf8')); - if(req.method === 'GET' && proxyRes.statusCode === 404 && (typeof data.message === 'string' && data.message.toLowerCase() === 'API not found with these values'.toLowerCase())) res.redirect('/') - else return proxyUtils.handleSessionExpiry(proxyRes, proxyResData, req, res, data); - } catch(err) { - console.log('content api user res decorator json parse error', proxyResData); - return proxyUtils.handleSessionExpiry(proxyRes, proxyResData, req, res); + const data = JSON.parse(proxyResData.toString('utf8')); + if (req.method === 'GET' && proxyRes.statusCode === 404 && (typeof data.message === 'string' && data.message.toLowerCase() === 'API not found with these values'.toLowerCase())) res.redirect('/') + else return proxyUtils.handleSessionExpiry(proxyRes, proxyResData, req, res, data); + } catch (err) { + console.log('content api user res decorator json parse error', proxyResData); + return proxyUtils.handleSessionExpiry(proxyRes, proxyResData, req, res); } } diff --git a/src/app/routes/mlRoutes.js b/src/app/routes/mlRoutes.js index 8680e0903ae..97a54c801dc 100644 --- a/src/app/routes/mlRoutes.js +++ b/src/app/routes/mlRoutes.js @@ -61,7 +61,8 @@ module.exports = function (app) { body: fileStream }; request(options, function (error, response) { - if (response.statusCode === 201) { + const successStatusOptions = [200,201,202,'200','201','202']; + if (successStatusOptions.includes(response.statusCode)) { res.send({ responseCode: "OK", status: 200 }) } else { res.send({ status: response.statusCode }) diff --git a/src/desktop/modules/helper/proxyHandler.ts b/src/desktop/modules/helper/proxyHandler.ts index 1f04b9e85ca..a074fc0d2ea 100644 --- a/src/desktop/modules/helper/proxyHandler.ts +++ b/src/desktop/modules/helper/proxyHandler.ts @@ -14,7 +14,7 @@ const decorateRequest = async (request, options) => { const { headers } = request; const userSDK: any = containerAPI.getUserSdkInstance(); const channel = _.get(headers, 'X-Channel-Id') || process.env.CHANNEL; - + headers['host']=`${process.env.APP_BASE_URL}`.split('//')[1]; if (channel && !_.get(headers, 'X-Channel-Id')) { headers['X-Channel-Id'] = channel; } @@ -116,7 +116,7 @@ export const customProxy = (host, options = {}) => { headers: headers, responseType: 'json' } - + config.headers['host']=`${process.env.APP_BASE_URL}`.split('//')[1] config = addAgent(proxyURL, config); defer(() => { switch (method) {