Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

develop to master #22

Merged
merged 23 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
e5bcc95
Update package.json
Vidyaaa24 Oct 4, 2023
13c1ca8
Create package-lock.json
Vidyaaa24 Oct 9, 2023
6f9b2ef
Delete .npmrc
Vidyaaa24 Oct 10, 2023
4a4884d
Merge pull request #10 from Vidyaaa24/develop
devikasuresh20 Oct 19, 2023
c5a625a
Client cross site scripting
swetatech24 Nov 6, 2023
82db146
Merge pull request #12 from swetatech24/develop
devikasuresh20 Nov 6, 2023
cf74346
Revert "Update package.json"
devikasuresh20 Nov 28, 2023
2ab2507
Merge pull request #14 from PSMRI/revert-10-develop
devikasuresh20 Nov 28, 2023
27e35a1
transfer drop down issue fix
Dec 4, 2023
c10dae2
Merge pull request #15 from KpParth/develop
devikasuresh20 Dec 19, 2023
4fa2270
Change in logic for transfer dropdown for call type valid
Dec 20, 2023
52d4fc2
small space correction
Dec 20, 2023
706fbc3
Merge pull request #16 from KpParth/develop
devikasuresh20 Dec 21, 2023
2bd3593
Change in condition
Dec 21, 2023
8236561
Merge branch 'develop' of https://github.com/KpParth/Helpline104-UI i…
Dec 21, 2023
7775cca
Merge pull request #17 from KpParth/develop
devikasuresh20 Dec 21, 2023
7f8d63c
change in logic for 104ui
Dec 21, 2023
f98ccdc
Merge pull request #18 from KpParth/develop
devikasuresh20 Dec 22, 2023
84f3bd7
CodeQl issue fixed: Use of password hash with insufficient computatio…
Jan 29, 2024
305f8d6
CodeQl issue fixed: Use of password hash with insufficient computatio…
Jan 30, 2024
1bfbf0d
Merge pull request #20 from pramit-d/develop
devikasuresh20 Jan 31, 2024
6a65134
Revert "CodeQl issue fixed: Use of password hash with insufficient co…
NeerajK007 Feb 5, 2024
06d7faa
Merge pull request #21 from PSMRI/revert-20-develop
devikasuresh20 Feb 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/closure/closure.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ <h4 class="f-s-b m-t-10 m-b-10">{{currentLanguageSet?.closure}}</h4>
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 p-b-1-5" *ngIf="validTrans">
<md-select [disabled]="disableTransfer" placeholder="{{currentLanguageSet?.transferCall}}" name="transferCall" [(ngModel)]="transferCall" (change)="chooseService(transferCall)" [style.width]="'100%'" [disabled]="current_campaign=='OUTBOUND'">
<md-option [value]="">Select none</md-option>
<md-option *ngFor="let availableService of services" [value]="availableService.subServiceName">{{availableService.subServiceName}}</md-option>
<md-option *ngFor="let availableService of transferCallArr" [value]="availableService.subServiceName">{{availableService.subServiceName}}</md-option>
</md-select>
</div>

Expand Down
96 changes: 90 additions & 6 deletions src/app/closure/closure.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { dataService } from "../services/dataService/data.service";
import { CallServices } from "../services/callservices/callservice.service";
import { FeedbackResponseModel } from "../sio-grievience-service/sio-grievience-service.component";
import { MdDialog } from "@angular/material";
import { Observable } from "rxjs/Rx";
import { Observable, Subscription } from "rxjs/Rx";
//import { Router } from '@angular/router';
import { Router } from "@angular/router";
import { ConfirmationDialogsService } from "./../services/dialog/confirmation.service";
Expand Down Expand Up @@ -139,6 +139,10 @@ export class ClosureComponent implements OnInit {
enableInstitute: boolean = false;
varRefral : any;
appointmnetSuccessFlag : boolean;
benDetailsSelectedData: any;
transferCallArr: Array<any> = [];
private benDetailSubscription: Subscription;


constructor(
public dialog: MdDialog,
Expand Down Expand Up @@ -205,6 +209,14 @@ export class ClosureComponent implements OnInit {
(err) => {}
);

this._availableServices.getServices(requestObject).subscribe(
(response) => {
// this.callTypeObj = response;
this.populateTransferDropDown(response);
},
(err) => { }
);

this.saved_data.serviceAvailed.subscribe((data) => {
this.serviceAvailed = true;
});
Expand Down Expand Up @@ -286,6 +298,10 @@ export class ClosureComponent implements OnInit {
})
.subscribe((response) => this.IDsuccessHandeler(response));
}

ngOnDestroy(){
this.benDetailSubscription.unsubscribe();
}
IDsuccessHandeler(res) {
this.commonData = res;
if (this.saved_data.caste) {
Expand Down Expand Up @@ -427,10 +443,25 @@ export class ClosureComponent implements OnInit {
// if(this.current_role=="Supervisor"){
// this.roleFlag=false;

if (callType == "Valid" || callType == "Transfer" || callType == "Referral") {
this.validTrans = true;
this.nuisanceBLock = false;
} else {
if (callType.toLowerCase() === "valid" || callType.toLowerCase() === "transfer" || callType.toLowerCase() === "referral") {
this.nuisanceBLock = false;
this.benDetailSubscription = this.saved_data.isBenDetails$.subscribe((value) => {
this.benDetailsSelectedData = value;
if(this.benDetailsSelectedData === null || this.benDetailsSelectedData === undefined || this.benDetailsSelectedData === ""){
if(callType.toLowerCase() === "transfer"){
this.validTrans = true;
}
else{
this.validTrans = false;
}
}
else{
this.validTrans = true;
}
});

}
else {
this.validTrans = false;
this.nuisanceBLock = true; // this is done to disable S & COntinue in case of incomplete
}
Expand Down Expand Up @@ -556,7 +587,6 @@ export class ClosureComponent implements OnInit {
values.isFollowupRequired = this.doFollow;
values.isTransfered = this.doTransfer;
values.isFeedback = this.isFeedbackRequiredFlag;

if (values.isFollowupRequired == undefined) {
values.isFollowupRequired = false;
}
Expand Down Expand Up @@ -615,8 +645,12 @@ export class ClosureComponent implements OnInit {
values.isCompleted = true;
this.updateOutboundCallStatus(values);
}
// this.benDetailSubscription.unsubscribe();
console.log("BEN DETAILS CHECK***");
this.saved_data.clearBenData();
this.checkForSubmitCloseBtnType(btnType);
}

},
(err) => {
console.log(err);
Expand All @@ -629,9 +663,12 @@ export class ClosureComponent implements OnInit {
);
}
this.submitContinueBtnType(btnType);

}

}


setbenRegID(values) {
if (this.saved_data !== undefined && this.saved_data !== null) {
this.beneficiaryDetails =
Expand Down Expand Up @@ -881,6 +918,7 @@ export class ClosureComponent implements OnInit {
transferToCampaign,
"success"
);

sessionStorage.removeItem("onCall");
sessionStorage.removeItem("CLI");
this.router.navigate(["/MultiRoleScreenComponent/dashboard"]);
Expand All @@ -898,6 +936,7 @@ export class ClosureComponent implements OnInit {
);
}
}

}

transferEmergencyCallSuccessHandeler(response, transferToCampaign) {
Expand Down Expand Up @@ -1516,4 +1555,49 @@ export class ClosureComponent implements OnInit {
}
})
}

populateTransferDropDown(response: any) {
// this.benDetailsSelectedData = this.saved_data.benDetailsSelected;
this.benDetailSubscription = this.saved_data.isBenDetails$.subscribe((value) => {
this.benDetailsSelectedData = value;

if ((this.current_role.toUpperCase() === "RO") && (this.benDetailsSelectedData === null || this.benDetailsSelectedData === undefined || this.benDetailsSelectedData === "")) {
if (response !== null && response !== undefined && response.length > 0) {
this.transferCallArr = response.filter(function (item) {
return item.subServiceName === 'Health Advisory Service';
});
}

}

else {
if (response !== null && response !== undefined && response.length > 0) {
this.transferCallArr = response;
// transferCallArr = response;
}
}
// transferDropdown();

});

// let transferCallArr : Array<any> = [];

// if ((this.current_role.toUpperCase() === "RO") && (this.benDetailsSelectedData === null || this.benDetailsSelectedData === undefined || this.benDetailsSelectedData === "")) {
// if (response !== null || response !== undefined || response.length > 0) {
// this.transferCallArr = response.filter(function (item) {
// return item.subServiceName === 'Health Advisory Service';
// });
// }

// }

// else {
// if (response !== null || response !== undefined || response.length > 0) {
// this.transferCallArr = response;
// // transferCallArr = response;
// }
// }

}

}
2 changes: 2 additions & 0 deletions src/app/innerpage/innerpage.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,8 @@ export class InnerpageComponent implements OnInit, OnDestroy {
this.selectedBenData.caste = res[0].i_bendemographics.communityName
? res[0].i_bendemographics.communityName
: undefined;

this.getCommonData.getBenDetailsOfCall(this.selectedBenData);
}
}

Expand Down
13 changes: 13 additions & 0 deletions src/app/services/dataService/data.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import { Injectable } from '@angular/core';

import { Http, Response } from '@angular/http';
import { BehaviorSubject } from 'rxjs';
import { Observable } from 'rxjs/Observable';
import { Subject } from 'rxjs/Subject';
import 'rxjs/add/operator/catch';
Expand Down Expand Up @@ -69,6 +70,9 @@ export class dataService {
outboundBloodReqtID: any;
avoidingEvent: boolean = false;
transactionId:any;
isBenDetails: any="";
isBenDetailsData = new BehaviorSubject(this.isBenDetails);
isBenDetails$ = this.isBenDetailsData.asObservable();

// bpQuestionTypeId = 18;
// diabeticQuestionTypeId = 19;
Expand Down Expand Up @@ -116,5 +120,14 @@ export class dataService {
benDataInRO: any;
apiCalledForInbound=false;
appLanguage:any="English";

getBenDetailsOfCall(value : any){
this.isBenDetails = value;
this.isBenDetailsData.next(this.isBenDetails);
}
clearBenData(){
this.isBenDetails = null;
this.isBenDetailsData.next(this.isBenDetails);
}

};
4 changes: 3 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.png">
<script>
document.write('<base href="' + encodeURIComponent(document.location) + '" />');
var baseTag = document.createElement('base');
baseTag.href = document.location.href;
document.head.appendChild(baseTag);
window.console.log = function() {}
window.console.warn = function() {}
</script>
Expand Down
Loading