File

src/app/modules/observation/components/observation-details/observation-details.component.ts

Implements

OnInit

Metadata

Index

Properties
Methods

Constructor

constructor(observationService: ObservationService, config: ConfigService, router: Router, routerParam: ActivatedRoute, resourceService: ResourceService, observationUtilService: ObservationUtilService, layoutService: LayoutService, location: Location, toasterService: ToasterService)
Parameters :
Name Type Optional
observationService ObservationService No
config ConfigService No
router Router No
routerParam ActivatedRoute No
resourceService ResourceService No
observationUtilService ObservationUtilService No
layoutService LayoutService No
location Location No
toasterService ToasterService No

Methods

actionOnEntity
actionOnEntity(event)
Parameters :
Name Optional
event No
Returns : void
actionOnSubmission
actionOnSubmission(event)
Parameters :
Name Optional
event No
Returns : void
addEntity
addEntity()
Returns : void
changeEntity
changeEntity(event)
Parameters :
Name Optional
event No
Returns : void
checkConsent
checkConsent($event)
Parameters :
Name Optional
$event No
Returns : void
closeEditModal
closeEditModal(event)
Parameters :
Name Optional
event No
Returns : void
Async delete
delete(entity)
Parameters :
Name Optional
entity No
Returns : any
Async deleteSubmission
deleteSubmission(event)
Parameters :
Name Optional
event No
Returns : any
dropDownAction
dropDownAction(submission, type)
Parameters :
Name Optional
submission No
type No
Returns : void
getAPIParams
getAPIParams(url, payload)
Parameters :
Name Optional
url No
payload No
getEntities
getEntities()
Returns : void
getObservationForm
getObservationForm()
Returns : void
getProfileData
getProfileData()
Returns : void
goBack
goBack()
Returns : void
isConsentUpdated
isConsentUpdated()
Returns : boolean
joinProgram
joinProgram(consentShared)
Parameters :
Name Optional Default value
consentShared No false
Returns : void
markEcmNotApplicable
markEcmNotApplicable(event)
Parameters :
Name Optional
event No
Returns : void
markEcmNotApplicableRemark
markEcmNotApplicableRemark(e)
Parameters :
Name Optional
e No
Returns : void
modalClose
modalClose()
Returns : void
ngOnInit
ngOnInit()
Returns : void
observeAgain
observeAgain()
Returns : void
Async observeAgainConfirm
observeAgainConfirm()
Returns : any
open
open(sbnum, data)
Parameters :
Name Optional
sbnum No
data No
Returns : void
openEditSubmission
openEditSubmission(event)
Parameters :
Name Optional
event No
Returns : void
postAPI
postAPI(params)
Parameters :
Name Optional
params No
Returns : any
readProgram
readProgram()
Returns : void
redirectToQuestions
redirectToQuestions(evidence)
Parameters :
Name Optional
evidence No
Returns : void
updateSubmission
updateSubmission(event)
Parameters :
Name Optional
event No
Returns : void

Properties

actions
Type : []
Default value : [{ name: this.resourceService.frmelmnts.lbl.edit, icon: 'pencil alternate large icon', type: 'edit' }, { name: this.resourceService.frmelmnts.lbl.delete, icon: 'trash large icon', type: 'delete' }]
config
consentApplies
Type : any
consentConfig
Type : ConsentConfiguration
consentUpdated
Type : boolean
courseHierarchy
Type : any
Default value : {}
disableAddEntity
Type : boolean
Default value : true
entities
entityType
joinProgramLoader
Type : boolean
joinProgramPopUp
Type : boolean
Default value : false
layoutConfiguration
Type : any
Public layoutService
Type : LayoutService
Public loaderMessage
Type : ILoaderMessage
Public noResultMessageForEntity
Type : INoResultMessage
Default value : { 'messageText': 'frmelmnts.msg.noEntityFound' }
observationId
Public observationUtilService
Type : ObservationUtilService
openConsentPopUp
Type : boolean
openEditModal
Type : literal type
Default value : {show: false, data: null}
payload
programId
programJoined
Type : boolean
Default value : true
programName
requestForPIIConsent
Type : boolean
Public resourceService
Type : ResourceService
rootOrganisations
Type : any
selectedEntity
Type : any
Default value : {}
showDownloadModal
Default value : false
showLoader
Default value : false
solution
solutionId
submissions
Public toasterService
Type : ToasterService
import { Component, OnInit } from '@angular/core';
import { ObservationService, ObservationUtilService } from '@sunbird/core';
import { ConfigService, ResourceService, ILoaderMessage, INoResultMessage, LayoutService, ToasterService } from '@sunbird/shared';
import { ActivatedRoute, Router } from '@angular/router';
import { Location } from '@angular/common';
import {Editdata} from '../edit-submission/edit-submission.component';
import _ from 'lodash';
import { catchError } from 'rxjs/operators';
import { throwError } from 'rxjs';
interface ConsentConfiguration{
  tncLink:string,
  tncText:string
}
@Component({
  selector: 'app-observation-details',
  templateUrl: './observation-details.component.html',
  styleUrls: ['./observation-details.component.scss'],
})
export class ObservationDetailsComponent implements OnInit {
  config;
  entities;
  programId;
  solutionId;
  solution;
  payload;
  observationId;
  selectedEntity: any = {};
  layoutConfiguration: any;
  submissions;
  programName;
  disableAddEntity:boolean = true;
  entityType;
  actions = [{
    name: this.resourceService.frmelmnts.lbl.edit,
    icon: 'pencil alternate large icon',
    type: 'edit'
  },
  {
    name: this.resourceService.frmelmnts.lbl.delete,
    icon: 'trash  large icon',
    type: 'delete'
  }];
  showDownloadModal = false;
  openEditModal: {
    show: boolean,
    data: Editdata|null
  } = {show: false, data: null};
  showLoader = false;
  public loaderMessage: ILoaderMessage;
  public noResultMessageForEntity: INoResultMessage = {
    'messageText': 'frmelmnts.msg.noEntityFound'
  };
  courseHierarchy: any = {};
  programJoined:boolean = true;
  joinProgramPopUp:boolean = false;
  openConsentPopUp:boolean;
  consentConfig:ConsentConfiguration;
  requestForPIIConsent:boolean;
  rootOrganisations: any;
  joinProgramLoader: boolean;
  consentApplies: any;
  consentUpdated: boolean;
  constructor(
    private observationService: ObservationService,
    config: ConfigService,
    private router: Router,
    private routerParam: ActivatedRoute,
    public resourceService: ResourceService,
    public observationUtilService: ObservationUtilService,
    public layoutService: LayoutService,
    private location: Location,
    public toasterService: ToasterService
    ) {
    this.config = config;
    routerParam.queryParams.subscribe(data => {
      this.programId = data.programId;
      this.solutionId = data.solutionId;
      this.observationId = data.observationId;
      this.solution = data.solutionName;
      this.programName = data.programName;
      this.entityType = data.entityType;
    });
  }

  ngOnInit() {
    this.layoutConfiguration = this.layoutService.initlayoutConfig();
    this.layoutService.switchableLayout() 
    .subscribe(layoutConfig => {
      if (layoutConfig != null) {
        this.layoutConfiguration = layoutConfig.layout;
      }
    });
    this.getProfileData();
    this.consentConfig = { tncLink: _.get(this.resourceService, 'frmelmnts.lbl.privacyPolicy'), tncText: _.get(this.resourceService, 'frmelmnts.lbl.programConsent') };
  }
  
  getAPIParams(url, payload) {
    const { school, ...payloadToSend } = payload;
    const params = {
      url,
      data: payloadToSend
    };
    return params;
  }
  
  readProgram() {
    const url = `${this.config.urlConFig.URLS.OBSERVATION.READ_PROGRAM}/${this.programId}`;
    const params = this.getAPIParams(url, this.payload);
    
    this.postAPI(params).subscribe(data => {
      this.consentApplies = data?.result?.requestForPIIConsent;
      this.consentUpdated = data?.result?.consentShared;
      this.programJoined = this.consentApplies ? data.result.programJoined : true;
      this.requestForPIIConsent = data.result.requestForPIIConsent || false;
      this.rootOrganisations = data.result.rootOrganisations || '';
      if(this.programJoined && this.consentApplies) this.openConsentPopUp = true;
    });
  }
  
  joinProgram(consentShared = false) {
    this.joinProgramPopUp = this.joinProgramLoader = true;
    const url = `${this.config.urlConFig.URLS.OBSERVATION.JOIN_PROGRAM}/${this.programId}`;
    const params = this.getAPIParams(url, { userRoleInformation: this.payload, consentShared:consentShared });
    
    this.postAPI(params).subscribe(_data => {
      this.joinProgramPopUp = this.joinProgramLoader = false;
      this.programJoined = true;
      this.openConsentPopUp = this.requestForPIIConsent;
      if(!this.requestForPIIConsent || this.requestForPIIConsent && consentShared){
        this.toasterService.success(_.get(this.resourceService,'messages.smsg.joinedProgramSuccessfully'))
      } 
    });
  }

  checkConsent($event){
    this.consentUpdated = $event?.consent
    this.openConsentPopUp = false;
    if($event?.consent) this.joinProgram($event?.consent)
  }

  getProfileData() {
    this.observationUtilService.getProfileDataList().then(data => {
      this.payload = data;
      this.getEntities();
      this.readProgram();
    }, error => {
    });
    window.scroll({
      top: 0,
      left: 0,
      behavior: 'smooth',
    });
  }

  getEntities() {
    this.showLoader = true;
    const paramOptions = {
      url: this.config.urlConFig.URLS.OBSERVATION.OBSERVATION_ENTITIES,
      param: {
        solutionId: this.solutionId,
      },
      data: this.payload,
    };
    this.observationService.post(paramOptions).subscribe(data => {
      this.showLoader = false;
      if (data.result ) {
        this.disableAddEntity = false;
        this.entities = data.result;
        if (!this.selectedEntity._id && data.result.entities && data.result.entities.length) {
          this.selectedEntity = this.entities.entities[0];
        }
        this.observationId = this.entities._id;
        this.getObservationForm();
      } else {
        this.entities = [];
      }

      if (data.result && data.result.license) {
        this.courseHierarchy = data.result.license;
       }

    }, error => {
      this.toasterService.error(error?.error?.message)
      this.showLoader = false;
    });
  }

  getObservationForm() {
    // this.showLoader = true;
    const paramOptions = {
      url: this.config.urlConFig.URLS.OBSERVATION.GET_OBSERVATION_SUBMISSIONS + `${this.observationId}?entityId=${this.selectedEntity._id}`,
      param: {},
      data: this.payload,
    };
    this.observationService.post(paramOptions).subscribe(data => {
      this.showLoader = false;
      this.submissions = data.result;
      if (!this.submissions.length && !this.entities.allowMultipleAssessemts) {
        this.observeAgain();
      }
    }, error => {
      this.showLoader = false;
    });
  }

 actionOnEntity(event) {
    if (event.action == 'delete') {
      this.delete(event.data);
    } else if (event.action == 'change') {
      this.changeEntity(event.data);
    }
  }
  isConsentUpdated(){
    if(this.requestForPIIConsent && !this.consentUpdated){
      this.openConsentPopUp = true;
      return false;
    }
    return true;
  }
  addEntity() {
    if(!this.isConsentUpdated()){
      return;
    }

    this.showDownloadModal = true;
  }
  changeEntity(event) {
    this.selectedEntity = event;
    this.getObservationForm();
  }
  modalClose() {
    this.showDownloadModal = false;
    this.getEntities();
  }
  goBack() {
   this.location.back();
  }

  async observeAgainConfirm() {
    if(!this.isConsentUpdated()){
      return;
    }

    const metaData = await this.observationUtilService.getAlertMetaData();
    metaData.content.body.data = this.resourceService.frmelmnts.lbl.createObserveAgain;
    metaData.content.body.type = 'text';
    metaData.content.title = this.resourceService.frmelmnts.btn.observeAgain;
    metaData.size = 'mini';
    metaData.footer.buttons.push({
      type: 'cancel',
      returnValue: false,
      buttonText: this.resourceService.frmelmnts.btn.no
    });
    metaData.footer.buttons.push({
      type: 'accept',
      returnValue: true,
      buttonText: this.resourceService.frmelmnts.btn.yes
    });
    metaData.footer.className = 'double-btn';
    const returnData = await this.observationUtilService.showPopupAlert(metaData);
    returnData ? this.observeAgain() : '';
}
  observeAgain() {
      this.showLoader = true;
    const paramOptions = {
      url: this.config.urlConFig.URLS.OBSERVATION.OBSERVATION_SUBMISSION_CREATE + `${this.observationId}?entityId=${this.selectedEntity._id}`,
      param: {},
      data: this.payload,
    };
    this.observationService.post(paramOptions).subscribe(data => {
      this.showLoader = false;
      this.getEntities();
    }, error => {
      this.showLoader = false;
    });
  }

  redirectToQuestions(evidence) {
    if(!this.isConsentUpdated()){
      return;
    }
    
    this.router.navigate([`/questionnaire`], {
      queryParams: {
        observationId: this.observationId,
        entityId: this.selectedEntity._id,
        submissionNumber: evidence.submissionNumber,
        evidenceCode: evidence.code,
      },
    });
  }

  open(sbnum, data) {
    data.submissionNumber = sbnum;
    this.redirectToQuestions(data);
  }

  async delete(entity) {
    const metaData = await this.observationUtilService.getAlertMetaData();
    metaData.content.body.data = this.resourceService.frmelmnts.lbl.deleteConfirm;
    metaData.content.body.type = 'text';
    metaData.content.title = this.resourceService.frmelmnts.btn.delete;
    metaData.size = 'mini';
    metaData.footer.buttons.push({
      type: 'cancel',
      returnValue: false,
      buttonText: this.resourceService.frmelmnts.btn.no
    });
    metaData.footer.buttons.push({
      type: 'accept',
      returnValue: true,
      buttonText: this.resourceService.frmelmnts.btn.yes
    });
    metaData.footer.className = 'double-btn';
    const returnData = await this.observationUtilService.showPopupAlert(metaData);
    if (returnData) {
      this.showLoader = true;
      this.payload.data = [
        entity._id
      ];
      const paramOptions = {
        url: this.config.urlConFig.URLS.OBSERVATION.OBSERVATION_UPDATE_ENTITES + this.observationId,
        param: {},
        data: this.payload,
      };
      if (this.selectedEntity._id == entity._id) {
        this.selectedEntity = {};
      }
      this.observationService.delete(paramOptions).subscribe(data => {
        this.showLoader = false;
        this.getEntities();
      }, error => {
        this.showLoader = false;
      });
    }
  }

  openEditSubmission(event) {
    this.openEditModal.data = {
      title: this.resourceService.frmelmnts?.lbl?.instanceName,
      defaultValue: event.title,
      leftBtnText: this.resourceService.frmelmnts?.btn?.cancel,
      rightBtnText: this.resourceService.frmelmnts?.btn?.update,
      action: 'submissionTitleUpdate',
      returnParams : {submissionId: event._id}
    };
    this.openEditModal.show = true;

  }

  async deleteSubmission(event) {
    const metaData = await this.observationUtilService.getAlertMetaData();
    metaData.content.body.data = this.resourceService.frmelmnts.lbl.deleteSubmission;
    metaData.content.body.type = 'text';
    metaData.content.title = this.resourceService.frmelmnts.btn.delete;
    metaData.size = 'mini';
    metaData.footer.buttons.push({
      type: 'cancel',
      returnValue: false,
      buttonText: this.resourceService.frmelmnts.btn.no
    });
    metaData.footer.buttons.push({
      type: 'accept',
      returnValue: true,
      buttonText: this.resourceService.frmelmnts.btn.yes
    });
    metaData.footer.className = 'double-btn';
    const returnData = await this.observationUtilService.showPopupAlert(metaData);
    if (returnData) {
      const config = {
        url: this.config.urlConFig.URLS.OBSERVATION.OBSERVATION_SUBMISSION_UPDATE + `${event._id}`,
        param: {},
        payload: this.payload,
      };
      this.observationService.delete(config).subscribe(data => {
        this.getObservationForm();
      }, error => {
        this.toasterService.error(error.error.message);
      });
    }
  }

  closeEditModal(event) {
    this.openEditModal.show = false;
    if (!event.data) { return; }
    if (event.action === 'submissionTitleUpdate') { this.updateSubmission(event); }
    if (event.action === 'markEcmNotApplicable') { this.markEcmNotApplicable(event); }
  }

  updateSubmission(event) {
    this.showLoader = true;
    this.payload.title = event.data;
    const paramOptions = {
      url: this.config.urlConFig.URLS.OBSERVATION.OBSERVATION_SUBMISSION_UPDATE + event.returnParams.submissionId,
      param: {},
      data: this.payload,
    };
    this.observationService.post(paramOptions).subscribe(data => {
      this.showLoader = false;
      this.getEntities();
    }, error => {
      this.showLoader = false;
    });
  }

  actionOnSubmission(event) {
    if (event.action == 'markEcmNotApplicable') {
      this.markEcmNotApplicableRemark(event.data);
      return;
    }
    event.action == 'edit' ? this.openEditSubmission(event.data) : this.deleteSubmission(event.data);
  }
  dropDownAction(submission, type) {
    const data = {
      action: type,
      data: submission
    };
    this.actionOnSubmission(data);
  }
  markEcmNotApplicableRemark(e) {
    if (e.notApplicable) {
      const metaData = this.observationUtilService.getAlertMetaData();
      metaData.content.body.data = this.resourceService.frmelmnts.lbl.allReadyNotApplicable;
      metaData.content.body.type = 'text';
      metaData.content.title = this.resourceService.frmelmnts.lbl.allReadyNotApplicableTitle;
      metaData.size = 'small';
      metaData.footer.buttons.push({
        type: 'cancel',
        returnValue: false,
        buttonText: 'Go back',
      });
      metaData.footer.className = 'double-btn';
      this.observationUtilService.showPopupAlert(
        metaData
      );
      return;
    }
    this.openEditModal.data = {
      title: this.resourceService.frmelmnts?.lbl?.notApplicable,
      subTitle: this.resourceService.frmelmnts?.lbl?.notApplicableRemark  ,
      leftBtnText: this.resourceService.frmelmnts?.btn?.goBack,
      rightBtnText: this.resourceService.frmelmnts?.btn?.save,
      action: 'markEcmNotApplicable',
      returnParams: {submissionId: e.submissionId, code: e.code}
    };

    this.openEditModal.show = true;
  }
 markEcmNotApplicable(event) {
    let payload = {
      evidence: {},
    };
    const evidence = {
      externalId: event.returnParams.code,
      notApplicable: true,
      remarks: event.data
    };
    payload.evidence = evidence;
    const profile: Object = this.observationUtilService.getProfileDataList();
    if (!profile) {
      return;
    }
   payload = { ...profile, ...payload };
   const submissionId = event.returnParams.submissionId;
      const paramOptions = {
      url:
        this.config.urlConFig.URLS.OBSERVATION.OBSERVATION_SUBMISSION_UPDATE +
        `${submissionId}`,
      data: payload,
      };

     this.observationService.post(paramOptions).subscribe(
      (data) => {
        try {
          this.submissions.find(sub => {
            if (sub._id == event.returnParams.submissionId) {
              sub.evidencesStatus.find(evidence => {
                if (evidence.code == event.returnParams.code) {
                  evidence.notApplicable = true;
                  evidence.status = 'completed';
                }
              });
            }
          });
        } catch (error) {

        }
      },
      (error) => {

      }
    );

  }
  
  postAPI(params) {
    return this.observationService.post(params).pipe(
      catchError((error) => {
        console.log('Error', error);
        this.joinProgramPopUp = this.joinProgramLoader = false;
        this.toasterService.error(this.resourceService.frmelmnts?.lbl?.joinProgramError);
        return throwError(error);
      })
    );
  }

}
<div [ngClass]="layoutConfiguration ? 'sb-back-actionbar' : 'sb-bg-white cc-player__btn-back py-8'" class="relative position mt-0">
  <div class="ui container py-0 px-0 d-flex flex-ai-center">
    <!-- /* Back button */ -->
    <button type="button" (click)="goBack()" [ngClass]="layoutConfiguration ? 'sb-btn-primary sb-btn-round' : 'sb-btn-link sb-btn-link-primary sb-left-icon-btn px-0'" class="sb-btn sb-btn-normal" tabindex="0" attr.aria-label="{{resourceService?.frmelmnts?.btn?.back}}">
      <i class="icon-svg icon-svg--xxs icon-back mr-4"><svg class="icon icon-svg--primary">
          <use xlink:href="assets/images/sprite.svg#arrow-long-left"></use>
        </svg></i>
     <span>{{resourceService?.frmelmnts?.btn?.back}}</span>
    </button>

    <div class="d-flex flex-dc ml-8">
      <h4 class="mb-4">{{solution}}</h4>
      <div class="fsmall">{{programName}} </div>
    </div>
    <button *ngIf="!programJoined" (click)="joinProgram()" class="sb-btn sb-btn-secondary sb-btn-normal ml-auto textbook__addbtn"> {{resourceService?.frmelmnts?.lbl?.joinProgram}}
    </button>
  </div>
</div>
<div [ngClass]="layoutConfiguration ? 'sbt-inside-page-container' : ''">

<div class="ui container">
  <div class="sb-course-details sb-g sb-g--gap24 py-16 text-left course-consumption-container">
    <div class="sb-course-details__training sb-g-col-xs-12 sb-g-col-md-9 sb-g-col-lg-9 sb-g-col-xxxl-12">
      <div class="training-info">
        <h4 class="font-weight-bold">{{resourceService.frmelmnts?.lbl?.observationDetails}} </h4>
        <div class="training-relevant my-16 content-header__content">
          <div class="observation-detail-box">
            <div class="d-flex flex-dc flex-basis-1 mr-32 min-w-0">
              <div class="content-header__title font-weight-bold ellipsis text-left">
                {{resourceService.frmelmnts?.lbl?.selectEntity}}
              </div>
            </div>
            <div class="d-flex flex-ai-end flex-w-wrap content-header__buttons">
              <button class="sb-btn sb-btn-primary sb-btn-normal mr-8" tabindex="0" [disabled]="disableAddEntity" [ngClass]="{'sb-btn-disabled': disableAddEntity}" (click)="!programJoined ? joinProgramPopUp = true :  addEntity()">
                {{resourceService.frmelmnts?.btn?.add}} {{entityType|titlecase}}
              </button>
            </div>
          </div>
          <div *ngIf="entities?.entities?.length">
            <entity-list [entities]="entities?.entities" [selectedEntity]="selectedEntity"
              (onAction)="actionOnEntity($event)"> </entity-list>
          </div>
          <div class="twelve wide column" *ngIf="entities?.length === 0 && !showLoader">
            <app-no-result [data]="noResultMessageForEntity"></app-no-result>
          </div>
          <div class="observation-detail-box" *ngIf="entities?.entities?.length">
            <div class="d-flex flex-dc flex-basis-1 mr-32 min-w-0">
              <div class="content-header__title font-weight-bold ellipsis text-left">
                {{resourceService.frmelmnts?.lbl?.observationForm}}
              </div>
            </div>
            <div class="d-flex flex-ai-end flex-w-wrap content-header__buttons"
              *ngIf="entities?.allowMultipleAssessemts">
              <button class="sb-btn sb-btn-primary sb-btn-normal mr-8" tabindex="0" (click)="!programJoined ? joinProgramPopUp = true :observeAgainConfirm()">
                {{resourceService.frmelmnts?.btn?.observeAgain}}
              </button>
            </div>
          </div>

          <div class="submissions">
            <div class="twelve wide column margin-btm" *ngIf="showLoader">
              <app-loader [data]='loaderMessage'></app-loader>
            </div>
            <div *ngFor="let submission of submissions">
              <!-- Observation With Rubric -->
              <submission [submission]="submission" [allowMultipleAssessemts]="entities?.allowMultipleAssessemts"
                *ngIf="(submission?.evidencesStatus?.length > 1  || (submission.criteriaLevelReport && submission.isRubricDriven));else rubricCard"
                (selectedSubmission)="!programJoined ? joinProgramPopUp = true :redirectToQuestions($event)" (onAction)="actionOnSubmission($event)">
              </submission>
              <!-- Observation Without Rubric -->
              <ng-template #rubricCard>
                <div content class="pt-0 pb-8">
                  <div *ngFor="let evidance of submission?.evidencesStatus"
                    class="evidences-list cc-player__content-header sb-g">
                    <div class="sb-g-col-xs-12 sb-g-col-sm-12 sb-g-col-md-8 sb-g-col-lg-9">
                      <div class="content-header__title font-weight-bold ellipsis text-left">
                        <div class="white-space-wrap">{{submission.title}} </div>
                        <small *ngIf="evidance.status == 'notstarted'" class="txt-transform">{{resourceService?.frmelmnts.lbl.dashboardsortbystatus}} :
                          {{resourceService.frmelmnts?.lbl?.notstarted}}</small>
                        <small *ngIf="evidance.status != 'notstarted'" class="txt-transform">{{resourceService?.frmelmnts.lbl.dashboardsortbystatus}} :
                          {{evidance.status}}</small>
                      </div>
                    </div>
                    <div class="certified-course__btn ng-star-inserted sb-g-col-xs-12 sb-g-col-sm-12 sb-g-col-md-4 sb-g-col-lg-3 center-align">
                      <button *ngIf="evidance?.status === 'notstarted'"
                        tabindex="0" (click)="open(submission.submissionNumber,evidance)"
                        class="sb-btn sb-btn-secondary sb-btn-normal ml-auto textbook__addbtn">{{resourceService.frmelmnts?.btn?.start}}
                      </button>
                      <button *ngIf="evidance?.status === 'draft'" tabindex="0" (click)="open(submission.submissionNumber,evidance)"
                        class="sb-btn sb-btn-secondary sb-btn-normal ml-auto textbook__addbtn">{{resourceService.frmelmnts?.lbl?.continue }}
                      </button>
                      <button *ngIf="evidance?.status === 'completed' || evidence?.status === 'ratingPending'"
                        tabindex="0" (click)="open(submission.submissionNumber,evidance)"
                        class="sb-btn sb-btn-secondary sb-btn-normal ml-auto textbook__addbtn">{{resourceService.frmelmnts?.lbl?.view }}
                      </button>
                      <div class="ui dropdown" suiDropdown *ngIf="entities?.allowMultipleAssessemts"
                        tabindex="0" (click)="$event.stopPropagation()">
                        <i class="ellipsis vertical icon large"
                          *ngIf="submission.status != 'completed' && submission.status !='ratingPending'"></i>
                        <div class="menu" suiDropdownMenu>
                          <div class="item" tabindex="0" (click)="dropDownAction(submission,action.type)"
                            *ngFor="let action of actions">
                            {{action.name}}
                            <span class="description"><i class="{{action.icon}}"></i></span>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
            </ng-template>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="sb-course-details__info sb-g-col-xs-12 sb-g-col-md-3 sb-g-col-lg-3 sb-g-col-xxxl-4">
      <app-course-info [courseHierarchy]="courseHierarchy"></app-course-info>
    </div>
  </div>
</div>
</div>
<div *ngIf="showDownloadModal">
  <add-entity (closeEvent)="modalClose()" [observationId]="observationId" [solutionId]="solutionId"> </add-entity>
</div>

<div *ngIf="openEditModal?.show">
  <app-edit-submission [editData]="openEditModal.data" (onAction)="closeEditModal($event)"> </app-edit-submission>
</div>
<app-global-consent-pii *ngIf="openConsentPopUp" [type]="'program-consent'" [isglobalConsent]="false" [consentConfig]="consentConfig" [collection]="{'programId':programId,'rootOrganisations':rootOrganisations}" (consentShare)="checkConsent($event)"></app-global-consent-pii>
<app-modal-wrapper *ngIf="joinProgramPopUp" #modal [config]="{disableClose: true, size: 'large'}" (dismiss)="modal.deny()">
  <ng-template  sbModalContent>
    <app-loader *ngIf="joinProgramLoader" [data]="{loaderMessage:resourceService?.frmelmnts?.lbl?.joinProgramLoader}"></app-loader>
    <div *ngIf="!joinProgramLoader" class="sb-modal">
      <div class="transition ui dimmer page modals active visible">
        <div class="ui modal transition active visible normal">
              <div class="container-wrapper">
                <div class="sb-merged-account-content text-left">
                  <div class="d-flex flex-dir-row px-32 my-24">
                    <div class="title text-left font-weight-bold">
                      {{resourceService?.frmelmnts?.lbl?.joinProgram}}</div>
                      <mat-icon (click)="joinProgramPopUp = !joinProgramPopUp" class="close-btn sb-color-error ml-auto ">highlight_off</mat-icon>
                  </div>
                  <p class="py-8 px-32 ">
                    {{resourceService?.frmelmnts?.lbl?.joinProgramSubtitle | interpolate: '{programName}' : programName}}
                  </p>
                </div>
                <div class="d-flex flex-jc-flex-end py-16 px-32">
                  <button (click)="joinProgram()" class="sb-btn sb-btn-primary sb-btn-normal"
                    >{{resourceService?.frmelmnts?.lbl?.joinProgram}}
                  </button>
                </div>
              </div>
        </div>
      </div>
    </div>
  </ng-template>
</app-modal-wrapper>

./observation-details.component.scss

@use "~@project-sunbird/sb-styles/assets/mixins/mixins" as *;

.observation-detail-box{
    display: inline-flex;
    max-width: 100%;
    min-width: 100%;
    margin: calculateRem(15px) 0px;
}
.submissions{
    h5{
        font-weight: 600;
    }
    .evidences-list{
        margin: calculateRem(5px) 0px;
        background:  var(--sb-card-bg) !important;
        border-radius: var(--sbt-bradius-24);
        padding: calculateRem(8px) calculateRem(24px);
    }
}
.icon-svg{
    background: none;
    box-shadow: none;
  }
  .sbaccordion__panel-header__title{
    color: var(--gray-400);
  }
  .margin-btm{
    margin-bottom: 2rem;
  }
  :host ::ng-deep { 
 .ui.dropdown .menu>.item{
    color: var(--sb-linkmenu-text);
 }
 .ui.dropdown .menu{
    background: var(--sb-card-bg);
 }
}
.icon{
  color: var(--primary-400) !important;
}
.txt-transform {
  text-transform: capitalize !important;
}
.center-align {
  align-self: center;
  justify-self: center;
  padding: calculateRem(5px) 0;
}
.white-space-wrap {
  text-overflow: ellipsis;
}
.close-btn{
  cursor: pointer;
}
::ng-deep{
  .profile-field-label{
    width: 10rem !important;
  }
  .sb-mat-accordion__title span{
    line-break: anywhere;
  }
  
  .sb-mat-accordion__title div{
    display: flex;
    align-items: inherit;
  }
}
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""