Skip to content

Commit

Permalink
Merge pull request #30 from PSMRI/1097-wasa
Browse files Browse the repository at this point in the history
1097 wasa changes
  • Loading branch information
devikasuresh20 authored Jan 31, 2025
2 parents e8c5cb7 + 4331cf6 commit 1648901
Show file tree
Hide file tree
Showing 24 changed files with 3,447 additions and 2,154 deletions.
5,062 changes: 3,092 additions & 1,970 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
"xlsx": "0.13.0",
"zone.js": "0.8.11",
"uglify-js": "2.8.29"

},
"devDependencies": {
"@angular/cdk": "2.0.0-beta.11",
Expand Down Expand Up @@ -95,5 +94,5 @@
"resolutions": {
"@types/geojson": "7946.0.8"
},
"repository": "https://github.com/PSMRI/Helpline1097-UI.git"
"repository": "https://github.com/PSMRI/Helpline1097-UI.git"
}
16 changes: 9 additions & 7 deletions src/app/1097-co/1097-co.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import { CollapseDirective } from "./../directives/collapse/collapse.directive";
import { ClearFormService } from "./../services/common/clearform.service";
import { SetLanguageComponent } from "app/set-language.component";
import { HttpServices } from "../services/http-services/http_services.service";
import { sessionStorageService } from "app/services/sessionStorageService/session-storage.service";
@Component({
selector: "app-1097-co",
templateUrl: "./1097-co.component.html",
Expand Down Expand Up @@ -85,6 +86,7 @@ export class helpline1097CoComponent implements OnInit {

constructor(
public getCommonData: dataService,
private sessionstorage:sessionStorageService,
public basicrouter: Router,
public router: ActivatedRoute,
private configService: ConfigService,
Expand Down Expand Up @@ -121,12 +123,12 @@ export class helpline1097CoComponent implements OnInit {
let url =
this.configService.getTelephonyServerURL() + "bar/cti_handler.php";
this.ctiHandlerURL = this.sanitizer.bypassSecurityTrustResourceUrl(url);
if (sessionStorage.getItem("CLI") !== undefined) {
this.callerNumber = sessionStorage.getItem("CLI");
if (this.sessionstorage.getItem("CLI") !== undefined) {
this.callerNumber = this.sessionstorage.getItem("CLI");
this.getCommonData.callerNumber = this.callerNumber;
}
if (sessionStorage.getItem("session_id") !== undefined) {
this.getCommonData.callID = sessionStorage.getItem("session_id");
if (this.sessionstorage.getItem("session_id") !== undefined) {
this.getCommonData.callID = this.sessionstorage.getItem("session_id");
}
// this.router.params.subscribe((params: Params) => {
// if (params['mobileNumber'] != undefined) {
Expand All @@ -140,7 +142,7 @@ export class helpline1097CoComponent implements OnInit {

// });
this.disableBack = false;
this.isEverwell = sessionStorage.getItem("isEverwellCall");
this.isEverwell = this.sessionstorage.getItem("isEverwellCall");

this.submitCheck = this.getCommonData.checkEverwellResponse;
console.log("submitCheck", this.submitCheck);
Expand Down Expand Up @@ -285,8 +287,8 @@ export class helpline1097CoComponent implements OnInit {
closeCall(compain_type: any) {
this.getCommonData.current_campaign = compain_type;
this.getCommonData.isCallDisconnected = false;
sessionStorage.removeItem("isOnCall");
sessionStorage.removeItem("isEverwellCall");
this.sessionstorage.removeItem("isOnCall");
this.sessionstorage.removeItem("isEverwellCall");

this.basicrouter.navigate(["/MultiRoleScreenComponent/dashboard"], {
queryParams: { compain: compain_type },
Expand Down
5 changes: 3 additions & 2 deletions src/app/activity-this-week/activity-this-week.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { ConfirmationDialogsService } from 'app/services/dialog/confirmation.ser
import { Router } from '@angular/router';
import { SetLanguageComponent } from 'app/set-language.component';
import { HttpServices } from "../services/http-services/http_services.service";
import { sessionStorageService } from 'app/services/sessionStorageService/session-storage.service';
@Component({
selector: 'activity-this-week',
templateUrl: './activity-this-week.component.html',
Expand All @@ -46,7 +47,7 @@ export class ActivityThisWeekComponent implements OnInit {
@Output() hide_component: EventEmitter<any> = new EventEmitter<any>();
currentLanguageSet: any;

constructor(public getCommonData: dataService,
constructor(public getCommonData: dataService,private sessionstorage:sessionStorageService,
public notificationService: NotificationService,private HttpServices:HttpServices,
public dialog: MdDialog, private callService: CallServices, private message: ConfirmationDialogsService, public router: Router) {

Expand Down Expand Up @@ -136,7 +137,7 @@ agentLoginStatus(){
// this.router.navigate(['/MultiRoleScreenComponent/OutboundCallWorklistsComponent']);
// }
this.getCommonData.current_campaign = 'OUTBOUND';
sessionStorage.setItem("current_campaign", 'OUTBOUND');
this.sessionstorage.setItem("current_campaign", 'OUTBOUND');
this.router.navigate(['/MultiRoleScreenComponent/OutboundCallWorklistsComponent']);
}, (err) => {
let errorText: string;
Expand Down
3 changes: 2 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ import { searchIdDirective } from './directives/searchid/searchId.directive';
import { SmsTemplateDirective } from './directives/smsTemplate/smsTemplate.directive';
import { textareaDirectiveWithCopyPaste } from './directives/textarea/textareaDirectiveWithCopyPaste';
import { SmsTemplateDirectiveWithCopyPaste } from './directives/smsTemplate/smsTemplateWithcopypaste.directive';
import { sessionStorageService } from './services/sessionStorageService/session-storage.service';
// import { SetLanguageComponent } from './set-language.component';
//for text mask
// import { TextMaskModule } from 'angular2-text-mask';
Expand Down Expand Up @@ -411,7 +412,7 @@ import { SmsTemplateDirectiveWithCopyPaste } from './directives/smsTemplate/smsT
providers: [loginService, ClearFormService, dataService, DashboardHttpServices, SPService, RegisterService,
UserService, LanguageService, RoleService, ServicemasterService, ScreenService, HttpServices, HttpClientModule,
UserBeneficiaryData, LocationService, CoReferralService, CoFeedbackService, FeedbackTypes,
UpdateService, CallServices, ConfigService, Message, SupervisorCallTypeReportService, FeedbackService, AuthGuard, AuthGuard2, SocketService,
UpdateService, CallServices, ConfigService, Message, SupervisorCallTypeReportService, FeedbackService, AuthGuard, AuthGuard2, SocketService,sessionStorageService,
CoCategoryService, UploadServiceService, OutboundSearchRecordService, OutboundWorklistService,
OutboundCallAllocationService, NotificationService, ConfirmationDialogsService, LoaderService, ForceLogoutService,
CommunicationService, OutboundService, ListnerService, AuthService, OutboundReAllocationService, ReloadService, ReportsService,
Expand Down
6 changes: 4 additions & 2 deletions src/app/closure/closure.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import { SetLanguageComponent } from "app/set-language.component";
import { HttpServices } from "app/services/http-services/http_services.service";
import { Router } from "@angular/router";
import { environment } from "environments/environment";
import { sessionStorageService } from "app/services/sessionStorageService/session-storage.service";

@Component({
selector: "app-closure",
Expand Down Expand Up @@ -114,6 +115,7 @@ export class ClosureComponent implements OnInit {
private czentrixServices: CzentrixServices,
private clearfornData: ClearFormService,
private HttpServices: HttpServices,
private sessionstorage:sessionStorageService,
public router: Router
) {
this.subscription = this.pass_data.getData().subscribe((benData) => {
Expand All @@ -131,7 +133,7 @@ export class ClosureComponent implements OnInit {
this.saved_data.beneficiary_regID_subject.subscribe((response) => {
this.setBenRegID(response);
});
this.isEverwell = sessionStorage.getItem("isEverwellCall");
this.isEverwell = this.sessionstorage.getItem("isEverwellCall");
if (this.isEverwell === "yes") {
this.saved_data.everwellBeneficiarySelected.subscribe((response) => {
this.setEverwellBenRegID(response);
Expand Down Expand Up @@ -656,7 +658,7 @@ export class ClosureComponent implements OnInit {
this.saved_data.beneficiaryRegID = null;
}
showAlert() {
sessionStorage.removeItem("isOnCall");
this.sessionstorage.removeItem("isOnCall");
if (this.transferValid == true) {
this.message.alert(
this.currentLanguageSet.callTransferredSuccessfully,
Expand Down
20 changes: 11 additions & 9 deletions src/app/dashboard-user-id/dashboardUserId.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { Subscription } from "rxjs/Subscription";
import { CallServices } from "app/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: "dashboard-user-id",
Expand All @@ -45,6 +46,7 @@ export class DashboardUserIdComponent implements OnInit {
constructor(
public dataSettingService: dataService,
public router: Router,
private sessionstorage:sessionStorageService,
private callService: CallServices,
private Czentrix: CzentrixServices,
private message: ConfirmationDialogsService,
Expand Down Expand Up @@ -80,10 +82,10 @@ export class DashboardUserIdComponent implements OnInit {

if (
!this.dataSettingService.current_campaign &&
sessionStorage.getItem("current_campaign")
this.sessionstorage.getItem("current_campaign")
) {
this.dataSettingService.current_campaign =
sessionStorage.getItem("current_campaign");
this.sessionstorage.getItem("current_campaign");
}
if (res.data.dialer_type) {
if (res.data.dialer_type.toUpperCase() == "PROGRESSIVE") {
Expand Down Expand Up @@ -120,15 +122,15 @@ export class DashboardUserIdComponent implements OnInit {
.switchToOutbound(this.dataSettingService.cZentrixAgentID)
.subscribe(
(response) => {
sessionStorage.setItem("current_campaign", "OUTBOUND");
this.sessionstorage.setItem("current_campaign", "OUTBOUND");
this.callService.onceOutbound = true;
this.callService.onlyOutbound = false;
this.timerSubscription.unsubscribe();
console.log("outbound");
},
(err) => {
console.log("agent in not logged in");
sessionStorage.setItem("current_campaign", "OUTBOUND");
this.sessionstorage.setItem("current_campaign", "OUTBOUND");
}
);
}
Expand All @@ -146,10 +148,10 @@ export class DashboardUserIdComponent implements OnInit {
this.status.toUpperCase() === "INCALL" ||
this.status.toUpperCase() === "CLOSURE"
) {
if (!sessionStorage.getItem("session_id")) {
if (!this.sessionstorage.getItem("session_id")) {
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);
Expand All @@ -176,9 +178,9 @@ export class DashboardUserIdComponent implements OnInit {
session_id !== "undefined" &&
session_id !== ""
) {
sessionStorage.setItem("isOnCall", "yes");
sessionStorage.setItem("CLI", CLI);
sessionStorage.setItem("session_id", session_id);
this.sessionstorage.setItem("isOnCall", "yes");
this.sessionstorage.setItem("CLI", CLI);
this.sessionstorage.setItem("session_id", session_id);
this.dataSettingService.setUniqueCallIDForInBound = true;
this.router.navigate([
"/MultiRoleScreenComponent/RedirectToInnerpageComponent",
Expand Down
30 changes: 16 additions & 14 deletions src/app/dashboard/dashboard.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import { ToasterService, ToasterConfig } from "angular2-toaster";
import { Subscription } from "rxjs/Subscription";
import { HttpServices } from "../services/http-services/http_services.service";
import { SetLanguageComponent } from "app/set-language.component";
import { sessionStorageService } from "app/services/sessionStorageService/session-storage.service";

@Component({
selector: "dashboard-component",
Expand Down Expand Up @@ -75,6 +76,7 @@ export class dashboardContentClass implements OnInit {
constructor(
public dataSettingService: dataService,
public router: Router,
private sessionstorage:sessionStorageService,
public activeRoute: ActivatedRoute,
private configService: ConfigService,
public sanitizer: DomSanitizer,
Expand Down Expand Up @@ -166,7 +168,7 @@ export class dashboardContentClass implements OnInit {
}
}
setCampaign() {
sessionStorage.removeItem("current_campaign");
this.sessionstorage.removeItem("current_campaign");
this.current_role = this.dataSettingService.current_role.RoleName;
let current_roleID = this.dataSettingService.current_role.RoleID;
this.dataSettingService.inboundOutbound$.subscribe((response) => {
Expand All @@ -188,7 +190,7 @@ export class dashboardContentClass implements OnInit {
this.outboundCall = true;
} else {
this.dataSettingService.current_campaign = "INBOUND";
sessionStorage.setItem("current_campaign", "INBOUND");
this.sessionstorage.setItem("current_campaign", "INBOUND");
this.dataSettingService.isOutBoundSelected = false;
this.inOutBound = "1";
this.inboundCall = true;
Expand All @@ -199,7 +201,7 @@ export class dashboardContentClass implements OnInit {
role.inbound === true
) {
this.dataSettingService.current_campaign = "INBOUND";
sessionStorage.setItem("current_campaign", "INBOUND");
this.sessionstorage.setItem("current_campaign", "INBOUND");
this.dataSettingService.isOutBoundSelected = false;
this.dataSettingService.outboundSelectedManual = false;
this.dataSettingService.onlyOutboundAvailable = false;
Expand All @@ -217,7 +219,7 @@ export class dashboardContentClass implements OnInit {
.switchToOutbound(this.dataSettingService.cZentrixAgentID)
.subscribe(
(response) => {
sessionStorage.setItem("current_campaign", "OUTBOUND");
this.sessionstorage.setItem("current_campaign", "OUTBOUND");
this.dataSettingService.isOutBoundSelected = true;
console.log("outbound");
},
Expand All @@ -229,7 +231,7 @@ export class dashboardContentClass implements OnInit {
) {
this.dataSettingService.isOutBoundSelected = true;
}
sessionStorage.setItem("current_campaign", "OUTBOUND");
this.sessionstorage.setItem("current_campaign", "OUTBOUND");
}
);
if (
Expand All @@ -250,7 +252,7 @@ export class dashboardContentClass implements OnInit {
this.data = this.dataSettingService.Userdata;
this.current_service = this.dataSettingService.current_service.serviceName;
this.current_role = this.dataSettingService.current_role.RoleName;
let campaign = sessionStorage.getItem("current_campaign");
let campaign = this.sessionstorage.getItem("current_campaign");
// if(campaign != null && campaign != undefined && campaign !== "OUTBOUND"){
this.addListener();
this.listenCall = this.renderer.listenGlobal(
Expand Down Expand Up @@ -302,10 +304,10 @@ export class dashboardContentClass implements OnInit {
this.eventSpiltData[2] !== null &&
this.eventSpiltData[2] !== ""
) {
if (!sessionStorage.getItem("session_id")) {
if (!this.sessionstorage.getItem("session_id")) {
this.handleEvent();
} else if (
sessionStorage.getItem("session_id") !== this.eventSpiltData[2]
this.sessionstorage.getItem("session_id") !== this.eventSpiltData[2]
) {
// If session id is different from previous session id then allow the call to drop
this.handleEvent();
Expand All @@ -318,7 +320,7 @@ export class dashboardContentClass implements OnInit {

handleEvent() {
if (this.eventSpiltData.length > 2) {
sessionStorage.setItem("isOnCall", "yes");
this.sessionstorage.setItem("isOnCall", "yes");
const mobileNumber = this.eventSpiltData[1].replace(/\D/g, "");
const checkNumber = /^\d+$/;
const sessionVar = /^\d{10}\.\d{10}$/;
Expand All @@ -330,9 +332,9 @@ export class dashboardContentClass implements OnInit {
checkCallType.test(this.eventSpiltData[3])
) {
this.dataSettingService.setUniqueCallIDForInBound = true;
sessionStorage.setItem("CLI", this.eventSpiltData[1]);
sessionStorage.setItem("session_id", this.eventSpiltData[2]);
sessionStorage.setItem("callCategory", this.eventSpiltData[3]);
this.sessionstorage.setItem("CLI", this.eventSpiltData[1]);
this.sessionstorage.setItem("session_id", this.eventSpiltData[2]);
this.sessionstorage.setItem("callCategory", this.eventSpiltData[3]);
this.router.navigate([
"/MultiRoleScreenComponent/RedirectToInnerpageComponent",
]);
Expand Down Expand Up @@ -374,7 +376,7 @@ export class dashboardContentClass implements OnInit {
this.dataSettingService.current_campaign = "INBOUND";
this.dataSettingService.isOutBoundSelected = false;
this.dataSettingService.outboundSelectedManual = false;
sessionStorage.setItem("current_campaign", "INBOUND");
this.sessionstorage.setItem("current_campaign", "INBOUND");
},
(err) => {
this.message.alert(err.errorMessage, "error");
Expand All @@ -397,7 +399,7 @@ export class dashboardContentClass implements OnInit {
this.dataSettingService.current_campaign = "OUTBOUND";
this.dataSettingService.isOutBoundSelected = true;
this.dataSettingService.outboundSelectedManual = true;
sessionStorage.setItem("current_campaign", "OUTBOUND");
this.sessionstorage.setItem("current_campaign", "OUTBOUND");
},
(err) => {
this.message.alert(err.errorMessage, "error");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { CzentrixServices } from './../services/czentrix/czentrix.service';
import { OutboundReAllocationService } from "../services/outboundServices/outbound-call-reallocation.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-everwell-outbound-worklist',
Expand All @@ -43,7 +44,7 @@ export class EverwellOutboundWorklistComponent implements OnInit {
filteredsearchResult: any = [];
currentLanguageSet: any;
benDetailsList: any;
constructor(private cz_service : CzentrixServices, private _outBoundService: CallServices, private OCRService: OutboundReAllocationService,
constructor(private cz_service : CzentrixServices,private sessionstorage:sessionStorageService, private _outBoundService: CallServices, private OCRService: OutboundReAllocationService,
public alertService: ConfirmationDialogsService, private _common: dataService, public router: Router,
private HttpServices:HttpServices) {
}
Expand Down Expand Up @@ -104,8 +105,8 @@ export class EverwellOutboundWorklistComponent implements OnInit {

// this._dataServivce.outboundBenID = data.beneficiary.beneficiaryRegID;
// this._dataServivce.outboundCallReqID = data.outboundCallReqID;
sessionStorage.setItem("isOnCall", "yes");
sessionStorage.setItem("isEverwellCall", "yes");
this.sessionstorage.setItem("isOnCall", "yes");
this.sessionstorage.setItem("isEverwellCall", "yes");
// this._dataServivce.isSelf = data.isSelf;
}
}, (err) => {
Expand Down
Loading

0 comments on commit 1648901

Please sign in to comment.