Skip to content

Commit

Permalink
Merge pull request #9 from KB-iGOT/cbrelease-4.8.16
Browse files Browse the repository at this point in the history
Cbrelease 4.8.16 to 4.8.17
  • Loading branch information
vishnubansaltarento authored Aug 23, 2024
2 parents 2f108c5 + fecacbb commit 199d312
Show file tree
Hide file tree
Showing 8 changed files with 211 additions and 67 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,16 +156,16 @@ export class CreateRequestFormComponent implements OnInit {
this.selectRequestType(this.requestObjData.requestType)
if (this.filteredRequestType) {
if (this.requestObjData.preferredProvider && this.requestObjData.preferredProvider.length) {
const prefferedData = this.filteredRequestType.filter(option =>
this.requestObjData.preferredProvider.some((res: any) =>
res.providerId === option.id
const prefferedData = this.filteredRequestType.filter(option =>
this.requestObjData.preferredProvider.some((res: any) =>
res.providerId === option.id
)
)
)
if (prefferedData && prefferedData.length) {
this.requestForm.controls['providers'].setValue(prefferedData)
if (prefferedData && prefferedData.length) {
this.requestForm.controls['providers'].setValue(prefferedData)
}
}
}
}

if (this.filteredAssigneeType) {
if (this.requestObjData.assignedProvider) {
Expand Down Expand Up @@ -254,6 +254,7 @@ export class CreateRequestFormComponent implements OnInit {
filters: {
isCbp: true,
},
limit: 1000,
},
}
this.homeService.getRequestTypeList(requestObj).subscribe(data => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class SingleAssignPopupComponent implements OnInit {
submitAssign = ''
requestTypeData: any[] = []
filterRequestData: any[] = []
isDisable = false
isDisable = false
// @ViewChild(MatPaginator, { static: false }) paginator!: MatPaginator;
dataSource = new MatTableDataSource<any>([])
@ViewChild(MatPaginator, { static: false }) paginator: MatPaginator | null = null
Expand Down Expand Up @@ -55,9 +55,9 @@ export class SingleAssignPopupComponent implements OnInit {
this.getOrgListData()
if (this.configService['confService'].userProfile || this.configService['confService'].userProfileV2) {
this.fullProfile = this.configService['confService'].userProfile ?
this.configService['confService'].userProfile
: this.configService['confService'].userProfileV2
this.userId = this.fullProfile.userId
this.configService['confService'].userProfile
: this.configService['confService'].userProfileV2
this.userId = this.fullProfile.userId
}
}

Expand All @@ -83,14 +83,15 @@ export class SingleAssignPopupComponent implements OnInit {
this.requestTypeData.unshift(selectedData)
}
}
}
}

getOrgListData() {
const requestObj = {
request: {
filters: {
isCbp: true,
},
limit: 1000,
},
}
this.homeService.getRequestTypeList(requestObj).subscribe(data => {
Expand All @@ -104,7 +105,7 @@ export class SingleAssignPopupComponent implements OnInit {

}
})
}
}

// searchText(event:any){
// this.requestForm.controls['orgSearch'].valueChanges.subscribe((newValue: any) => {
Expand All @@ -124,9 +125,9 @@ export class SingleAssignPopupComponent implements OnInit {
this.pageNumber = event.pageIndex
this.pageSize = event.pageSize
this.getOrgListData()
}
}

onSubmitAssign() {
onSubmitAssign() {
const selectedProvider = this.requestForm.value.assignee
let assigneeProvider: any
if (this.requestForm.value.assignee) {
Expand All @@ -137,19 +138,19 @@ export class SingleAssignPopupComponent implements OnInit {
}
if (selectedProvider) {
const request = {
title: this.data.title,
objective: this.data.objective,
typeOfUser: this.data.typeOfUser,
// learningMode: this.requestForm.value.learningMode.toLowerCase(),
competencies: this.data.competencies,
referenceLink: this.data.referenceLink,
requestType: this.data.requestType,
preferredProvider: this.data.preferredProvider,
assignedProvider: assigneeProvider,
status: this.data.status,
source: this.data.owner,
demand_id: this.data.demand_id,
learningMode: this.data.learningMode,
title: this.data.title,
objective: this.data.objective,
typeOfUser: this.data.typeOfUser,
// learningMode: this.requestForm.value.learningMode.toLowerCase(),
competencies: this.data.competencies,
referenceLink: this.data.referenceLink,
requestType: this.data.requestType,
preferredProvider: this.data.preferredProvider,
assignedProvider: assigneeProvider,
status: this.data.status,
source: this.data.owner,
demand_id: this.data.demand_id,
learningMode: this.data.learningMode,
// assignedBy: this.userId,
}
this.homeService.createDemand(request).subscribe((res: any) => {
Expand All @@ -158,10 +159,10 @@ export class SingleAssignPopupComponent implements OnInit {
}

}, (error: any) => {
this.dialogRef.close({ error })
this.dialogRef.close({ error })

}
)
)
} else {
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@
<div class="username display-inline-block">
<div class="mat-subheading-2 margin-remove flex black-color">
<div class="word-wrap userName">
<span *ngIf="user?.profileDetails && user?.profileDetails?.personalDetails">
<span
*ngIf="user?.profileDetails && user?.profileDetails?.personalDetails && user?.profileDetails?.personalDetails?.firstname">
{{user?.profileDetails?.personalDetails?.firstname}}
</span>
<span
*ngIf="user?.profileDetails && user?.profileDetails?.personalDetails && user?.profileDetails?.personalDetails?.firstName">
{{user?.profileDetails?.personalDetails?.firstName}}
</span>
<span *ngIf="!user?.profileDetails?.personalDetails">
{{user?.firstName}}
</span>

</div>
<div>
<span class="status-label margin-left-s verified"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,8 @@ export class UserCardComponent implements OnInit, OnChanges, AfterViewChecked {
if (user && user.profileDetails && user.profileDetails.personalDetails) {
if (user.profileDetails.personalDetails.firstname) {
name = `${user.profileDetails.personalDetails.firstname}`
} else if (user.profileDetails.personalDetails.firstName) {
name = `${user.profileDetails.personalDetails.firstName}`
}
} else {
name = `${user.firstName}`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@
(dblclick)="$event.preventDefault()">
<img src="/assets/icons/csv-file.svg" alt="CSV file logo" />
</div>
<div *ngIf="showFileError" class="error-msg">Upload csv format file only</div>
<div *ngIf="showFileError" class="error-msg">Upload xlsx format file only</div>
<div class="flex flex-col items-center">
<div class="text-primary cursor-pointer" (click)="fileInput.click()" (dblclick)="$event.preventDefault()">
Browse files</div>
<input hidden type="file" #fileInput (click)="handleFileClick($event)" (change)="handleOnFileChange($event)"
name="file" placeholder="Choose file" (dblclick)="$event.preventDefault();" accept=".csv" />
name="file" placeholder="Choose file" (dblclick)="$event.preventDefault();" accept=".xlsx, .xls" />
<!-- <div class="flex">or</div>
<div class="flex">Drag file to upload</div> -->
</div>
<div class="flex flex-col items-center margin-bottom-m">
<div class="flex">Max file size: 100 MB</div>
<div class="flex">Supported file types: csv</div>
<div class="flex">Supported file types: xlsx</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,9 @@ export class ReportsSectionComponent implements OnInit {
openVideoPopup() {
let url = ''
if (this.configSvc && this.userDetails.roles.includes('MDO_LEADER')) {
url = `${environment.karmYogiPath}/content-store/MDO-leader-reports.MP4`
url = `${environment.karmYogiPath}/assets/public/content/guide-videos/MDO-leader-reports.MP4`
} else {
url = `${environment.karmYogiPath}/content-store/MDO-admin-reports.mp4`
url = `${environment.karmYogiPath}/assets/public/content/guide-videos/MDO-admin-reports.mp4`
}
this.dialog.open(ReportsVideoComponent, {
data: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@
(dblclick)="$event.preventDefault()">
<img src="/assets/icons/csv-file.svg" alt="CSV file logo" />
</div>
<div *ngIf="showFileError" class="error-msg">Upload csv format file only</div>
<div *ngIf="showFileError" class="error-msg">Upload xlsx format file only</div>
<div class="flex flex-col items-center">
<div class="text-primary cursor-pointer" (click)="fileInput.click()" (dblclick)="$event.preventDefault()">
Browse files</div>
<input hidden type="file" #fileInput (click)="handleFileClick($event)" (change)="handleOnFileChange($event)"
name="file" placeholder="Choose file" (dblclick)="$event.preventDefault();" accept=".csv" />
name="file" placeholder="Choose file" (dblclick)="$event.preventDefault();" accept=".xlsx, .xls" />
<!-- <div class="flex">or</div>
<div class="flex">Drag file to upload</div> -->
</div>
<div class="flex flex-col items-center margin-bottom-m">
<div class="flex">Max file size: 100 MB</div>
<div class="flex">Supported file types: csv</div>
<div class="flex">Supported file types: xlsx</div>
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit 199d312

Please sign in to comment.