Skip to content

Commit

Permalink
Merge pull request #26 from PSMRI/104-wasa
Browse files Browse the repository at this point in the history
104 wasa
  • Loading branch information
devikasuresh20 authored Jan 31, 2025
2 parents be8df31 + c609a24 commit 11971ee
Show file tree
Hide file tree
Showing 36 changed files with 379 additions and 176 deletions.
6 changes: 4 additions & 2 deletions src/app/104-hao/104-hao.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ declare var jQuery: any;
import { CallServices } from "../services/callservices/callservice.service";
import { SetLanguageComponent } from "app/set-language.component";
import { HttpServices } from "app/services/http-services/http_services.service";
import { sessionStorageService } from "app/services/sessionStorageService/session-storage.service";
@Component({
selector: "app-104-hao",
templateUrl: "./104-hao.component.html",
Expand All @@ -52,10 +53,11 @@ export class Hao_104_Component implements OnInit, OnChanges, DoCheck {
private dialogService: ConfirmationDialogsService,
public commonAppData: dataService,
private _callServices: CallServices,
private sessionstorage:sessionStorageService,
private httpServices: HttpServices
) {
if (sessionStorage.getItem("service") != undefined) {
this.outboundFor = sessionStorage.getItem("service");
if (this.sessionstorage.getItem("service") != undefined) {
this.outboundFor = this.sessionstorage.getItem("service");
} else {
this.outboundFor = "casesheet";
}
Expand Down
10 changes: 6 additions & 4 deletions src/app/104-ro/104-ro.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { CallServices } from "../services/callservices/callservice.service";
import { HttpServices } from "app/services/http-services/http_services.service";
import { SetLanguageComponent } from "app/set-language.component";
import { RegisterService } from "app/services/register-services/register-service";
import { sessionStorageService } from "app/services/sessionStorageService/session-storage.service";
@Component({
selector: "app-104-ro",
templateUrl: "./104-ro.component.html",
Expand Down Expand Up @@ -61,17 +62,18 @@ export class Ro_104_Component implements OnInit, DoCheck, OnChanges {
private callerService: CallerService,
private _callServices: CallServices,
private httpServices:HttpServices,
private sessionstorage:sessionStorageService,
private registerService: RegisterService,
) {}
ngOnInit() {
this.assignSelectedLanguage();
this.screens = this.getCommonData.screens;
this.disableClosure = false;
if (sessionStorage.getItem("CLI") != undefined) {
this.callerNumber = sessionStorage.getItem("CLI");
if (this.sessionstorage.getItem("CLI") != undefined) {
this.callerNumber = this.sessionstorage.getItem("CLI");
}
if (sessionStorage.getItem("session_id") != undefined) {
this.callerID = sessionStorage.getItem("session_id");
if (this.sessionstorage.getItem("session_id") != undefined) {
this.callerID = this.sessionstorage.getItem("session_id");
}
if (this.screens.includes("Health_Advice")) {
this.hasHAOpriveledge = true;
Expand Down
6 changes: 4 additions & 2 deletions src/app/104-sio/104-sio.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { OutboundListnerService } from "../services/common/outboundlistner.servi
import { CallServices } from "../services/callservices/callservice.service";
import { SetLanguageComponent } from "app/set-language.component";
import { HttpServices } from "app/services/http-services/http_services.service";
import { sessionStorageService } from "app/services/sessionStorageService/session-storage.service";
@Component({
selector: "app-104-sio",
templateUrl: "./104-sio.component.html",
Expand All @@ -43,6 +44,7 @@ export class Sio_104_Component implements OnInit, OnChanges, DoCheck {
private _router: Router,
private outboundService: OutboundListnerService,
private _callServices: CallServices,
private sessionstorage:sessionStorageService,
private httpServices: HttpServices
) {
this.outboundService.onCall.subscribe((data) => {
Expand All @@ -64,8 +66,8 @@ export class Sio_104_Component implements OnInit, OnChanges, DoCheck {

ngOnInit() {
this.assignSelectedLanguage();
if (sessionStorage.getItem("service") != undefined) {
this.outboundFor = sessionStorage.getItem("service");
if (this.sessionstorage.getItem("service") != undefined) {
this.outboundFor = this.sessionstorage.getItem("service");
}
this.current_campaign = this.getCommonData.current_campaign;
console.log("campaign: " + this.current_campaign);
Expand Down
10 changes: 6 additions & 4 deletions src/app/104/104.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { ConfirmationDialogsService } from "app/services/dialog/confirmation.ser
import { SearchService } from "app/services/searchBeneficiaryService/search.service";
import { CallerService } from "../services/common/caller.service";
import { dataService } from "../services/dataService/data.service";
import { sessionStorageService } from "app/services/sessionStorageService/session-storage.service";
declare var jQuery: any;

@Component({
Expand Down Expand Up @@ -55,6 +56,7 @@ export class Helpline_104_Component implements OnInit {
private _util: SearchService,
private callerService: CallerService,
public commonAppData: dataService,
private sessionstorage:sessionStorageService,
private alertMessage: ConfirmationDialogsService
) {}
ngOnInit() {
Expand All @@ -67,11 +69,11 @@ export class Helpline_104_Component implements OnInit {
this.hasHAOpriveledge = true;
}
this.current_campaign = this.commonAppData.current_campaign;
if (sessionStorage.getItem("CLI") != undefined) {
this.callerNumber = sessionStorage.getItem("CLI");
if (this.sessionstorage.getItem("CLI") != undefined) {
this.callerNumber = this.sessionstorage.getItem("CLI");
}
if (sessionStorage.getItem("session_id") != undefined) {
this.callerID = sessionStorage.getItem("session_id");
if (this.sessionstorage.getItem("session_id") != undefined) {
this.callerID = this.sessionstorage.getItem("session_id");
}
if (
this.current_role !== "Supervisor" &&
Expand Down
2 changes: 2 additions & 0 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ import { CounsellorHistory, Counsellor_104_Component } from './104-counsellor/10
import { ConsentFormComponent } from './104-consent/consent-form.component';
import { CheifComplaintSnomedSearchComponent } from './cheif-complaint-snomed-search/cheif-complaint-snomed-search.component';
import { ScheduleAppointmentComponent } from './schedule-appointment/schedule-appointment.component';
import { sessionStorageService } from './services/sessionStorageService/session-storage.service';



Expand Down Expand Up @@ -468,6 +469,7 @@ import { ScheduleAppointmentComponent } from './schedule-appointment/schedule-ap
providers: [loginService, dataService, DashboardHttpServices, HttpServices, SearchService, CoReferralService, SchemeService, CallServices,
CoCategoryService, FeedbackTypes, LocationService, UserBeneficiaryData, CoFeedbackService,
CzentrixServices, PrescriptionService, CaseSheetService, OtherHelplineService,
SioService, EpidemicServices, CDSSService, OrganDonationServices, BloodOnCallServices, CallerService, FoodSafetyServices, ConfigService,sessionStorageService,
SioService, EpidemicServices, CDSSService, OrganDonationServices, BloodOnCallServices, CallerService, FoodSafetyServices, ConfigService,
DiseaseScreeningService, OutboundSearchRecordService, OutboundCallAllocationService, OutboundReAllocationService,
OutboundWorklistService, AvailableServices, SupervisorCallTypeReportService, FeedbackService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ import * as moment from "moment";
import { HttpServices } from "../services/http-services/http_services.service";
import { SetLanguageComponent } from "app/set-language.component";
import { RegisterService } from "app/services/register-services/register-service";
import { sessionStorageService } from "app/services/sessionStorageService/session-storage.service";

@Component({
selector: "app-beneficiary-registration-104",
Expand Down Expand Up @@ -222,6 +223,7 @@ export class BeneficiaryRegistration104Component implements OnInit {
private _smsService: SmsTemplateService,
private fb: FormBuilder,
public HttpServices: HttpServices,
private sessionstorage:sessionStorageService,
private registerService: RegisterService,
) {}

Expand All @@ -236,12 +238,12 @@ export class BeneficiaryRegistration104Component implements OnInit {
this.checkHAOPrivilege();
this.IntializeSessionValues();
//this._util.getDistricts().subscribe(response => this.districts = this.successHandeler(response));
if (sessionStorage.getItem("CLI") != undefined) {
this.callerNumber = sessionStorage.getItem("CLI");
if (this.sessionstorage.getItem("CLI") != undefined) {
this.callerNumber = this.sessionstorage.getItem("CLI");
this.phoneNo = this.callerNumber;
}
if (sessionStorage.getItem("session_id") != undefined) {
this.callerID = sessionStorage.getItem("session_id");
if (this.sessionstorage.getItem("session_id") != undefined) {
this.callerID = this.sessionstorage.getItem("session_id");
}
this.emailPattern = /^[0-9a-zA-Z_.]+@[a-zA-Z_]+?\.\b(org|com|in|co.in)\b$/;
this.retrieveRegHistoryByPhoneNo(this.callerNumber);
Expand Down
8 changes: 5 additions & 3 deletions src/app/case-sheet/case-sheet.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import * as moment from "moment";
import { HttpServices } from "../services/http-services/http_services.service";
import { SetLanguageComponent } from "app/set-language.component";
import { CallerService } from "app/services/common/caller.service";
import { sessionStorageService } from "app/services/sessionStorageService/session-storage.service";

declare var jQuery: any;

Expand Down Expand Up @@ -258,6 +259,7 @@ export class CaseSheetComponent implements OnInit {
private snomedService: SnomedService,
private saved_data: dataService,
public HttpServices: HttpServices,
private sessionstorage:sessionStorageService,
// public router: Router,
public route: ActivatedRoute,
private _CDSSService: CDSSService,
Expand Down Expand Up @@ -320,8 +322,8 @@ export class CaseSheetComponent implements OnInit {
this.initiallyState();
this.initiallyCountry();
this.fetchCommonData();
if (sessionStorage.getItem("session_id") != undefined) {
this.callerID = sessionStorage.getItem("session_id");
if (this.sessionstorage.getItem("session_id") != undefined) {
this.callerID = this.sessionstorage.getItem("session_id");
}

this.current_role = this.saved_data.current_role;
Expand Down Expand Up @@ -2277,7 +2279,7 @@ fetchBenenficiaryDetails()
.substring(1)
.replace(/\$/g, ",");
}
if (sessionStorage.getItem("diseaseClose") == "False") {
if (this.sessionstorage.getItem("diseaseClose") == "False") {
// this.caseSheetForm.reset();
this.caseSheetForm.controls["diseasesSummary"].setValue(" ");
this.caseSheetForm.controls["informationGiven"].setValue(" ");
Expand Down
26 changes: 14 additions & 12 deletions src/app/closure/closure.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import { SetLanguageComponent } from "app/set-language.component";
import { CaseSheetService } from "app/services/caseSheetService/caseSheet.service";
import { ScheduleAppointmentComponent } from "app/schedule-appointment/schedule-appointment.component";
import { map } from "jquery";
import { sessionStorageService } from "app/services/sessionStorageService/session-storage.service";


declare var jQuery: any;
Expand Down Expand Up @@ -145,6 +146,7 @@ export class ClosureComponent implements OnInit {


constructor(
private sessionstorage:sessionStorageService,
public dialog: MdDialog,
public _userdata: UserBeneficiaryData,
private _callServices: CallServices,
Expand Down Expand Up @@ -439,7 +441,7 @@ export class ClosureComponent implements OnInit {
getCallSubType(callType: any, firstTime?) {
this.subCallTypeID = undefined;
this.callType = callType;
// this.current_role=sessionStorage.getItem("current_role")
// this.current_role=this.sessionstorage.getItem("current_role")
// if(this.current_role=="Supervisor"){
// this.roleFlag=false;

Expand Down Expand Up @@ -610,9 +612,9 @@ export class ClosureComponent implements OnInit {
values.fitToBlock = values.callTypeID.split(",")[1];
values.callTypeID = values.callTypeID.split(",")[0];
values.agentID = this.saved_data.agentID;
values.callID = sessionStorage.getItem("session_id");
values.callID = this.sessionstorage.getItem("session_id");
values.agentIPAddress = this.ipAddress;
values.callID = sessionStorage.getItem("session_id");
values.callID = this.sessionstorage.getItem("session_id");
if (btnType == "submitClose") {
values.endCall = true;
values.callEndUserID = this.saved_data.uid;
Expand Down Expand Up @@ -890,7 +892,7 @@ export class ClosureComponent implements OnInit {
transferCallToCampaign1(transferToCampaign, values) {
console.log("transfer camapign");
if (values) {
sessionStorage.setItem("callTransferred", transferToCampaign);
this.sessionstorage.setItem("callTransferred", transferToCampaign);
this.doTransfer = true;
this.transferCondition = transferToCampaign;
this.setbenRegID(values);
Expand Down Expand Up @@ -926,8 +928,8 @@ export class ClosureComponent implements OnInit {
"success"
);

sessionStorage.removeItem("onCall");
sessionStorage.removeItem("CLI");
this.sessionstorage.removeItem("onCall");
this.sessionstorage.removeItem("CLI");
this.router.navigate(["/MultiRoleScreenComponent/dashboard"]);
this.doTransfer = false;
// console.log("transferToCampaign response: " + JSON.stringify(response));
Expand Down Expand Up @@ -983,9 +985,9 @@ export class ClosureComponent implements OnInit {
this.message.alert(this.currentLanguageSet.pleaseConfigureTheCampaigns);
else if (!this.ipAddress) {
this.message.alert(this.currentLanguageSet.pleaseLoginToSoftPhone);
sessionStorage.removeItem("onCall");
sessionStorage.removeItem("CLI");
// sessionStorage.removeItem("session_id");
this.sessionstorage.removeItem("onCall");
this.sessionstorage.removeItem("CLI");
// this.sessionstorage.removeItem("session_id");
this.router.navigate(["/MultiRoleScreenComponent/dashoard"]);
} else if (this.subCallTypeID == undefined) {
this.message.alert(this.currentLanguageSet.pleaseSelectSubtypeToTransfer);
Expand Down Expand Up @@ -1120,9 +1122,9 @@ export class ClosureComponent implements OnInit {
this.currentLanguageSet.callTransferredTo + " " + this.transferCondition,
"success"
);
sessionStorage.removeItem("onCall");
sessionStorage.removeItem("CLI");
// sessionStorage.removeItem("session_id");
this.sessionstorage.removeItem("onCall");
this.sessionstorage.removeItem("CLI");
// this.sessionstorage.removeItem("session_id");
this.router.navigate(["/MultiRoleScreenComponent/dashboard"]);
}

Expand Down
7 changes: 4 additions & 3 deletions src/app/covid-19/covid-19.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import { IfObservable } from 'rxjs/observable/IfObservable';
import { CovidserviceService } from 'app/services/covidService/covidservice.service';
import { SetLanguageComponent } from 'app/set-language.component';
import { HttpServices } from 'app/services/http-services/http_services.service';
import { sessionStorageService } from 'app/services/sessionStorageService/session-storage.service';

declare var jQuery: any;

Expand Down Expand Up @@ -123,7 +124,7 @@ export class Covid19Component implements OnInit {
feverStatsList: any;
feverPatternList: any;
assignSelectedLanguageValue: any;
constructor(public getCommonData: dataService, private _userData: UserBeneficiaryData,
constructor(public getCommonData: dataService, private _userData: UserBeneficiaryData,private sessionstorage:sessionStorageService,
private _util: SearchService, private alertMessage: ConfirmationDialogsService,
private _locationService: LocationService, private caseSheetService: CaseSheetService, public covidService:CovidserviceService,
public httpServices:HttpServices
Expand Down Expand Up @@ -151,8 +152,8 @@ export class Covid19Component implements OnInit {
this.current_language_set = this.current_language;
}
this.current_campaign = this.getCommonData.current_campaign;
if (sessionStorage.getItem('session_id') != undefined) {
this.callerID = sessionStorage.getItem('session_id');
if (this.sessionstorage.getItem('session_id') != undefined) {
this.callerID = this.sessionstorage.getItem('session_id');
}
let obj = {
"beneficiaryRegID": this.beneficiaryRegID,
Expand Down
22 changes: 12 additions & 10 deletions src/app/dashboard-user-id/dashboardUserId.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { Subscription } from "rxjs/Subscription";
import { OutboundListnerService } from "../services/common/outboundlistner.service";
import { SetLanguageComponent } from "app/set-language.component";
import { HttpServices } from "app/services/http-services/http_services.service";
import { sessionStorageService } from "app/services/sessionStorageService/session-storage.service";
@Component({
selector: "dashboard-user-id",
templateUrl: "./dashboardUserId.html",
Expand All @@ -40,6 +41,7 @@ export class DashboardUserIdComponent implements OnInit, OnDestroy {
assignSelectedLanguageValue: any;

constructor(
private sessionstorage:sessionStorageService,
public dataSettingService: dataService,
private Czentrix: CzentrixServices,
public router: Router,
Expand Down Expand Up @@ -76,25 +78,25 @@ export class DashboardUserIdComponent implements OnInit, OnDestroy {
) {
/*First call landing to the agent (conditions related to auto call closure issue)*/
if (
!sessionStorage.getItem("session_id") &&
!sessionStorage.getItem("callTransferred")
!this.sessionstorage.getItem("session_id") &&
!this.sessionstorage.getItem("callTransferred")
) {
this.routeToInnerPage(res);
} else if (
sessionStorage.getItem("session_id") !== res.session_id
this.sessionstorage.getItem("session_id") !== res.session_id
) {
// If session id is different from previous session id then allow the call to drop
this.routeToInnerPage(res);
}
// else if (
// sessionStorage.getItem("session_id") === res.session_id && // on call transfer
// sessionStorage.getItem("callTransferred")
// this.sessionstorage.getItem("session_id") === res.session_id && // on call transfer
// this.sessionstorage.getItem("callTransferred")
// ) {
// this.routeToInnerPage(res);
// }
else if (
!sessionStorage.getItem("session_id") && // First call transfer cases
sessionStorage.getItem("callTransferred")
!this.sessionstorage.getItem("session_id") && // First call transfer cases
this.sessionstorage.getItem("callTransferred")
) {
this.routeToInnerPage(res);
} else {
Expand Down Expand Up @@ -135,9 +137,9 @@ export class DashboardUserIdComponent implements OnInit, OnDestroy {
session_id !== null &&
session_id !== ""
) {
sessionStorage.setItem("CLI", CLI);
sessionStorage.setItem("session_id", session_id);
sessionStorage.setItem("onCall", "yes");
this.sessionstorage.setItem("CLI", CLI);
this.sessionstorage.setItem("session_id", session_id);
this.sessionstorage.setItem("onCall", "yes");
this.dataSettingService.apiCalledForInbound = false;
this.router.navigate([
"/MultiRoleScreenComponent/RedirectToInnerpageComponent",
Expand Down
Loading

0 comments on commit 11971ee

Please sign in to comment.