@csmart/ngc-smart-victim 0.1.3 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- package/bundles/csmart-ngc-smart-victim.umd.js +146 -93
- package/bundles/csmart-ngc-smart-victim.umd.js.map +1 -1
- package/bundles/csmart-ngc-smart-victim.umd.min.js +2 -2
- package/bundles/csmart-ngc-smart-victim.umd.min.js.map +1 -1
- package/csmart-ngc-smart-victim.metadata.json +1 -1
- package/esm2015/lib/contact/contact.component.js +8 -4
- package/esm2015/lib/smart-victim-detail/smart-victim-detail.component.js +53 -53
- package/esm2015/lib/smart-victim.component.js +85 -37
- package/esm2015/lib/smart-victim.module.js +3 -2
- package/esm5/lib/contact/contact.component.js +8 -4
- package/esm5/lib/smart-victim-detail/smart-victim-detail.component.js +53 -53
- package/esm5/lib/smart-victim.component.js +86 -35
- package/esm5/lib/smart-victim.module.js +3 -2
- package/fesm2015/csmart-ngc-smart-victim.js +142 -92
- package/fesm2015/csmart-ngc-smart-victim.js.map +1 -1
- package/fesm5/csmart-ngc-smart-victim.js +143 -90
- package/fesm5/csmart-ngc-smart-victim.js.map +1 -1
- package/lib/smart-victim.component.d.ts +9 -2
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/tslib/tslib.es6.js","ng://@csmart/ngc-smart-victim/lib/smart-victim.model.ts","ng://@csmart/ngc-smart-victim/lib/smart-victim.service.ts","ng://@csmart/ngc-smart-victim/lib/intake.service.ts","ng://@csmart/ngc-smart-victim/lib/smart-victim.component.ts","ng://@csmart/ngc-smart-victim/lib/common-dialog/common-dialog.component.ts","ng://@csmart/ngc-smart-victim/lib/common-dialog/common-dialog.service.ts","ng://@csmart/ngc-smart-victim/lib/smart-victim-detail/smart-victim-detail.component.ts","ng://@csmart/ngc-smart-victim/lib/smart-victim-delete-confirm.component.ts","ng://@csmart/ngc-smart-victim/lib/shared/app.shared.module.ts","ng://@csmart/ngc-smart-victim/lib/common-dialog/common-dialog.module.ts","ng://@csmart/ngc-smart-victim/lib/shared/validators/date.validator.ts","ng://@csmart/ngc-smart-victim/lib/caseNote/caseNote.component.ts","ng://@csmart/ngc-smart-victim/lib/contact/contact.component.ts","ng://@csmart/ngc-smart-victim/lib/safetyPlan/victimSafetyPlan.component.ts","ng://@csmart/ngc-smart-victim/lib/safetyPlan/serviceProvider.component.ts","ng://@csmart/ngc-smart-victim/lib/safetyPlan/victimSafetyPlanDetail.component.ts","ng://@csmart/ngc-smart-victim/lib/victim-routing.module.ts","ng://@csmart/ngc-smart-victim/lib/victimSearch/VictimSearchFilter.ts","ng://@csmart/ngc-smart-victim/lib/victimSearch/victimSearchForm.component.ts","ng://@csmart/ngc-smart-victim/lib/shared/directives/phone-mask.directive.ts","ng://@csmart/ngc-smart-victim/lib/smart-victim.module.ts"],"names":["__read","o","n","m","Symbol","iterator","r","e","i","call","ar","next","done","push","value","error","__spread","arguments","length","concat","SMART_OFFENDER_SERVICE_URL","InjectionToken","SMART_LOOKUP_SERVICE_URL","SMART_VICTIM_SERVICE_URL","SMART_WARRANT_URL","VictimListFilter","VictimAdvocate","victimAdvocateId","lastName","firstName","prefixId","suffixId","addressId","noPhoneFlag","homePhone","workPhone","cellPhone","email","modifiedBy","this","VictimWeaponUse","victimId","weaponTypeId","otherWeapon","VictimDrugUse","drugTypeId","otherDrug","VictimSupport","victimSupportTypeId","VictimGuardian","victimGuardianId","birthDate","Victim","offenderId","underSupervisionFlag","victimOffenderRelationshipTypeId","middleName","genderCode","minorFlag","victimAdvocateFlag","guardianFirstName","guardianLastName","guardianPrefixId","guardianSuffixId","guardianNoPhoneFlag","guardianHomePhone","guardianWorkPhone","guardianCellPhone","guardianEmail","guardianAddressId","guardianBirthDate","advocateFirstName","advocateLastName","advocatePrefixId","advocateSuffixId","advocateNoPhoneFlag","advocateHomePhone","advocateWorkPhone","advocateCellPhone","advocateEmail","advocateAddressId","emergencyContact","emergencyContactPhone","commonChildrenFlag","commonChildrenNumber","cpoExpirationFlag","cpoExpirationDate","supportInPlaceFlag","weaponInvolvedFlag","drugUseFlag","alcoholUseFlag","accessRisk","relationship","vVictimAdvocate","vVictimGuardian","victimSupports","victimWeaponUses","victimDrugUses","allowCsosaContactFlag","headers","HttpHeaders","Content-Type","options","NgcSmartVictimService","http","smartOffenderServiceUrl","smartLookupServiceUrl","smartVictimServiceUrl","apollo","serviceApiUrl","prototype","handleError","console","observableThrowError","json","getDrugsTypes","get","pipe","map","res","getDocketList","queryString","post","query","_a","data","log","findDockets","getSupportTypes","getPrefixes","getSuffixes","getRelationshipTypes","getGenders","getWeaponTypes","getFlagOptionYesNoUnknowns","getContactTypes","getContactMethods","getContactBys","getVictimContactPurposes","getVictimServiceTypes","getVictimServiceStatus","getvVictimServiceTypeProgramProviders","getVictim","val","getVictimAdvocate","getVictimGuardian","postVictims","tempVal","JSON","stringify","putVictims","id","put","putVictimAdvocate","body","postVictimAdvocate","putVictimGuardian","postVictimGuardian","getVictimDrugUse","putVictimDrugUse","postVictimDrugUse","putVictimWeaponUse","postVictimWeaponUse","putVictimSupport","postVictimSupport","deleteVictims","delete","getVictims","catchError","getVictimsByFilter","filter","getVictimListByFilter","getCasetNotes","addCaseNote","caseNote","updateCaseNote","victimCaseNoteId","deleteCaseNote","staffId","getContacts","addContact","contact","updateContact","victimContactId","getSafetyPlans","getVictimServices","victimServiceId","getVictimServiceDetail","addSafetyPlan","victimSafetyPlan","updateSafetyPlan","addVictimServiceStatus","victimServiceStatusHistory","getServiceStatusHistories","deleteSafetyPlan","addPlanProvider","victimServiceDetail","deleteProvider","victimProgramProviderId","Injectable","args","providedIn","HttpClient","Inject","Apollo","Headers","IntakeServicesComponent","getIntakeByOffender","updateIntakeSteps","intakeStepStatus","IntakeStep","PhysicalInformation","Photo","HousingInformation","DocketInformation","Alias","IntakeBasicInformation","ContactInformation","DeceasedInformation","DriversLicense","EmploymentInformation","GangAffiliation","HealthInsurance","Identification","InternetIdentifier","MilitaryService","School","SelectiveService","Vehicle","VictimInformation","WarrantInformation","RunningRecord","Signature","NgcSmartVictimComponent","dialog","victimService","router","route","snackBar","intakeService","smartWarrantUrl","document","victims","victimDetail","showDetail","victimListFilter","victimListDataSource","MatTableDataSource","doSpin","showListFlag","msg","isIntake","applyFilter","filterValue","trim","toLowerCase","addRecord","showAdd","editVictimDetail","record","save","detail","cancel","ngAfterViewInit","paginator","sort","ngOnInit","_this","snapshot","myPath","url","slice","intakeFlag","displayedColumns","showRelationshipColumn","showOffenderNameColumn","showOffenderPhoneColumn","showSearchForm","myOffenderId","accessByModule","showEdit","showCaseNote","showSafetyPlan","selectedOffender","pdid","subscribe","forEach","d","formatPhoneNumber","phoneNumberString","match","replace","saveIntake","intakeStep","intakeStepId","open","duration","location","href","goToCaseNote","navigate","goToSaftyPlan","getVictimList","err","Component","selector","template","MatDialog","Router","ActivatedRoute","MatSnackBar","DOCUMENT","Input","ViewChild","MatPaginator","MatSort","CommonDialogComponent","commondialogRef","cmdYesTitle","cmdNoTitle","MatDialogRef","CommonDialogService","confirm","title","message","dialogRef","componentInstance","afterClosed","warning","cmdOkTitle","conditionalValidator","predicate","validator","errorNamespace","formControl","parent","customError","stringConditionalValidator","SmartVictimDetailComponent","formBuilder","commonDialogService","onSave","EventEmitter","onCancel","hidden","victimAdvocate","victimGuardian","guardianTabFlag","advocateTabFlag","commonChildrenDivFlag","cpoExpirationDivFlag","supportInPlaceDivFlag","weaponInvolvedDivFlag","drugUseDivFlag","showDelete","datePipe","DatePipe","emailPattern","phoneNumber","editVictim","otherWeaponFlag","otherDrugFlag","contactDataSource","guardianPhoneExistFlag","advocatePhoneExistFlag","phoneValidationFlag","guaridanNoPhoneChkFlag","advocateNoPhoneChkFlag","addressValidators","street","street2","city","stateCode","zipCode","psaCode","initForm","victimForm","group","FormControl","Validators","compose","required","pattern","emergencyChildren","emergencyCpo","emergencyDrug","emergencySupport","emergencyWeapon","drug","weapon","support","markAsPristine","markAsUntouched","_getVictim","editMode","undefined","sub","params","victim","supportsData","t","setValue","weaponUsesData","drugUseData","contactList","patchValue","ngOnChanges","onAddressChange","onGuardianAddressChange","MyGuardianAddressId","onAdvocateAddressChange","MyAdvocateAddressId","reset","requiredImplementation","_required","ngControl","control","emptyValueControl","Object","assign","set","coerceBooleanProperty","defineProperty","MatInput","MatSelect","MatRadioGroup","setValidators","items","flagOption","genders","prefixes","suffixes","relationshipTypes","y","relationshipCategoryId","victimSupportTypes","weaponTypes","drugs","name","valueChanges","updateValueAndValidity","back","emit","deleteVictim","result","radioMinorChange","$event","guardianLastNameControl","guardianFirstNameControl","clearValidators","radioAdvocateChange","advocateLastNameControl","advocateFirstNameControl","radioCicChange","type","radioSupportChange","radioWeaponChange","radioDrugChange","radioCpoChange","handleDOBChange","ageDifMs","Date","now","ageDate","Math","abs","getUTCFullYear","checkOtherWeapon","WeaponUse","otherWeaponControl","includes","checkOtherDrug","DrugUse","otherDrugControl","saveVictim","guardianCellhone","advocateCellhone","myVictimSupports","element","victimSupport","myVictimDrugUses","victimDrugUse","myVictimWeaponUses","victimWeaponUse","newVictim","transform","startDate","word","resp","formatLabel","providers","Location","FormBuilder","Output","SmartVictimDeleteConfirmComponent","onNoClick","close","MAT_DIALOG_DATA","SharedModule","NgModule","imports","MatButtonModule","MatCardModule","MatCheckboxModule","MatToolbarModule","MatSelectModule","MatDatepickerModule","MatNativeDateModule","MatDialogModule","MatTabsModule","MatListModule","MatInputModule","MatStepperModule","BrowserAnimationsModule","MatGridListModule","MatProgressSpinnerModule","MatTableModule","MatSidenavModule","MatRadioModule","MatIconModule","MatSliderModule","MatChipsModule","MatSnackBarModule","CdkTableModule","MatSortModule","MatPaginatorModule","MatExpansionModule","MatRippleModule","exports","entryComponents","CommonDialogModule","declarations","dateValidator","dateStr","date","CaseNoteComponent","_victimServicesComponent","smartAuthService","editCaseNote","caseNoteDataSource","caseNoteForm","caseNoteDate","contactType","contactPurpose","comment","setPermission","loginStaff","addDisableFlag","hiddenDetailFlag","hiddenAddNewFlag","victimName","contactTypes","contactPurposes","caseNoteList","onEditCaseNote","find","x","onDeleteCaseNote","onAddNew","caseNoteDateControl","setErrors","contactTypeControl","contactPurposeControl","commentControl","saveCaseNote","castNote","contactTypeId","victimContactPurposeId","victimContactPurpose","victimFirstName","victimLastName","SmartAuthService","ContactComponent","editContact","staff","contactForm","FormGroup","contactDate","contactMethod","contactBy","nextContactDate","fullName","contactMethods","onEditContact","saveContact","victimContactMethodId","contactedByName","contactedBy","VictimSafetyPlanComponent","editSafetyPlan","safetyPlanDataSource","victimSafetyPlans","victimServiceStatusHistories","goToSafetyPlanDetail","onDeleteSafetyPlan","SeriveProviderComponent","spForm","voteeProviderId","serviceTypeId","programProviders","victimServiceTypeId","VictimSafetyPlanDetailComponent","providerListCollection","serviceCheck","victimServiceStatusHistoriesDataSource","serviceGoal","goalStatus","goalStatusDate","isDisplay","victimServiceTypes","victimServiceStatus","loadProvider","isInArray","providerListCollectionKey","serviceTypeName","event","checked","j","groupId","width","serviceType","providerCollections","panelClass","savePlanProvider","providerList","create","vVictimServiceDetails","toString","collection","evaluateSelection","findIndex","safetyPlan","goal","victimServiceStatusId","status","itms","victimServiceStatusHistoryId","victimServiceDetailId","victimProgramProvider","reload","saveSafetyPlan","routes","path","component","pathMatch","canActivate","MsalGuard","resolve","LoginStaffResolverService","SelectedOffenderResolverService","SmartErrorComponent","VictimRoutingModule","RouterModule","forChild","VictimListFilter$1","VictimSearchFormComponent","onSearch","change","onChange","encapsulation","ViewEncapsulation","None","PhoneMaskDirective","el","renderer","_phoneControl","_preValue","ngOnDestroy","preInputValue","lastChar","substr","newVal","start","selectRootElement","selectionStart","end","selectionEnd","emitEvent","setSelectionRange","removedD","charAt","Directive","ElementRef","Renderer2","COMPONENTS","ENTRY_COMPONENTS","BASE_MODULES","CommonModule","ReactiveFormsModule","CORE_MODULES","SmartAddressModule","MATERIAL_MODULES","MatSlideToggleModule","MatButtonToggleModule","MatMenuModule","MatProgressBarModule","LayoutModule","NgcSmartVictimModule","FormsModule","ApolloModule"],"mappings":";;;;;;;;;;;;;;oFA8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AQ3S,KAAA,CAAC,CACR2U,aAAYngB,EAAM4pB,GAAU,CAC1BrJ,EACAqC,EACAgB,EACAa,EACAsD,GACA5D,IAEF/F,QAAOpe,EACF8pB,GACAK,GACAF,GAAY,CACf/J,EACAwK,EAAAA,YACA/C,GACAgD,EAAAA,eAKF3K,QAAOhgB,EAAM4pB,GAAU,CAACe,EAAAA,eACxB1K,gBAAejgB,EAAM6pB,GAAgB,CAAC1F,IACtCzG,UAAW,CAAEnY,OAEqBklB,EAzBpC","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import { InjectionToken } from '@angular/core';\r\n\r\n\r\nexport const SMART_OFFENDER_SERVICE_URL = new InjectionToken<string>('smart offender service url');\r\nexport const SMART_LOOKUP_SERVICE_URL = new InjectionToken<string>('smart lookup service url');\r\nexport const SMART_VICTIM_SERVICE_URL = new InjectionToken<string>('smart victim service url');\r\nexport const SMART_WARRANT_URL = new InjectionToken<string>('smart warrant web url');\r\n\r\n\r\nexport interface ElementsVictim {\r\n victimId: string;\r\n victimType: string;\r\n victimProvider: string;\r\n victimPolicyHolder: string;\r\n startDate: string;\r\n endDate: string;\r\n isActive: boolean;\r\n}\r\n\r\nexport class VictimListFilter {\r\n \r\n offenderId: number;\r\n lastName: string;\r\n firstName: string;\r\n pdid: string;\r\n birthDate: Date;\r\n \r\n}\r\n\r\n\r\n\r\nexport class VictimAdvocate {\r\n constructor(public victimAdvocateId: number,\r\n\r\n public lastName: string,\r\n\r\n public firstName: string,\r\n\r\n public prefixId: string,\r\n\r\n public suffixId: string,\r\n\r\n public addressId: number,\r\n\r\n public noPhoneFlag: boolean,\r\n\r\n public homePhone: string,\r\n\r\n public workPhone: string,\r\n\r\n public cellPhone: string,\r\n\r\n public email: string,\r\n\r\n public modifiedBy: number\r\n\r\n \r\n) { }\r\n}\r\n\r\n\r\nexport class VictimWeaponUse {\r\n constructor(\r\n // public victimWeaponUseId: number,\r\n\r\n public victimId: number,\r\n\r\n public weaponTypeId: string,\r\n\r\n public otherWeapon: string,\r\n\r\n public modifiedBy: number\r\n\r\n ) { }\r\n}\r\n\r\nexport class VictimDrugUse {\r\n constructor(\r\n //public victimDrugUseId: number,\r\n\r\n public victimId: number,\r\n\r\n public drugTypeId: string,\r\n\r\n public otherDrug: string,\r\n\r\n public modifiedBy: number\r\n\r\n ) { }\r\n}\r\n\r\n\r\n\r\n\r\nexport class VictimSupport {\r\n constructor(\r\n // public victimSupportId: number,\r\n\r\n public victimId: number,\r\n\r\n public victimSupportTypeId: string,\r\n\r\n public modifiedBy: number\r\n\r\n ) { }\r\n}\r\n\r\nexport class VictimGuardian {\r\n constructor(public victimGuardianId: number,\r\n\r\n public lastName: string,\r\n\r\n public firstName: string,\r\n\r\n public prefixId: string,\r\n\r\n public suffixId: string,\r\n\r\n public birthDate: string,\r\n\r\n public addressId: number,\r\n\r\n public noPhoneFlag: boolean,\r\n\r\n public homePhone: string,\r\n\r\n public workPhone: string,\r\n\r\n public cellPhone: string,\r\n\r\n public email: string,\r\n\r\n public modifiedBy: number\r\n \r\n \r\n\r\n ) { }\r\n}\r\n\r\nexport interface CaseNote {\r\n victimId: number;\r\n victimCaseNoteId: number;\r\n caseNoteDate: Date;\r\n contactTypeId: string;\r\n contactType: string;\r\n victimContactPurposeId: string;\r\n victimContactPurpose: string;\r\n comment: string;\r\n modifiedBy: number;\r\n victimFirstName: string;\r\n victimLastName: string;\r\n \r\n}\r\n\r\nexport interface Contact {\r\n victimId: number;\r\n victimContactId: number;\r\n contactDate: Date;\r\n victimContactMethodId: string;\r\n contactMethod: string;\r\n contactedBy: number;\r\n contactedByName: string;\r\n nextContactDate: Date;\r\n comment: string;\r\n modifiedBy: number;\r\n\r\n \r\n}\r\n\r\n\r\nexport interface VictimSafetyPlan {\r\n victimId: number;\r\n fullName: string;\r\n victimServiceId: number;\r\n goal:string;\r\n comment: string;\r\n modifiedBy: number;\r\n victimServiceStatusId: string;\r\n status: string;\r\n startDate: Date;\r\n vVictimServiceDetails: VictimServiceDetail[];\r\n victimName: String;\r\n \r\n \r\n}\r\n\r\nexport interface VictimServiceDetail{\r\n victimServiceId: number;\r\n victimServiceDetailId: number;\r\n victimServiceTypeId: string;\r\n victimProgramProviderId: string;\r\n victimProgramProvider: string;\r\n modifiedBy: number;\r\n\r\n\r\n}\r\nexport interface VictimServiceStatusHistory{\r\n\r\n victimServiceStatusHistoryId: number;\r\n victimServiceId: string;\r\n victimServiceStatusId: string;\r\n startDate: Date;\r\n comment: string;\r\n modifiedBy: number;\r\n}\r\n\r\n\r\nexport interface VictimServiceTypeProgramProviderModel {\r\n victimServiceTypeProgramProviderId: number; \r\n victimServiceType: string;\r\n victimProgramProviderId: string;\r\n victimServiceTypeId:string;\r\n victimProgramProvider: string;\r\n }\r\n \r\n export interface ProviderListCollectionModel{\r\n groupId:string;\r\n isDisplay:boolean;\r\n collection:VictimServiceTypeProgramProviderModel[];\r\n }\r\n\r\n\r\n\r\n export interface ProvidersDialogData {\r\n //iepAction: IepAction;\r\n serviceType;\r\n serviceTypeId;\r\n providerCollections: [];\r\n }\r\n\r\n\r\n export class Victim {\r\n constructor(\r\n public victimId: number,\r\n public offenderId: number,\r\n public underSupervisionFlag: string,\r\n public victimOffenderRelationshipTypeId: string,\r\n public lastName: string,\r\n public firstName: string,\r\n public middleName: string,\r\n public prefixId: string | null,\r\n public suffixId: string | null,\r\n public birthDate: string,\r\n public genderCode: string,\r\n public homePhone: string,\r\n public workPhone: string,\r\n public cellPhone: string,\r\n public email: string,\r\n public addressId: number,\r\n public minorFlag: boolean,\r\n public victimAdvocateFlag: string,\r\n\r\n public guardianFirstName: string,\r\n public guardianLastName: string,\r\n public guardianPrefixId: string,\r\n public guardianSuffixId: string,\r\n public guardianNoPhoneFlag: boolean,\r\n public guardianHomePhone: string,\r\n public guardianWorkPhone: string,\r\n public guardianCellPhone: string,\r\n public guardianEmail: string,\r\n public guardianAddressId: number,\r\n public guardianBirthDate: string,\r\n\r\n public advocateFirstName: string,\r\n public advocateLastName: string,\r\n public advocatePrefixId: string,\r\n public advocateSuffixId: string,\r\n public advocateNoPhoneFlag: boolean,\r\n public advocateHomePhone: string,\r\n public advocateWorkPhone: string,\r\n public advocateCellPhone: string,\r\n public advocateEmail: string,\r\n public advocateAddressId: number,\r\n\r\n public emergencyContact: string,\r\n public emergencyContactPhone: string,\r\n public commonChildrenFlag: boolean,\r\n public commonChildrenNumber: number,\r\n public cpoExpirationFlag: boolean,\r\n public cpoExpirationDate: string,\r\n public supportInPlaceFlag: boolean,\r\n public weaponInvolvedFlag: boolean,\r\n public drugUseFlag: boolean,\r\n public alcoholUseFlag: boolean,\r\n public accessRisk: string,\r\n public modifiedBy: number,\r\n public relationship: string,\r\n \r\n public vVictimAdvocate: VictimAdvocate,\r\n public vVictimGuardian: VictimGuardian,\r\n \r\n public victimSupports: VictimSupport[],\r\n public victimWeaponUses: VictimWeaponUse[],\r\n public victimDrugUses: VictimDrugUse[],\r\n\r\n public allowCsosaContactFlag: boolean\r\n ) { }\r\n}\r\n\r\n","import { HttpClient,HttpResponse, HttpHeaders } from '@angular/common/http';\r\nimport { Injectable, Inject } from '@angular/core';\r\nimport { SMART_LOOKUP_SERVICE_URL, SMART_OFFENDER_SERVICE_URL,SMART_VICTIM_SERVICE_URL,\r\n VictimListFilter,VictimDrugUse,Victim,VictimSafetyPlan,\r\n CaseNote,Contact,VictimServiceDetail,VictimServiceStatusHistory,VictimAdvocate,VictimGuardian} from './smart-victim.model';\r\nimport { Observable, throwError as observableThrowError} from 'rxjs';\r\nimport { map,catchError, filter } from 'rxjs/operators';\r\nimport { Apollo } from 'apollo-angular';\r\n\r\n\r\nconst headers = new HttpHeaders({ 'Content-Type': 'application/json' });\r\nconst options = { headers: headers };\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class NgcSmartVictimService {\r\n private serviceApiUrl = 'https://smart-service-test.azurewebsites.net/graphql';\r\n constructor(private http: HttpClient,\r\n @Inject(SMART_OFFENDER_SERVICE_URL) private smartOffenderServiceUrl: string,\r\n @Inject(SMART_LOOKUP_SERVICE_URL) private smartLookupServiceUrl: string,\r\n @Inject(SMART_VICTIM_SERVICE_URL) private smartVictimServiceUrl: string,\r\n private apollo: Apollo\r\n\r\n ) { }\r\n\r\n // getVictimInsurances(offenderId: any) {\r\n // return this.http.get(this.smartOffenderServiceUrl + '/VictimInsurances/?offenderId=' + offenderId).pipe();\r\n // }\r\n\r\n // getVictimInsurance(id: any) {\r\n // return this.http.get(this.smartOffenderServiceUrl + '/VictimInsurances/?id=' + id).pipe();\r\n // } \r\n\r\n // postVictimInsurance(val: any) {\r\n // return this.http.post(this.smartOffenderServiceUrl + '/VictimInsurances', val).pipe();\r\n // }\r\n\r\n // putVictimInsurance(id: any, val: any) {\r\n // return this.http.put(this.smartOffenderServiceUrl + '/VictimInsurances/?id=' + id, val).pipe();\r\n // }\r\n\r\n // deleteVictimInsurance(id: any) {\r\n // return this.http.delete(this.smartOffenderServiceUrl + '/VictimInsurances/?id=' + id).pipe();\r\n // }\r\n \r\n // getVictimInsuranceTypes() {\r\n // return this.http.get(this.smartLookupServiceUrl + '/VictimInsuranceTypes').pipe();\r\n // }\r\n\r\n // getVictimInsurancePolicyHolders() {\r\n // return this.http.get(this.smartLookupServiceUrl + '/VictimInsurancePolicyHolders').pipe();\r\n // }\r\n\r\n// getVictimInsuranceSwitchReasons() {\r\n// return this.http.get(this.smartLookupServiceUrl + '/VictimInsuranceSwitchReasons').pipe();\r\n// }\r\n\r\n// getVictimInsuranceProviders() {\r\n// return this.http.get(this.smartLookupServiceUrl + '/VictimInsuranceProvider').pipe();\r\n// }\r\n\r\n// getVictimInsuranceProvider(id) {\r\n// return this.http.get(this.smartLookupServiceUrl + '/VictimInsuranceProviders/' + id).pipe();\r\n// }\r\n\r\n// postProviderInformation(val: any) {\r\n// return this.http.post(this.smartLookupServiceUrl + '/VictimInsuranceProviders', val).pipe();\r\n// }\r\n\r\n\r\n\r\nprivate handleError(error: any) {\r\n console.error(error);\r\n return observableThrowError(error.json().error || 'Server error');\r\n}\r\n\r\ngetDrugsTypes() {\r\n return this.http.get(this.smartLookupServiceUrl + 'DrugTypes', options).pipe\r\n (\r\n map(res => res)\r\n );\r\n}\r\n\r\ngetDocketList(offenderId: number) {\r\n const queryString = `\r\n {\r\n findDockets(input: { where: { offenderId:${offenderId} } }) {\r\n totalCount\r\n message\r\n data {\r\n docketId\r\n docketNumber\r\n \r\n }\r\n }\r\n }`;\r\n\r\n return this.http.post<any>(this.serviceApiUrl, { query: queryString }).pipe(\r\n map(({ data }) => {\r\n console.log('dockets for this offender:', data.findDockets.data);\r\n return data.findDockets.data;\r\n }));\r\n\r\n\r\n}\r\n\r\ngetSupportTypes() {\r\n return this.http.get(this.smartLookupServiceUrl + 'VictimSupportTypes', options).pipe\r\n (\r\n map(res => res)\r\n );\r\n}\r\n\r\ngetPrefixes() {\r\n return this.http.get(this.smartLookupServiceUrl + 'Prefixes', options).pipe\r\n (\r\n map(res => res)\r\n );\r\n}\r\n\r\ngetSuffixes() {\r\n return this.http.get(this.smartLookupServiceUrl + 'Suffixes', options).pipe\r\n (\r\n map(res => res)\r\n );\r\n}\r\n\r\ngetRelationshipTypes() {\r\n return this.http.get(this.smartLookupServiceUrl + 'RelationshipTypes', options).pipe\r\n (\r\n map(res => res)\r\n );\r\n}\r\n\r\ngetGenders() {\r\n return this.http.get(this.smartLookupServiceUrl + 'Genders', options).pipe\r\n (\r\n map(res => res)\r\n );\r\n}\r\n\r\ngetWeaponTypes() {\r\n return this.http.get(this.smartLookupServiceUrl + 'WeaponTypes', options).pipe\r\n (\r\n map(res => res)\r\n );\r\n}\r\n\r\ngetFlagOptionYesNoUnknowns() {\r\n return this.http.get(this.smartLookupServiceUrl + 'FlagOptionYesNoUnknowns', options).pipe\r\n (\r\n map(res => { \r\n return res;\r\n })\r\n );\r\n}\r\n\r\ngetContactTypes() {\r\n return this.http.get(this.smartLookupServiceUrl + 'ContactTypes', options).pipe\r\n (\r\n map(res => { \r\n return res;\r\n })\r\n );\r\n }\r\n getContactMethods() {\r\n return this.http.get(this.smartLookupServiceUrl + 'VictimContactMethods', options).pipe\r\n (\r\n map(res => { \r\n return res;\r\n })\r\n );\r\n }\r\n getContactBys(){\r\n return this.http.get(this.smartLookupServiceUrl + 'VictimContactPurposes', options).pipe\r\n (\r\n map(res => { \r\n return res;\r\n })\r\n );\r\n\r\n }\r\n\r\ngetVictimContactPurposes() {\r\n return this.http.get(this.smartLookupServiceUrl + 'VictimContactPurposes', options).pipe\r\n (\r\n map(res => { \r\n return res;\r\n })\r\n );\r\n }\r\n\r\n getVictimServiceTypes() {\r\n return this.http.get(this.smartLookupServiceUrl + 'VictimServiceTypes', options).pipe\r\n (\r\n map(res => { \r\n return res;\r\n })\r\n );\r\n }\r\n getVictimServiceStatus() {\r\n return this.http.get(this.smartLookupServiceUrl + 'VictimServiceStatus', options).pipe\r\n (\r\n map(res => { \r\n return res;\r\n })\r\n );\r\n }\r\n\r\n getvVictimServiceTypeProgramProviders() {\r\n return this.http.get(this.smartLookupServiceUrl + 'vVictimServiceTypeProgramProviders', options).pipe\r\n (\r\n map(res => { \r\n return res;\r\n })\r\n );\r\n }\r\n\r\n\r\ngetVictim(val: any) {\r\n return this.http.get(this.smartVictimServiceUrl + 'Victims/' + val, options).pipe\r\n (\r\n map(res => { \r\n console.log('victim return data');\r\n console.log(res); \r\n return res;\r\n\r\n })\r\n );\r\n}\r\n\r\ngetVictimAdvocate(val: any) {\r\n return this.http.get(this.smartVictimServiceUrl + 'VictimAdvocates/' + val, options).pipe\r\n (\r\n\r\n map(res => { \r\n return res;})\r\n );\r\n}\r\n\r\ngetVictimGuardian(val: any) {\r\n return this.http.get(this.smartVictimServiceUrl + 'VictimGuardians/' + val, options).pipe\r\n (\r\n\r\n map(res => { \r\n return res;})\r\n );\r\n}\r\n\r\npostVictims(val: any) {\r\n const tempVal = JSON.stringify(val);\r\n return this.http.post(this.smartVictimServiceUrl+ 'Victims', tempVal, options).pipe\r\n (\r\n map(res => { return res;})\r\n );\r\n}\r\n\r\nputVictims(id: any, val: any) {\r\n const tempVal = JSON.stringify(val);\r\n return this.http.put(this.smartVictimServiceUrl + 'Victims/' + id, tempVal, options).pipe\r\n (\r\n map(res => { return res;})\r\n );\r\n}\r\n\r\nputVictimAdvocate(id: any, val: VictimAdvocate) {\r\n let body: string;\r\n body = JSON.stringify(val);\r\n return this.http.put(this.smartVictimServiceUrl + 'VictimAdvocates/' + id, body, options).pipe\r\n (\r\n map(res => { return res;})\r\n );\r\n\r\n\r\n\r\n\r\n}\r\n\r\npostVictimAdvocate(id: any, val: any) {\r\n const tempVal = JSON.stringify(val);\r\n return this.http.post(this.smartVictimServiceUrl + 'VictimAdvocates/' + id, tempVal, options).pipe\r\n (\r\n map(res => { return res;})\r\n );\r\n}\r\n\r\nputVictimGuardian(id: any, val: any) {\r\n console.log('update victim guardian');\r\n console.log(val);\r\n const tempVal = JSON.stringify(val);\r\n return this.http.put(this.smartVictimServiceUrl + 'VictimGuardians/' + id, tempVal, options).pipe\r\n (\r\n map(res => { return res;})\r\n );\r\n}\r\n\r\npostVictimGuardian(id: any, val: any) {\r\n const tempVal = JSON.stringify(val);\r\n return this.http.post(this.smartVictimServiceUrl + 'VictimGuardians/' + id, tempVal, options).pipe\r\n (\r\n map(res => { return res;})\r\n );\r\n}\r\n\r\ngetVictimDrugUse(val: any): Observable<VictimDrugUse[]>{\r\n return this.http.get(this.smartVictimServiceUrl + 'VictimDrugUses/' + val, options).pipe\r\n (\r\n map((res: VictimDrugUse[]) => { \r\n return res;})\r\n );\r\n}\r\n\r\nputVictimDrugUse(id: any, val: VictimDrugUse[]) {\r\n const tempVal = JSON.stringify(val);\r\n\r\n return this.http.put(this.smartVictimServiceUrl + 'VictimDrugUses/' + id, tempVal, options).pipe\r\n (\r\n map(res => { return res;})\r\n );\r\n}\r\n\r\npostVictimDrugUse(id: any, val: any) {\r\n const tempVal = JSON.stringify(val);\r\n return this.http.post(this.smartVictimServiceUrl + 'VictimDrugUses/' + id, tempVal, options).pipe\r\n (\r\n map(res => { return res;})\r\n );\r\n}\r\n\r\nputVictimWeaponUse(id: any, val: any) {\r\n const tempVal = JSON.stringify(val);\r\n return this.http.put(this.smartVictimServiceUrl + 'VictimWeaponUses/' + id, tempVal, options).pipe\r\n (\r\n map(res => { return res;})\r\n );\r\n}\r\n\r\npostVictimWeaponUse(id: any, val: any) {\r\n const tempVal = JSON.stringify(val);\r\n return this.http.post(this.smartVictimServiceUrl + 'VictimWeaponUses/' + id, tempVal, options).pipe\r\n (\r\n map(res => { return res;})\r\n );\r\n}\r\nputVictimSupport(id: any, val: any) {\r\n const tempVal = JSON.stringify(val);\r\n return this.http.put(this.smartVictimServiceUrl + 'VictimSupports/' + id, tempVal, options).pipe\r\n (\r\n map(res => { return res;})\r\n );\r\n}\r\n\r\npostVictimSupport(id: any, val: any) {\r\n const tempVal = JSON.stringify(val);\r\n return this.http.post(this.smartVictimServiceUrl + 'VictimSupports/' + id, tempVal, options).pipe\r\n (\r\n map(res => { return res;})\r\n );\r\n}\r\n\r\ndeleteVictims(val: any) {\r\n return this.http.delete(this.smartVictimServiceUrl+ 'Victims/' + val, options).pipe\r\n (\r\n map(res => { return res;})\r\n );\r\n}\r\n\r\n\r\n\r\n\r\n// //==============Victim Serive===================================\r\n\r\ngetVictims(offenderId: number): Observable <Victim[]> {\r\n\r\n return this.http.get(this.smartVictimServiceUrl + 'Victims/offender/' + offenderId)\r\n .pipe(map((res: Victim[]) => {\r\n \r\n return res;\r\n })\r\n ,catchError(this.handleError));\r\n}\r\n\r\ngetVictimsByFilter(filter: VictimListFilter): Observable<Victim[]>{\r\n return this.http\r\n .post(this.smartVictimServiceUrl + '/Victims', JSON.stringify(filter), { headers: headers })\r\n .pipe(map((res: Victim[]) => {\r\n return res;\r\n })\r\n ,catchError(this.handleError));\r\n}\r\n\r\ngetVictimListByFilter(filter: VictimListFilter) \r\n{\r\n console.log('filer in service');\r\n console.log(filter);\r\n\r\n return this.http\r\n .post(this.smartVictimServiceUrl + 'vVictims/Filter', JSON.stringify(filter), options)\r\n .pipe();\r\n\r\n}\r\n\r\n\r\ngetCasetNotes(victimId: number): Observable <CaseNote[]> {\r\n\r\n return this.http.get(this.smartVictimServiceUrl + 'VictimCaseNotes/victim/' + victimId)\r\n .pipe(map((res: CaseNote[]) => {\r\n return res;\r\n })\r\n ,catchError(this.handleError));\r\n \r\n\r\n}\r\naddCaseNote(caseNote: CaseNote) {\r\n let body: string;\r\n body = JSON.stringify(caseNote);\r\n return this.http\r\n .post(this.smartVictimServiceUrl + 'VictimCaseNotes/', body, options);\r\n \r\n }\r\n\r\n \r\nupdateCaseNote(caseNote: CaseNote){\r\n\r\n let body: string;\r\n body = JSON.stringify(caseNote);\r\n return this.http\r\n .put(this.smartVictimServiceUrl + 'VictimCaseNotes/' + caseNote.victimCaseNoteId, body, options)\r\n\r\n ;\r\n }\r\n\r\ndeleteCaseNote(id: number, staffId: number) {\r\n return this.http.delete(`${this.smartVictimServiceUrl}VictimCaseNotes/${id}?staffId=${staffId}`);\r\n }\r\n\r\n getContacts(victimId: number): Observable <Contact[]> {\r\n\r\n return this.http.get(this.smartVictimServiceUrl + 'VictimContacts/victim/' + victimId)\r\n .pipe(map((res: Contact[]) => {\r\n return res;\r\n })\r\n ,catchError(this.handleError));\r\n \r\n }\r\n addContact(contact: Contact) {\r\n let body: string;\r\n body = JSON.stringify(contact);\r\n return this.http\r\n .post(this.smartVictimServiceUrl + 'VictimContacts/', body, options);\r\n \r\n }\r\n \r\n \r\n updateContact(contact: Contact){\r\n \r\n let body: string;\r\n body = JSON.stringify(contact);\r\n return this.http\r\n .put(this.smartVictimServiceUrl + 'VictimContacts/' + contact.victimContactId, body, options)\r\n \r\n ;\r\n }\r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\ngetSafetyPlans(victimId: number): Observable <VictimSafetyPlan[]> {\r\n\r\n return this.http.get(this.smartVictimServiceUrl + 'vVictimServiceLists/victim/' + victimId)\r\n .pipe(map((res: VictimSafetyPlan[]) => {\r\n return res;\r\n })\r\n ,catchError(this.handleError));\r\n }\r\n\r\ngetVictimServices(victimServiceId: number): Observable <VictimSafetyPlan[]> {\r\n\r\n return this.http.get(this.smartVictimServiceUrl + 'vVictimServiceLists/victimServiceId/' + victimServiceId)\r\n .pipe(map((res: VictimSafetyPlan[]) => {\r\n return res;\r\n })\r\n ,catchError(this.handleError));\r\n \r\n }\r\n\r\ngetVictimServiceDetail(victimServiceId: number): Observable <VictimServiceDetail[]> {\r\n\r\n return this.http.get(this.smartVictimServiceUrl + 'VictimServiceDetails/' + victimServiceId)\r\n .pipe(map((res: VictimServiceDetail[]) => {\r\n \r\n return res;\r\n })\r\n ,catchError(this.handleError));\r\n\r\n}\r\naddSafetyPlan(victimSafetyPlan: VictimSafetyPlan) {\r\n\r\n let body: string;\r\n body = JSON.stringify(victimSafetyPlan);\r\n return this.http\r\n .post(this.smartVictimServiceUrl + 'VictimServices/', body, options)\r\n .pipe();\r\n \r\n }\r\nupdateSafetyPlan(victimSafetyPlan: VictimSafetyPlan){\r\n\r\n let body: string;\r\n body = JSON.stringify(victimSafetyPlan);\r\n return this.http\r\n .put(this.smartVictimServiceUrl + 'VictimServices/' + victimSafetyPlan.victimServiceId, body, options)\r\n\r\n ;\r\n }\r\naddVictimServiceStatus(victimServiceStatusHistory: VictimServiceStatusHistory){\r\n let body: string;\r\n body = JSON.stringify(victimServiceStatusHistory);\r\n return this.http\r\n .post(this.smartVictimServiceUrl + 'VictimServiceStatusHistories/', body, options);\r\n\r\n }\r\n\r\ngetServiceStatusHistories(victimServiceId: number){\r\n return this.http.get(this.smartVictimServiceUrl + 'VictimServiceStatusHistories/victimServiceId/' + victimServiceId)\r\n .pipe(\r\n map((res: VictimServiceStatusHistory[]) => {\r\n \r\n return res;\r\n })\r\n ,catchError(this.handleError)\r\n );\r\n}\r\n\r\ndeleteSafetyPlan(victimServiceId: number, staffId: number) {\r\n return this.http.delete(`${this.smartVictimServiceUrl}VictimServices/${victimServiceId}?staffId=${staffId}`);\r\n\r\n }\r\naddPlanProvider(victimServiceDetail:VictimServiceDetail){\r\n let body: string;\r\n body = JSON.stringify(victimServiceDetail);\r\n return this.http\r\n .post(this.smartVictimServiceUrl + 'VictimServiceDetails/', body, options)\r\n .pipe();\r\n\r\n }\r\n\r\ndeleteProvider(victimProgramProviderId: string, staffId: number){\r\n return this.http.delete(`${this.smartVictimServiceUrl}VictimServiceDetails/${victimProgramProviderId}?staffId=${staffId}`);\r\n\r\n}\r\n\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Observable } from 'rxjs';\r\nimport { map, filter } from 'rxjs/operators';\r\nimport { Injectable,Inject } from '@angular/core';\r\nimport { SMART_OFFENDER_SERVICE_URL} from './smart-victim.model';\r\n\r\n\r\nconst headers = new Headers({ 'Content-Type': 'application/json' });\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class IntakeServicesComponent {\r\n //serviceData = environment.smartOffenderServiceUrl;\r\n constructor(private http: HttpClient,\r\n @Inject(SMART_OFFENDER_SERVICE_URL) private smartOffenderServiceUrl: string, \r\n ) {}\r\n getIntakeByOffender(offenderId: any): Observable<Intake> {\r\n return this.http\r\n .get<Intake>(this.smartOffenderServiceUrl + 'IntakeBasic/offender/' + offenderId)\r\n .pipe();\r\n }\r\n\r\n updateIntakeSteps(\r\n offenderId: number,\r\n intakeStepStatus: IntakeStepStatusModel,\r\n ) {\r\n return this.http.put(\r\n this.smartOffenderServiceUrl + '/IntakeStepStatus/' + offenderId,\r\n intakeStepStatus,\r\n );\r\n }\r\n}\r\n\r\nexport interface Intake {\r\n intakeId: number;\r\n offenderId: number;\r\n intakeOffenderReportStatusId?: any;\r\n startDate: string;\r\n endDate?: any;\r\n assignmentId?: any;\r\n modifiedBy: number;\r\n}\r\n\r\nexport interface IntakeStepStatus {\r\n intakeStepStatusId: number;\r\n intakeId: number;\r\n intakeStepId: string;\r\n completedDate: Date;\r\n modifiedBy: number;\r\n}\r\n\r\nexport interface IntakeStepStatusModel\r\n{\r\n offenderId: number;\r\n intakeStepId: string;\r\n modifiedBy: number;\r\n}\r\n\r\nexport class IntakeStep{\r\n public static PhysicalInformation = \"PHYSIN\";\r\n public static Photo = \"PHOTOS\";\r\n public static HousingInformation = \"HOUSE\";\r\n public static DocketInformation = \"DOCKET\";\r\n public static Alias = \"ALIAS\";\r\n public static IntakeBasicInformation = \"INTKBI\";\r\n public static ContactInformation = \"CONTCT\";\r\n public static DeceasedInformation = \"DEATH\";\r\n public static DriversLicense = \"DRVLIC\";\r\n public static EmploymentInformation = \"EMPLOY\";\r\n public static GangAffiliation = \"GANG\";\r\n public static HealthInsurance = \"HLTHINS\";\r\n public static Identification = \"IDNTFCTN\";\r\n public static InternetIdentifier = \"INTERNETID\";\r\n public static MilitaryService = \"MLTSVC\";\r\n public static School = \"SCHOOL\";\r\n public static SelectiveService = \"SLCTVSVC\";\r\n public static Vehicle = \"VEHICLE\";\r\n public static VictimInformation = \"VICTIM\";\r\n public static WarrantInformation = \"WARRNT\";\r\n public static RunningRecord = \"RUNREC\";\r\n public static Signature = \"SIGN\";\r\n}","import { DOCUMENT, DatePipe } from '@angular/common';\r\nimport { Component, OnInit, ViewChild, Input, Output, AfterViewInit,Inject} from '@angular/core';\r\nimport { ActivatedRoute,Router } from '@angular/router';\r\nimport { MatTableDataSource} from '@angular/material/table';\r\nimport { MatPaginator, MatSort,MatSnackBar } from '@angular/material';\r\nimport { MAT_DIALOG_DATA, MatDialogRef, MatDialog } from '@angular/material';\r\nimport { NgcSmartVictimService } from './smart-victim.service';\r\nimport { ElementsVictim, VictimListFilter, Victim,SMART_WARRANT_URL} from './smart-victim.model'\r\nimport { SmartVictimDeleteConfirmComponent } from './smart-victim-delete-confirm.component';\r\n//import { SmartVictimDetailComponent } from './smart-victim-detail/smart-victim-detail.component';\r\n\r\nimport {\r\n IntakeStepStatusModel,\r\n IntakeStep,\r\n IntakeServicesComponent,\r\n} from './intake.service';\r\n@Component({\r\n selector: 'csmart-victim',\r\n templateUrl: './smart-victim.component.html',\r\n styleUrls: ['./smart-victim.component.css']\r\n})\r\nexport class NgcSmartVictimComponent implements OnInit, AfterViewInit {\r\n \r\n @Input() offenderId: number;\r\n @Input() staffId: number;\r\n @Input() staffRole: string;\r\n @Input() showCaseNote: string;\r\n @Input() showSafetyPlan: string;\r\n //@Input() showAdd: string;\r\n @Input() showAdd: boolean;\r\n @Input() showEdit: string;\r\n @Input() showRelationshipColumn: boolean;\r\n @Input() showOffenderNameColumn: boolean;\r\n @Input() showOffenderPhoneColumn: boolean;\r\n @Input() showSearchForm: boolean;\r\n @Input() accessByModule: string;\r\n @Input() intakeFlag: string;\r\n\r\n @ViewChild(MatPaginator) paginator: MatPaginator;\r\n @ViewChild(MatSort) sort: MatSort;\r\n // @ViewChild(SmartVictimDetailComponent) child;\r\n\r\n displayedColumns: string[] ;\r\n victims: Victim[] = [];\r\n victimDetail = <Victim>{};\r\n showDetail = false;\r\n victimListFilter: VictimListFilter = new VictimListFilter;\r\n victimListDataSource= new MatTableDataSource();\r\n\r\n doSpin: boolean = false;\r\n showListFlag: boolean = false;\r\n msg: string = \"\";\r\n isIntake = false;\r\n\r\n\r\n constructor(\r\n private dialog: MatDialog, \r\n private victimService: NgcSmartVictimService,\r\n private router: Router,\r\n private route: ActivatedRoute,\r\n private snackBar: MatSnackBar,\r\n private intakeService: IntakeServicesComponent,\r\n @Inject(SMART_WARRANT_URL) private smartWarrantUrl: string,\r\n @Inject(DOCUMENT) private document: any,\r\n ) { }\r\n\r\n // private onChange(filter: VictimListFilter) {\r\n // console.log('filter in onchange');\r\n // console.log(filter);\r\n // this.getVictimList(filter);\r\n // }\r\n \r\n applyFilter(filterValue: string) {\r\n this.victimListDataSource.filter = filterValue.trim().toLowerCase();\r\n }\r\n addRecord(){\r\n this.showDetail = true; \r\n this.showAdd = false;\r\n this.victimDetail = null;\r\n this.showListFlag = false;\r\n }\r\n\r\n editVictimDetail(record){\r\n console.log('victim edit record');\r\n console.log(record);\r\n console.log(record.victimId);\r\n this.victimDetail = record;\r\n this.showDetail = true; \r\n this.showAdd = false;\r\n this.showListFlag = false;\r\n }\r\n\r\n\r\n save(detail: Victim){\r\n this.showDetail = false;\r\n this.showAdd = true;\r\n this.showListFlag = true;\r\n }\r\n \r\n\r\n cancel(){\r\n this.showDetail = false;\r\n this.victimDetail = <Victim>{};\r\n }\r\n\r\n \r\n ngAfterViewInit() {\r\n this.victimListDataSource.paginator = this.paginator;\r\n this.victimListDataSource.sort = this.sort;\r\n\r\n }\r\n\r\n ngOnInit() {\r\n\r\n var data = this.route.snapshot.data;\r\n var myPath = this.router.url.slice(-10);\r\n\r\n console.log('smart-victim ngOnInit');\r\n console.log(this.intakeFlag);\r\n console.log(myPath)\r\n\r\n\r\n\r\n if (this.intakeFlag || myPath =='victimHome'){\r\n\r\n this.isIntake= true;\r\n }\r\n\r\n \r\n this.displayedColumns = ['lastName', 'firstName'];\r\n \r\n if (this.showRelationshipColumn == true || myPath =='victimList' || myPath =='victimHome'){\r\n this.displayedColumns.push(\"relationship\");\r\n } \r\n if (this.showOffenderNameColumn == true){\r\n this.displayedColumns.push(\"offenderName\");\r\n } \r\n \r\n if (this.showOffenderPhoneColumn == true || myPath =='victimList' || myPath =='victimHome' ){\r\n this.displayedColumns.push(\"homePhone\");\r\n } \r\n\r\n \r\n this.displayedColumns.push(\"victimId\"); \r\n \r\n if(this.showSearchForm == true ){\r\n this.showListFlag = false;\r\n } \r\n \r\n console.log('this.showSearchForm');\r\n console.log(this.showSearchForm);\r\n console.log('myPath');\r\n console.log(myPath);\r\n \r\n if (this.showSearchForm == false || myPath =='victimList'|| myPath =='victimHome' ){\r\n \r\n \r\n var myOffenderId;\r\n if (this.offenderId){\r\n myOffenderId = this.offenderId\r\n }\r\n else\r\n {\r\n console.log('back from previous page');\r\n this.showAdd = true;\r\n this.showRelationshipColumn = true;\r\n //this.displayedColumns.push(\"relationship\");\r\n this.showOffenderPhoneColumn= true;\r\n // this.displayedColumns.push(\"homePhone\");\r\n this.accessByModule= 'true';\r\n this.showEdit = 'true';\r\n this.showCaseNote = 'true';\r\n this.showSafetyPlan = 'true';\r\n\r\n myOffenderId = data.selectedOffender.offenderId;\r\n }\r\n\r\n const victimListFilter: VictimListFilter = {\r\n offenderId: myOffenderId,\r\n lastName: null,\r\n firstName: null,\r\n pdid: null,\r\n birthDate: null\r\n \r\n };\r\n\r\n console.log('victimListFilter in smar-victim componenet');\r\n console.log(victimListFilter);\r\n\r\n this.victimService.getVictimListByFilter(victimListFilter).subscribe((data: Victim[]) => {\r\n this.victimListDataSource.data = data;\r\n \r\n this.victims = data;\r\n\r\n data.forEach( d =>{ \r\n if (d.homePhone == null|| d.homePhone == \"\"){\r\n d.homePhone = d.cellPhone\r\n }\r\n if (d.homePhone == null || d.homePhone == \"\"){\r\n d.homePhone = d.workPhone\r\n }\r\n });\r\n console.log('victim data at line 179');\r\n console.log(this.victims);\r\n console.log('showListFlag');\r\n console.log(this.showListFlag);\r\n this.showListFlag = true;\r\n if (data.length == 0)\r\n {\r\n this.msg=\"No Record Found!\";\r\n }\r\n \r\n });\r\n\r\n }\r\n else{\r\n \r\n console.log('find filter');\r\n console.log(this.victimListFilter);\r\n\r\n if ( this.showListFlag === true){\r\n\r\n if (this.victimListFilter != null){\r\n this.victimService.getVictimListByFilter(this.victimListFilter).subscribe((data: Victim[]) => {\r\n this.victimListDataSource.data = data;\r\n this.victims = data;\r\n console.log('victim data at line 201');\r\n console.log(data);\r\n });\r\n }\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n formatPhoneNumber(phoneNumberString) {\r\n if (!phoneNumberString) return '';\r\n var cleaned = ('' + phoneNumberString).replace(/\\D/g, '');\r\n var match = cleaned.match(/^(\\d{3})(\\d{3})(\\d{4})$/);\r\n if (match) {\r\n return '(' + match[1] + ') ' + match[2] + '-' + match[3];\r\n }\r\n return '';\r\n }\r\n\r\n saveIntake() {\r\n if (!this.isIntake) {\r\n return;\r\n }\r\n const intakeStep = <IntakeStepStatusModel>{\r\n intakeStepId: IntakeStep.VictimInformation,\r\n offenderId: this.offenderId,\r\n modifiedBy: this.staffId,\r\n };\r\n this.intakeService\r\n .updateIntakeSteps(this.offenderId, intakeStep)\r\n .subscribe((res) => {\r\n console.log('save intake step.')\r\n this.snackBar.open('Status Saved.', '', {\r\n duration: 3000,\r\n });\r\n //this.router.navigate(['/warrant '], { queryParams: { intake: 1 } });\r\n\r\n this.document.location.href = `${this.smartWarrantUrl}/warrant`;\r\n });\r\n }\r\n \r\n goToCaseNote(victimId: number) {\r\n this.router.navigate(['casenote', victimId]); \r\n }\r\n\r\n goToSaftyPlan(victimId: number) {\r\n this.router.navigate(['saftyPlan', victimId]); \r\n }\r\n \r\n\r\n getVictimList(filter: VictimListFilter) {\r\n this.victimListFilter = filter;\r\n console.log('this.victimListFilter inside getVictimList');\r\n console.log(this.victimListFilter);\r\n this.doSpin = true;\r\n this.victimService.getVictimListByFilter(filter).subscribe((data: Victim[]) => {\r\n \r\n this.victimListDataSource.data = data;\r\n\r\n this.doSpin=!this.doSpin;\r\n\r\n if (data.length > 0){\r\n this.showListFlag = true;\r\n }\r\n else{\r\n this.msg=\"No record found!\";\r\n }\r\n },err=>{\r\n this.doSpin=!this.doSpin;\r\n }\r\n );\r\n }\r\n\r\n\r\n\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\nimport {MatDialog, MatDialogRef} from '@angular/material';\r\n\r\n@Component({\r\n selector: 'app-common-dialog',\r\n templateUrl: './common-dialog.component.html',\r\n styleUrls: ['./common-dialog.component.css']\r\n})\r\nexport class CommonDialogComponent implements OnInit {\r\npublic title: string;\r\npublic message: string;\r\npublic cmdYesTitle: string =\"Yes\";\r\npublic cmdNoTitle: string = \"No\";\r\n\r\n constructor(public commondialogRef: MatDialogRef<CommonDialogComponent>) { }\r\n\r\n ngOnInit() {\r\n \r\n }\r\n\r\n}\r\n","import { Observable } from 'rxjs';\r\nimport { CommonDialogComponent } from './common-dialog.component';\r\nimport { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';\r\nimport { Injectable } from '@angular/core';\r\n\r\n@Injectable()\r\nexport class CommonDialogService {\r\n\r\n constructor(private dialog: MatDialog) { }\r\n\r\n public confirm(title: string, message: string, cmdYesTitle: string, cmdNoTitle: string): Observable<boolean> {\r\n\r\n let dialogRef: MatDialogRef<CommonDialogComponent>;\r\n\r\n dialogRef = this.dialog.open(CommonDialogComponent);\r\n dialogRef.componentInstance.title = title;\r\n dialogRef.componentInstance.message = message;\r\n dialogRef.componentInstance.cmdYesTitle = cmdYesTitle;\r\n dialogRef.componentInstance.cmdNoTitle = cmdNoTitle;\r\n return dialogRef.afterClosed();\r\n }\r\n\r\n public warning(title: string, message: string, cmdOkTitle: string, ): Observable<boolean> {\r\n\r\n let dialogRef: MatDialogRef<CommonDialogComponent>;\r\n\r\n dialogRef = this.dialog.open(CommonDialogComponent);\r\n dialogRef.componentInstance.title = title;\r\n dialogRef.componentInstance.message = message;\r\n dialogRef.componentInstance.cmdYesTitle = cmdOkTitle;\r\n \r\n return dialogRef.afterClosed();\r\n }\r\n\r\n}\r\n","import { Component, OnInit, OnChanges, Input, Output, EventEmitter } from '@angular/core';\r\nimport { FormBuilder, FormGroup, FormControl,Validators,ValidatorFn } from '@angular/forms';\r\nimport { MatDialog,MatSnackBar,MatRadioChange, MatInput, MatSelect, MatRadioGroup } from '@angular/material';\r\nimport { Victim,VictimDrugUse, Contact, VictimAdvocate,VictimGuardian,VictimWeaponUse,VictimSupport } from '../smart-victim.model';\r\nimport { NgcSmartVictimService } from '../smart-victim.service';\r\nimport { Router, ActivatedRoute } from '@angular/router';\r\nimport { CommonDialogService} from '.././common-dialog/common-dialog.service';\r\nimport { DatePipe, formatDate, Location} from '@angular/common';\r\nimport { map } from 'rxjs/operators';\r\nimport { coerceBooleanProperty}from'@angular/cdk/coercion';\r\nimport { Moment } from 'moment';\r\nimport { truncate } from 'fs';\r\nimport { MatTableDataSource} from '@angular/material/table';\r\nimport { AddressValidators, SmartAddressComponent } from '@csmart/ngc-smart-address';\r\n\r\nexport interface BooleanFn {\r\n (): boolean;\r\n}\r\nexport interface StringFn {\r\n (): string;\r\n}\r\n\r\nexport function conditionalValidator(predicate: BooleanFn,\r\n validator: ValidatorFn,\r\n errorNamespace?: string): ValidatorFn {\r\nreturn (formControl => {\r\nif (!formControl.parent) {\r\nreturn null;\r\n}\r\nlet error = null;\r\nif (predicate()) {\r\nerror = validator(formControl);\r\n}\r\nif (errorNamespace && error) {\r\nconst customError = {};\r\ncustomError[errorNamespace] = error;\r\nerror = customError\r\n}\r\nreturn error;\r\n})\r\n}\r\n\r\n\r\nexport function stringConditionalValidator(predicate: StringFn,\r\n validator: ValidatorFn,\r\n errorNamespace?: string): ValidatorFn {\r\nreturn (formControl => {\r\nif (!formControl.parent) {\r\nreturn null;\r\n}\r\nlet error = null;\r\nif (predicate()=='YS') {\r\nerror = validator(formControl);\r\n}\r\nif (errorNamespace && error) {\r\nconst customError = {};\r\ncustomError[errorNamespace] = error;\r\nerror = customError\r\n}\r\nreturn error;\r\n})\r\n}\r\n\r\n@Component({\r\n selector: 'csmart-victim-detail',\r\n templateUrl: './smart-victim-detail.component.html',\r\n styleUrls: ['./smart-victim-detail.component.css'],\r\n providers: [CommonDialogService]\r\n})\r\nexport class SmartVictimDetailComponent implements OnInit, OnChanges {\r\n @Input() victimDetail = <Victim>{};\r\n @Input() staffId: number;\r\n @Input() offenderId: number;\r\n @Input() isIntake: boolean;\r\n\r\n @Output() onSave = new EventEmitter();\r\n @Output() onCancel = new EventEmitter();\r\n \r\n\r\n victimId: number;\r\n victimForm: FormGroup;\r\n\r\n drugs: any;\r\n victimSupportTypes: any;\r\n prefixes: any;\r\n //victim: Victim = <Victim>{};\r\n suffixes: any;\r\n relationshipTypes: any;\r\n genders: any;\r\n docketlist: any;\r\n weaponTypes: any;\r\n flagOption: any;\r\n selectedWeaponTypes: any;\r\n selectedVictimSupportTypes: any;\r\n selectedDrugs: any;\r\n id: any;\r\n hidden: boolean=true;\r\n private sub: any;\r\n victimAdvocate: VictimAdvocate = <VictimAdvocate>{};\r\n victimGuardian: VictimGuardian = <VictimGuardian>{}; \r\n victimWeaponUse: VictimWeaponUse;\r\n victimSupport: VictimSupport;\r\n victimDrugUse: VictimDrugUse;\r\n result: any;\r\n editMode: any;\r\n guardianTabFlag: boolean = false;\r\n advocateTabFlag: boolean = false;\r\n commonChildrenDivFlag: boolean = false;\r\n cpoExpirationDivFlag : boolean = false;\r\n supportInPlaceDivFlag: boolean = false;\r\n weaponInvolvedDivFlag: boolean = false;\r\n drugUseDivFlag: boolean = false;\r\n showDelete: boolean = false;\r\n addressId: number = 0;\r\n advocateAddressId: number = 0;\r\n guardianAddressId: number = 0;\r\n datePipe = new DatePipe('en-US');\r\n emailPattern = \"^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,4}$\";\r\n phoneNumber = \"\\\\d{10}\";\r\n editVictim: Victim = <Victim>{};\r\n victimAge: number;\r\n otherWeaponFlag: boolean = false;\r\n otherDrugFlag: boolean = false;\r\n\r\n contactDataSource= new MatTableDataSource();\r\n contactList: Contact[];\r\n guardianPhoneExistFlag: boolean = false;\r\n advocatePhoneExistFlag: boolean = false;\r\n phoneValidationFlag: boolean = false;\r\n guaridanNoPhoneChkFlag: boolean = true;\r\n advocateNoPhoneChkFlag: boolean = true;\r\n\r\n addressValidators: AddressValidators = {\r\n street: [],\r\n street2: [],\r\n city: [],\r\n stateCode: [],\r\n zipCode: [],\r\n psaCode: [],\r\n };\r\n\r\n constructor(\r\n private location: Location,\r\n private formBuilder: FormBuilder, \r\n private dialog: MatDialog,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n public snackBar: MatSnackBar,\r\n private commonDialogService: CommonDialogService,\r\n private victimService: NgcSmartVictimService) {\r\n this.initForm();\r\n }\r\n\r\n private initForm() {\r\n \r\n this.victimForm = this.formBuilder.group({\r\n underSupervisionFlag: new FormControl('', Validators.compose([ Validators.required])),\r\n victimOffenderRelationshipTypeId:new FormControl('', Validators.compose([ Validators.required])),\r\n lastName: new FormControl('', Validators.compose([ Validators.required])),\r\n firstName: new FormControl('', Validators.compose([ Validators.required])),\r\n middleName: new FormControl('', ),\r\n prefixId: new FormControl('', ),\r\n suffixId: new FormControl('', ),\r\n genderCode:new FormControl('', ),\r\n birthDate: new FormControl('', ),\r\n homePhone: new FormControl('', Validators.compose([Validators.pattern(this.phoneNumber) ])),\r\n cellPhone: new FormControl('', Validators.compose([Validators.pattern(this.phoneNumber) ])),\r\n workPhone: new FormControl('', Validators.compose([Validators.pattern(this.phoneNumber) ])),\r\n email:new FormControl('', Validators.compose([Validators.pattern(this.emailPattern) ])),\r\n minorFlag:new FormControl('', Validators.compose([ Validators.required])),\r\n victimAdvocateFlag: new FormControl('', Validators.compose([ Validators.required])),\r\n guardianLastName:new FormControl('', conditionalValidator(() => this.victimForm.get('minorFlag').value, Validators.required,'illuminatiError') ),\r\n guardianFirstName: new FormControl('', conditionalValidator(() => this.victimForm.get('minorFlag').value, Validators.required,'illuminatiError') ),\r\n guardianPrefixId:new FormControl('', ),\r\n guardianSuffixId: new FormControl('', ), \r\n //guardianGender:new FormControl('', ),\r\n guardianBirthDate: new FormControl('', ),\r\n guardianNoPhoneFlag:new FormControl(true),\r\n\r\n guardianHomePhone:new FormControl('', Validators.compose([Validators.pattern(this.phoneNumber) ] )),\r\n guardianCellPhone:new FormControl('', Validators.compose([Validators.pattern(this.phoneNumber) ] )),\r\n guardianWorkPhone:new FormControl('', Validators.compose([Validators.pattern(this.phoneNumber) ] )),\r\n \r\n \r\n guardianEmail:new FormControl('', Validators.compose([Validators.pattern(this.emailPattern) ])),\r\n advocateNoPhoneFlag: new FormControl(true),\r\n \r\n\r\n advocateWorkPhone:new FormControl('', Validators.compose([ Validators.pattern(this.phoneNumber) ] )),\r\n advocateHomePhone:new FormControl('', Validators.compose([ Validators.pattern(this.phoneNumber) ] )),\r\n advocateCellPhone: new FormControl('', Validators.compose([ Validators.pattern(this.phoneNumber) ] )),\r\n \r\n\r\n advocateSuffixId:new FormControl('', ),\r\n advocatePrefixId: new FormControl('', ),\r\n advocateFirstName: new FormControl('', stringConditionalValidator(() => this.victimForm.get('victimAdvocateFlag').value, Validators.required, 'illuminatiError')),\r\n advocateLastName: new FormControl('', stringConditionalValidator(() => this.victimForm.get('victimAdvocateFlag').value, Validators.required,'illuminatiError')),\r\n advocateEmail: new FormControl('', Validators.compose([Validators.pattern(this.emailPattern) ])),\r\n emergencyContact: new FormControl('', ),\r\n emergencyContactPhone:new FormControl('', Validators.compose([Validators.pattern(this.phoneNumber) ])),\r\n emergencyChildren: new FormControl('', ),\r\n emergencyCpo: new FormControl('', ),\r\n emergencyDrug:new FormControl('', ),\r\n emergencySupport: new FormControl('', ),\r\n emergencyWeapon: new FormControl('', ),\r\n drug: new FormControl('', ),\r\n weapon: new FormControl('', ),\r\n support: new FormControl('', ),\r\n commonChildrenFlag: new FormControl('', ),\r\n commonChildrenNumber:new FormControl('', ),\r\n cpoExpirationFlag: new FormControl('', ),\r\n cpoExpirationDate: new FormControl('', ),\r\n accessRisk:new FormControl('', ),\r\n drugUseFlag:new FormControl('', ),\r\n supportInPlaceFlag: new FormControl('', ),\r\n weaponInvolvedFlag: new FormControl('', ),\r\n otherWeapon: new FormControl('', ),\r\n otherDrug: new FormControl('', ),\r\n alcoholUseFlag:new FormControl('', ),\r\n victimSupports:new FormControl('', ),\r\n victimWeaponUses:new FormControl('', ),\r\n victimDrugUses:new FormControl('', ),\r\n allowCsosaContactFlag: new FormControl('', ),\r\n \r\n \r\n});\r\n\r\n this.victimForm.markAsPristine();\r\n\t\tthis.victimForm.markAsUntouched();\r\n\r\n }\r\n\r\n private _getVictim() {\r\n if (this.victimId === 0) { \r\n \r\n return; \r\n };\r\n\t\tif (this.editMode == true) {\r\n console.log('find victim id inside getVictim');\r\n console.log(this.victimId);\r\n\r\n if (this.victimId === undefined) {\r\n this.sub = this.route.params.subscribe(params => {\r\n this.victimId = params['victimId'];\r\n console.log('my this.victimId');\r\n console.log(this.victimId);\r\n });\r\n }\r\n\r\n this.victimService.getVictim(this.victimId)\r\n .subscribe((victim: Victim) => {\r\n console.log('victim data 1');\r\n console.log(victim);\r\n this.editVictim = <Victim>victim;\r\n \r\n var supportsData =[];\r\n this.editVictim.victimSupports.forEach( t=>{supportsData.push(t.victimSupportTypeId); } )\r\n const victimSupportsControl = this.victimForm.get('victimSupports');\r\n victimSupportsControl.setValue(supportsData);\r\n\r\n\r\n var weaponUsesData =[];\r\n var otherWeapon = \"\";\r\n this.editVictim.victimWeaponUses.forEach( t=>{\r\n weaponUsesData.push(t.weaponTypeId); \r\n if (t.weaponTypeId == \"OTHER\"){\r\n otherWeapon = t.otherWeapon;\r\n this.otherWeaponFlag = true;\r\n }\r\n \r\n } )\r\n\r\n\r\n const victimWeaponUsesControl = this.victimForm.get('victimWeaponUses');\r\n victimWeaponUsesControl.setValue(weaponUsesData);\r\n\r\n const otherWeaponControl = this.victimForm.get('otherWeapon');\r\n otherWeaponControl.setValue(otherWeapon);\r\n\r\n\r\n //this.weaponUsesData = this.editVictim.victimWeaponUses;\r\n \r\n var drugUseData =[];\r\n var otherDrug = \"\";\r\n\r\n console.log('load this.editVictim.victimDrugUses');\r\n console.log(this.editVictim.victimDrugUses);\r\n this.editVictim.victimDrugUses.forEach( t=>{\r\n \r\n if (t.drugTypeId === null){\r\n otherDrug = t.otherDrug;\r\n this.otherDrugFlag = true;\r\n t.drugTypeId ='OTHER';\r\n\r\n }\r\n drugUseData.push(t.drugTypeId);\r\n \r\n } )\r\n\r\n console.log('this.editVictim.victimDrugUses after push');\r\n console.log(drugUseData);\r\n\r\n\r\n\r\n const victimDrugUsesControl = this.victimForm.get('victimDrugUses');\r\n victimDrugUsesControl.setValue(drugUseData);\r\n\r\n const otherDrugControl = this.victimForm.get('otherDrug');\r\n otherDrugControl.setValue(otherDrug);\r\n\r\n\r\n\r\n //contact\r\n this.victimService.getContacts(this.victimId).subscribe(\r\n contactList => {\r\n console.log('contactList');\r\n console.log(contactList);\r\n this.contactList = contactList; \r\n this.contactDataSource.data = this.contactList;\r\n }\r\n );\r\n\r\n //no phone field\r\n\r\n if ( this.editVictim.guardianNoPhoneFlag === false ){\r\n this.victimForm.patchValue({guardianNoPhoneFlag: false});\r\n }\r\n if ( this.editVictim.advocateNoPhoneFlag === false ){\r\n this.victimForm.patchValue({advocateNoPhoneFlag: false});\r\n }\r\n\r\n }, error => {\r\n this.snackBar.open(\"Error occured while retriving Victim Information. Please try again.\");\r\n });\r\n return;\r\n\t\t} else {\r\n //new\r\n\r\n }\r\n }\r\n \r\n ngOnChanges() {\r\n \r\n }\r\n\r\n onAddressChange(addressId) { \r\n this.victimForm.patchValue({addressId: addressId})\r\n this.addressId = addressId;\r\n }\r\n onGuardianAddressChange(MyGuardianAddressId) { \r\n this.victimForm.patchValue({guardianAddressId: MyGuardianAddressId})\r\n this.guardianAddressId = MyGuardianAddressId;\r\n }\r\n onAdvocateAddressChange(MyAdvocateAddressId) { \r\n this.victimForm.patchValue({advocateAddressId: MyAdvocateAddressId})\r\n this.advocateAddressId = MyAdvocateAddressId;\r\n }\r\n cancel() {\r\n this.victimForm.reset();\r\n}\r\n\r\n\r\n\r\n\r\n ngOnInit() {\r\n\r\n console.log('show offenderId');\r\n console.log(this.offenderId);\r\n console.log('show staffId');\r\n console.log(this.staffId);\r\n console.log('show isIntake');\r\n console.log(this.isIntake);\r\n //this.victimDetail.guardianNoPhoneFlag = true;\r\n //this.victimForm.value.guardianNoPhoneFlag = true;\r\n //this.victimForm.get('guardianNoPhoneFlag').setValue(true);\r\n\r\n //required field\r\n const requiredImplementation = {get:function():boolean{if(this._required){return this._required;}\r\n if(this.ngControl&&this.ngControl.control&&this.ngControl.control.validator\r\n ){const emptyValueControl=Object.assign({},\r\n this.ngControl.control);(emptyValueControl as any).value=null;\r\n return('required'in(this.ngControl.control.validator(emptyValueControl)||{}));}\r\n return false;},set:function(value:boolean){this._required=coerceBooleanProperty(value);},};\r\n Object.defineProperty(MatInput.prototype,'required',requiredImplementation,);\r\n Object.defineProperty(MatSelect.prototype,'required',requiredImplementation,);\r\n Object.defineProperty(MatRadioGroup.prototype,'required',requiredImplementation,);\r\n //required field end\r\n\r\n \r\n\r\n if (this.victimDetail!=null) {\r\n // edit record\r\n this.editMode = true; \r\n this.showDelete= true; \r\n this.victimId = this.victimDetail.victimId;\r\n \r\n this.guardianTabFlag = this.victimDetail.minorFlag;\r\n\r\n \r\n if (this.victimDetail.victimAdvocateFlag=='YS'){\r\n this.advocateTabFlag = true;\r\n }\r\n\r\n if (this.otherWeaponFlag == true){\r\n const otherWeaponControl = this.victimForm.get('otherWeapon');\r\n otherWeaponControl.setValidators(Validators.required);\r\n\r\n }\r\n\r\n if (this.otherDrugFlag == true){\r\n const otherDrugControl = this.victimForm.get('otherDrug');\r\n otherDrugControl.setValidators(Validators.required);\r\n\r\n }\r\n\r\n this.cpoExpirationDivFlag =this.victimDetail.cpoExpirationFlag;\r\n this.commonChildrenDivFlag = this.victimDetail.commonChildrenFlag;\r\n this.supportInPlaceDivFlag= this.victimDetail.supportInPlaceFlag;\r\n this.weaponInvolvedDivFlag= this.victimDetail.weaponInvolvedFlag;\r\n this.drugUseDivFlag= this.victimDetail.drugUseFlag;\r\n this.addressId = this.victimDetail.addressId;\r\n this.guardianAddressId = this.victimDetail.guardianAddressId;\r\n this.advocateAddressId = this.victimDetail.advocateAddressId;\r\n\r\n this._getVictim();\r\n\r\n } else {\r\n //add new record\r\n this.victimForm.patchValue({guardianNoPhoneFlag: true});\r\n this.victimForm.patchValue({advocateNoPhoneFlag: true});\r\n \r\n }\r\n\r\n this.victimService.getFlagOptionYesNoUnknowns().subscribe(\r\n (items: any) => {\r\n this.flagOption = items;\r\n }\r\n );\r\n this.victimService.getGenders().subscribe(\r\n (items: any) => {\r\n this.genders = items;\r\n }\r\n );\r\n this.victimService.getPrefixes().subscribe(\r\n (items: any) => {\r\n this.prefixes = items;\r\n }\r\n );\r\n this.victimService.getSuffixes().subscribe(\r\n (items: any) => {\r\n this.suffixes = items;\r\n }\r\n );\r\n this.victimService.getRelationshipTypes().subscribe(\r\n (items: any) => {\r\n this.relationshipTypes = items.filter( (y) => (y.relationshipCategoryId === 'ST' || y.relationshipCategoryId === 'FM' ));\r\n }\r\n );\r\n this.victimService.getSupportTypes().subscribe(\r\n (items: any) => {\r\n this.victimSupportTypes = items;\r\n }\r\n );\r\n this.victimService.getWeaponTypes().subscribe(\r\n (items: any) => {\r\n this.weaponTypes = items;\r\n }\r\n );\r\n this.victimService.getDrugsTypes().subscribe(\r\n (items: any) => {\r\n console.log('drug lookup items');\r\n console.log(items);\r\n this.drugs = items;\r\n this.drugs.push({drugTypeId: 'OTHER', name: 'Other'});\r\n console.log(this.drugs);\r\n }\r\n );\r\n // this.victimService.getDocketList(this.offenderId).subscribe(\r\n // (items: any) => {\r\n // this.docketlist = items;\r\n // }\r\n\r\n // );\r\n\r\n this.victimForm.get('minorFlag').valueChanges\r\n .subscribe(value => {\r\n this.victimForm.get('guardianFirstName').updateValueAndValidity();\r\n this.victimForm.get('guardianLastName').updateValueAndValidity();\r\n this.victimForm.get('guardianWorkPhone').updateValueAndValidity();\r\n this.victimForm.get('guardianHomePhone').updateValueAndValidity();\r\n this.victimForm.get('guardianCellPhone').updateValueAndValidity();\r\n \r\n });\r\n\r\n\r\n this.victimForm.get('victimAdvocateFlag').valueChanges\r\n .subscribe(value => {\r\n this.victimForm.get('advocateFirstName').updateValueAndValidity();\r\n this.victimForm.get('advocateLastName').updateValueAndValidity();\r\n this.victimForm.get('advocateWorkPhone').updateValueAndValidity();\r\n this.victimForm.get('advocateHomePhone').updateValueAndValidity();\r\n this.victimForm.get('advocateCellPhone').updateValueAndValidity();\r\n \r\n });\r\n\r\n }\r\n\r\n back(){\r\n\r\n this.onSave.emit(this.victimDetail);\r\n \r\n }\r\n\r\n deleteVictim() {\r\n this.commonDialogService\r\n .confirm('', 'Do you want to delete this Victim?', 'Yes', 'No')\r\n .subscribe(res => {this.result = res;\r\n if (this.result) {\r\n this.victimService.deleteVictims(this.victimDetail.victimId)\r\n .subscribe(result => {\r\n this.snackBar.open('Delete Successfully!', '', {\r\n duration: 3000, });}\r\n \r\n );\r\n // this.router.navigate(['victim']);\r\n this.onSave.emit(this.victimDetail);\r\n }\r\n });\r\n\r\n }\r\n\r\n radioMinorChange($event: MatRadioChange){\r\n const guardianLastNameControl = this.victimForm.get('guardianLastName');\r\n const guardianFirstNameControl = this.victimForm.get('guardianFirstName');\r\n\r\n \r\n if ($event.value === true) {\r\n this.guardianTabFlag = true;\r\n guardianLastNameControl.setValidators(Validators.required);\r\n guardianFirstNameControl.setValidators(Validators.required);\r\n //this.victimForm.value.guardianNoPhoneFlag = true;\r\n \r\n \r\n }\r\n else{\r\n this.guardianTabFlag = false;\r\n guardianLastNameControl.clearValidators();\r\n guardianFirstNameControl.clearValidators();\r\n \r\n \r\n }\r\n\r\n\t\tguardianLastNameControl.updateValueAndValidity();\r\n guardianFirstNameControl.updateValueAndValidity();\r\n \r\n }\r\n\r\n radioAdvocateChange($event: MatRadioChange){\r\n\r\n const advocateLastNameControl = this.victimForm.get('advocateLastName');\r\n const advocateFirstNameControl = this.victimForm.get('advocateFirstName');\r\n // const advocateNoPhoneControl = this.victimForm.get('advocateNoPhoneFlag');\r\n \r\n \r\n\r\n if ($event.value === \"YS\") {\r\n this.advocateTabFlag = true;\r\n advocateLastNameControl.setValidators(Validators.required);\r\n advocateFirstNameControl.setValidators(Validators.required);\r\n \r\n \r\n }\r\n else{\r\n this.advocateTabFlag = false;\r\n \r\n advocateLastNameControl.clearValidators();\r\n advocateFirstNameControl.clearValidators();\r\n\r\n }\r\n\r\n advocateLastNameControl.updateValueAndValidity();\r\n advocateFirstNameControl.updateValueAndValidity();\r\n \r\n }\r\n\r\n radioCicChange($event: MatRadioChange){\r\n if ($event.value === true) {\r\n this.commonChildrenDivFlag = true;\r\n // requrie field\r\n this.setValidators('commonChildren');\r\n }\r\n else{\r\n this.commonChildrenDivFlag = false;\r\n }\r\n }\r\n\r\n setValidators(type) {\r\n if(type == 'commonChildren'){\r\n this.victimForm.get('commonChildrenNumber').clearValidators();\r\n this.victimForm.get('commonChildrenNumber').setValidators(Validators.required);\r\n }\r\n else if (type == 'cpo'){\r\n this.victimForm.get('cpoExpirationDate').clearValidators();\r\n this.victimForm.get('cpoExpirationDate').setValidators(Validators.required);\r\n\r\n }\r\n }\r\n radioSupportChange($event: MatRadioChange){\r\n if ($event.value === true) {\r\n this.supportInPlaceDivFlag = true;\r\n }\r\n else{\r\n this.supportInPlaceDivFlag = false;\r\n }\r\n }\r\n radioWeaponChange($event: MatRadioChange){\r\n if ($event.value === true) {\r\n this.weaponInvolvedDivFlag = true;\r\n }\r\n else{\r\n this.weaponInvolvedDivFlag = false;\r\n }\r\n }\r\n radioDrugChange($event: MatRadioChange){\r\n if ($event.value === true) {\r\n this.drugUseDivFlag = true;\r\n }\r\n else{\r\n this.drugUseDivFlag = false;\r\n }\r\n }\r\n\r\n radioCpoChange($event: MatRadioChange){\r\n if ($event.value === true) {\r\n this.cpoExpirationDivFlag = true;\r\n this.setValidators('cpo');\r\n }\r\n else{\r\n this.cpoExpirationDivFlag = false;\r\n }\r\n }\r\n\r\n handleDOBChange($event ){\r\n var ageDifMs = Date.now() - $event.value;\r\n var ageDate = new Date(ageDifMs); \r\n if( Math.abs(ageDate.getUTCFullYear() - 1970) <= 18){\r\n \r\n this.snackBar.open('Victim is a Minor. This information is a sensitive and should not be disclosed to any unauthorized parties. Contact the legal guardian.', '', {\r\n duration: 6000,});\r\n const minorControl = this.victimForm.get('minorFlag');\r\n minorControl.setValue(true);\r\n const guardianLastNameControl = this.victimForm.get('guardianLastName');\r\n const guardianFirstNameControl = this.victimForm.get('guardianFirstName');\r\n \r\n\r\n this.guardianTabFlag = true;\r\n guardianLastNameControl.setValidators(Validators.required);\r\n guardianFirstNameControl.setValidators(Validators.required);\r\n\r\n \r\n \r\n }\r\n\r\n }\r\n checkOtherWeapon(WeaponUse){\r\n\r\n const otherWeaponControl = this.victimForm.get('otherWeapon');\r\n if (WeaponUse.includes(\"OTHER\")){\r\n this.otherWeaponFlag = true;\r\n otherWeaponControl.setValidators(Validators.required)\r\n\r\n }else{\r\n this.otherWeaponFlag = false;\r\n otherWeaponControl.clearValidators();\r\n }\r\n otherWeaponControl.updateValueAndValidity();\r\n }\r\n\r\n checkOtherDrug(DrugUse){\r\n\r\n const otherDrugControl = this.victimForm.get('otherDrug');\r\n if (DrugUse.includes(\"OTHER\")){\r\n this.otherDrugFlag = true;\r\n otherDrugControl.setValidators(Validators.required)\r\n \r\n\r\n }else{\r\n this.otherDrugFlag = false;\r\n otherDrugControl.clearValidators();\r\n \r\n\r\n }\r\n otherDrugControl.updateValueAndValidity();\r\n }\r\n \r\n //#region \"save victim\"\r\n saveVictim() {\r\n //var myPath = this.router.url.slice(-10)\r\n\r\n //guardian phone logic\r\n if (!this.victimForm.value.guardianNoPhoneFlag)\r\n {\r\n if (this.victimForm.value.guardianHomePhone){\r\n if (this.victimForm.value.guardianHomePhone !== null){\r\n if (this.victimForm.value.guardianHomePhone !== \"\"){\r\n this.guardianPhoneExistFlag = true;\r\n }\r\n }\r\n }\r\n\r\n\r\n\r\n if (this.victimForm.value.guardianWorkPhone !== undefined){\r\n if (this.victimForm.value.guardianWorkPhone !== null){\r\n if (this.victimForm.value.guardianWorkPhone !== \"\"){\r\n this.guardianPhoneExistFlag = true;\r\n }\r\n }\r\n }\r\n\r\n\r\n if (this.victimForm.value.guardianCellPhone){\r\n if (this.victimForm.value.guardianCellPhone !== null){\r\n if (this.victimForm.value.guardianCellhone !== \"\"){\r\n this.guardianPhoneExistFlag = true;\r\n }\r\n }\r\n }\r\n\r\n }\r\n \r\n console.log('this.victimForm.value.guardianNoPhoneFlag');\r\n console.log(this.victimForm.value.guardianNoPhoneFlag);\r\n console.log('this.guardianPhoneExistFlag');\r\n console.log(this.guardianPhoneExistFlag);\r\n \r\n\r\n if (this.guardianPhoneExistFlag === false && this.victimForm.value.guardianNoPhoneFlag === false)\r\n {\r\n \r\n this.phoneValidationFlag = true;\r\n this.commonDialogService\r\n .warning('', 'Please check the guardian phone field. You have to fill one of the three phone fileds.', 'Ok')\r\n .subscribe(res => {this.result = res;\r\n \r\n });\r\n }\r\n console.log('this.phoneValidationFlag');\r\n console.log(this.phoneValidationFlag);\r\n\r\n//advocate phone logic\r\nif (!this.victimForm.value.advocateNoPhoneFlag)\r\n{\r\n if (this.victimForm.value.advocateHomePhone){\r\n if (this.victimForm.value.advocateHomePhone !== null){\r\n if (this.victimForm.value.advocateHomePhone !== \"\"){\r\n this.advocatePhoneExistFlag = true;\r\n }\r\n }\r\n }\r\n\r\n\r\n\r\n if (this.victimForm.value.advocateWorkPhone !== undefined){\r\n if (this.victimForm.value.advocateWorkPhone !== null){\r\n if (this.victimForm.value.advocateWorkPhone !== \"\"){\r\n this.advocatePhoneExistFlag = true;\r\n }\r\n }\r\n }\r\n\r\n\r\n if (this.victimForm.value.advocateCellPhone){\r\n if (this.victimForm.value.advocateCellPhone !== null){\r\n if (this.victimForm.value.advocateCellhone !== \"\"){\r\n this.advocatePhoneExistFlag = true;\r\n }\r\n }\r\n }\r\n\r\n}\r\n\r\n console.log('this.victimForm.value.advocateNoPhoneFlag');\r\n console.log(this.victimForm.value.advocateNoPhoneFlag);\r\n console.log('this.advocatePhoneExistFlag');\r\n console.log(this.advocatePhoneExistFlag);\r\n\r\n if(this.advocatePhoneExistFlag === false && this.victimForm.value.advocateNoPhoneFlag === false)\r\n {\r\n \r\n this.phoneValidationFlag = true;\r\n this.commonDialogService\r\n .warning('', 'Please check the advocate phone field. You have to fill one of the three phone fileds.', 'Ok')\r\n .subscribe(res => {this.result = res;\r\n \r\n });\r\n }\r\n\r\n\r\n console.log('this.phoneValidationFlag 1');\r\n console.log(this.phoneValidationFlag);\r\n if ( this.phoneValidationFlag === false){\r\n\r\n\r\n if (this.victimDetail === null){\r\n //insert new victim\r\n \r\n var myVictimSupports = [];\r\n if (this.victimForm.value.victimSupports){\r\n this.victimForm.value.victimSupports.forEach(element => {\r\n const victimSupport= <VictimSupport>{};\r\n victimSupport.victimId= this.victimForm.value.victimId;\r\n victimSupport.victimSupportTypeId= element;\r\n victimSupport.modifiedBy= this.staffId;\r\n myVictimSupports.push(victimSupport);\r\n });\r\n }\r\n\r\n var myVictimDrugUses = [];\r\n console.log('this.victimForm.value.victimDrugUses during save');\r\n console.log(this.victimForm.value.victimDrugUses);\r\n if (this.victimForm.value.victimDrugUses){\r\n this.victimForm.value.victimDrugUses.forEach(element => {\r\n const victimDrugUse = <VictimDrugUse>{};\r\n victimDrugUse.drugTypeId = element;\r\n\r\n if (element ===\"OTHER\" || element === \"\" || element === null){\r\n victimDrugUse.drugTypeId = null;\r\n victimDrugUse.otherDrug = this.victimForm.value.otherDrug;\r\n }\r\n else{\r\n victimDrugUse.drugTypeId = element;\r\n victimDrugUse.otherDrug = null; \r\n }\r\n \r\n victimDrugUse.modifiedBy = this.staffId;\r\n victimDrugUse.victimId = this.victimForm.value.victimId;\r\n myVictimDrugUses.push(victimDrugUse);\r\n });\r\n }\r\n\r\n console.log('this.victimForm.value.victimDrugUses during save 1');\r\n console.log(this.victimForm.value.victimDrugUses);\r\n\r\n\r\n\r\n var myVictimWeaponUses = [];\r\n\r\n if (this.victimForm.value.victimWeaponUses){\r\n this.victimForm.value.victimWeaponUses.forEach(element => {\r\n const victimWeaponUse = <VictimWeaponUse>{};\r\n victimWeaponUse.victimId= this.victimForm.value.victimId;\r\n victimWeaponUse.weaponTypeId= element;\r\n\r\n if (element ==\"OTHER\"){\r\n victimWeaponUse.otherWeapon = this.victimForm.value.otherWeapon;\r\n }\r\n else{\r\n victimWeaponUse.otherWeapon = null; \r\n }\r\n\r\n victimWeaponUse.modifiedBy= this.staffId;\r\n myVictimWeaponUses.push(victimWeaponUse);\r\n });\r\n }\r\n\r\n const newVictim = {\r\n victimId: 0,\r\n offenderId: this.offenderId,\r\n victimOffenderRelationshipTypeId:this.victimForm.value.victimOffenderRelationshipTypeId,\r\n lastName: this.victimForm.value.lastName,\r\n firstName: this.victimForm.value.firstName,\r\n middleName: this.victimForm.value.middleName ? this.victimForm.value.middleName : null,\r\n prefixId:this.victimForm.value.prefixId ? this.victimForm.value.prefixId : null ,\r\n suffixId:this.victimForm.value.suffixId ? this.victimForm.value.suffixId: null,\r\n birthDate:this.victimForm.value.birthDate? this.victimForm.value.birthDate : null,\r\n genderCode: this.victimForm.value.genderCode? this.victimForm.value.genderCode: null,\r\n underSupervisionFlag: this.victimForm.value.underSupervisionFlag,\r\n minorFlag: this.victimForm.value.minorFlag,\r\n victimAdvocateFlag: this.victimForm.value.victimAdvocateFlag,\r\n homePhone: this.victimForm.value.homePhone ? this.victimForm.value.homePhone : null,\r\n workPhone: this.victimForm.value.workPhone ? this.victimForm.value.workPhone : null,\r\n cellPhone: this.victimForm.value.cellPhone ? this.victimForm.value.cellPhone: null,\r\n email: this.victimForm.value.email ? this.victimForm.value.email: null,\r\n addressId: this.victimForm.value.addressId ? this.victimForm.value.addressId: 1,\r\n emergencyContact: this.victimForm.value.emergencyContact ? this.victimForm.value.emergencyContact : null,\r\n emergencyContactPhone: this.victimForm.value.emergencyContactPhone ? this.victimForm.value.emergencyContactPhone: null ,\r\n commonChildrenFlag: this.victimForm.value.commonChildrenFlag,\r\n commonChildrenNumber: this.victimForm.value.commonChildrenNumber,\r\n cpoExpirationFlag: this.victimForm.value.cpoExpirationFlag,\r\n cpoExpirationDate: this.victimForm.value.cpoExpirationDate ? this.datePipe.transform(this.victimForm.value.startDate, 'short') : null,\r\n supportInPlaceFlag: this.victimForm.value.supportInPlaceFlag,\r\n weaponInvolvedFlag: this.victimForm.value.weaponInvolvedFlag,\r\n drugUseFlag: this.victimForm.value.drugUseFlag,\r\n alcoholUseFlag: this.victimForm.value.alcoholUseFlag,\r\n accessRisk:this.victimForm.value.accessRisk,\r\n modifiedBy:this.staffId,\r\n vVictimAdvocate: null,\r\n vVictimGuardian: null,\r\n victimDrugUses: myVictimDrugUses,\r\n victimSupports: myVictimSupports,\r\n victimWeaponUses: myVictimWeaponUses,\r\n\r\n advocateFirstName: null,\r\n advocateLastName: null,\r\n advocateEmail: null,\r\n advocatePrefixId: null,\r\n advocateSuffixId: null,\r\n advocateNoPhoneFlag: null,\r\n advocateHomePhone: null,\r\n advocateWorkPhone: null,\r\n advocateCellPhone: null,\r\n advocateAddressId: null,\r\n guardianFirstName: null,\r\n guardianLastName: null,\r\n guardianEmail: null,\r\n guardianPrefixId: null,\r\n guardianSuffixId: null,\r\n guardianNoPhoneFlag: null,\r\n guardianHomePhone: null,\r\n guardianWorkPhone: null,\r\n guardianCellPhone: null,\r\n guardianAddressId: null,\r\n guardianBirthDate: null,\r\n relationship: null,\r\n allowCsosaContactFlag: null\r\n \r\n\r\n }\r\n\r\n if (this.addressId == 0){\r\n newVictim.addressId = null;\r\n } else {\r\n newVictim.addressId = this.addressId;\r\n }\r\n \r\n newVictim.advocateAddressId = this.advocateAddressId;\r\n newVictim.guardianAddressId = this.guardianAddressId;\r\n console.log('newVictim');\r\n console.log(newVictim);\r\n this.victimService.postVictims(newVictim).subscribe(\r\n (items: any) => {\r\n \r\n const id = items ? items.victimId : '';\r\n\r\n if (this.victimForm.value.victimAdvocateFlag == \"YS\"){\r\n console.log('add advocate');\r\n const victimAdvocate: VictimAdvocate = {\r\n victimAdvocateId: id,\r\n lastName: this.victimForm.value.advocateLastName,\r\n firstName: this.victimForm.value.advocateFirstName,\r\n prefixId: this.victimForm.value.advocatePrefixId,\r\n suffixId: this.victimForm.value.advocateSuffixId,\r\n addressId: this.advocateAddressId ? this.advocateAddressId: null,\r\n noPhoneFlag: this.victimForm.value.advocateNoPhoneFlag ? this.victimForm.value.advocateNoPhoneFlag: null,\r\n homePhone: this.victimForm.value.advocateHomePhone,\r\n workPhone: this.victimForm.value.advocateWorkPhone,\r\n cellPhone: this.victimForm.value.advocateCellPhone,\r\n email: this.victimForm.value.advocateEmail,\r\n modifiedBy: this.staffId\r\n \r\n \r\n };\r\n \r\n this.victimService.postVictimAdvocate(id, victimAdvocate).subscribe();\r\n }\r\n \r\n if (this.victimForm.value.minorFlag == true){\r\n \r\n const victimGuardian: VictimGuardian = {\r\n victimGuardianId: id,\r\n lastName: this.victimForm.value.guardianLastName,\r\n firstName: this.victimForm.value.guardianFirstName,\r\n prefixId: this.victimForm.value.guardianPrefixId, \r\n suffixId: this.victimForm.value.guardianSuffixId,\r\n birthDate: this.victimForm.value.guardianBirthDate,\r\n addressId: this.guardianAddressId? this.guardianAddressId: null,\r\n noPhoneFlag: this.victimForm.value.guardianNoPhoneFlag? this.victimForm.value.guardianNoPhoneFlag: null,\r\n homePhone: this.victimForm.value.guardianHomePhone,\r\n workPhone: this.victimForm.value.guardianWorkPhone,\r\n cellPhone: this.victimForm.value.guardianCellPhone,\r\n email: this.victimForm.value.guardianEmail,\r\n modifiedBy: this.staffId\r\n \r\n \r\n };\r\n \r\n this.victimService.postVictimGuardian(id, victimGuardian).subscribe();\r\n \r\n }\r\n\r\n this.snackBar.open('Add Victim Successfully!', '', {\r\n duration: 3000,\r\n });\r\n\r\n //insert new\r\n if (this.isIntake===true){\r\n this.router.navigate(['victimHome']);\r\n }\r\n else\r\n {\r\n this.router.navigate(['victimList']);\r\n }\r\n //this.onSave.emit(this.victimDetail);\r\n \r\n }\r\n );\r\n\r\n }\r\n else {\r\n //update victim\r\n console.log(' this.victimForm.value.victimOffenderRelationshipTypeId');\r\n console.log( this.victimForm.value.victimOffenderRelationshipTypeId);\r\n \r\n this.victimDetail.underSupervisionFlag = this.victimForm.value.underSupervisionFlag;\r\n this.victimDetail.victimOffenderRelationshipTypeId = this.victimForm.value.victimOffenderRelationshipTypeId;\r\n this.victimDetail.lastName = this.victimForm.value.lastName;\r\n this.victimDetail.firstName = this.victimForm.value.firstName;\r\n this.victimDetail.middleName = this.victimForm.value.middleName;\r\n this.victimDetail.prefixId = this.victimForm.value.prefixId ? this.victimForm.value.prefixId : null;\r\n this.victimDetail.suffixId = this.victimForm.value.suffixId ? this.victimForm.value.suffixId : null;\r\n this.victimDetail.birthDate = this.victimForm.value.birthDate;\r\n this.victimDetail.genderCode = this.victimForm.value.genderCode;\r\n this.victimDetail.minorFlag = this.victimForm.value.minorFlag;\r\n this.victimDetail.homePhone = this.victimForm.value.homePhone? this.victimForm.value.homePhone: null;\r\n this.victimDetail.workPhone = this.victimForm.value.workPhone? this.victimForm.value.workPhone: null;\r\n this.victimDetail.cellPhone = this.victimForm.value.cellPhone? this.victimForm.value.cellPhone: null;\r\n this.victimDetail.email = this.victimForm.value.email;\r\n this.victimDetail.victimAdvocateFlag = this.victimForm.value.victimAdvocateFlag;\r\n this.victimDetail.emergencyContact = this.victimForm.value.emergencyContact;\r\n this.victimDetail.emergencyContactPhone = this.victimForm.value.emergencyContactPhone? this.victimForm.value.emergencyContactPhone: null;\r\n this.victimDetail.commonChildrenFlag = this.victimForm.value.commonChildrenFlag;\r\n this.victimDetail.commonChildrenNumber = this.victimForm.value.commonChildrenNumber;\r\n this.victimDetail.cpoExpirationDate = this.victimForm.value.cpoExpirationDate;\r\n this.victimDetail.cpoExpirationFlag = this.victimForm.value.cpoExpirationFlag;\r\n this.victimDetail.supportInPlaceFlag = this.victimForm.value.supportInPlaceFlag;\r\n this.victimDetail.weaponInvolvedFlag = this.victimForm.value.weaponInvolvedFlag;\r\n this.victimDetail.drugUseFlag = this.victimForm.value.drugUseFlag;\r\n this.victimDetail.alcoholUseFlag = this.victimForm.value.alcoholUseFlag;\r\n this.victimDetail.accessRisk = this.victimForm.value.accessRisk;\r\n this.victimDetail.addressId = this.victimForm.value.addressId;\r\n this.victimDetail.allowCsosaContactFlag = this.victimForm.value.allowCsosaContactFlag;\r\n \r\n \r\n this.victimDetail.victimSupports = [];\r\n this.victimForm.value.victimSupports.forEach(element => {\r\n const victimSupport= <VictimSupport>{};\r\n victimSupport.victimId= this.victimDetail.victimId;\r\n victimSupport.victimSupportTypeId= element;\r\n victimSupport.modifiedBy= this.staffId;\r\n this.victimDetail.victimSupports.push(victimSupport);\r\n });\r\n\r\n\r\n this.victimDetail.victimDrugUses = [];\r\n\r\n console.log('this.victimForm.value.victimDrugUses calculate')\r\n console.log(this.victimForm.value.victimDrugUses)\r\n\r\n this.victimForm.value.victimDrugUses.forEach(element => {\r\n const victimDrugUse = <VictimDrugUse>{};\r\n victimDrugUse.drugTypeId = element;\r\n console.log('this.victimForm.value.victimDrugUses before')\r\n console.log(this.victimForm.value.victimDrugUses)\r\n \r\n if (element === \"OTHER\" || element === \"\" ){\r\n victimDrugUse.drugTypeId = null;\r\n victimDrugUse.otherDrug = this.victimForm.value.otherDrug;\r\n }\r\n else{\r\n victimDrugUse.drugTypeId = element;\r\n victimDrugUse.otherDrug = null;\r\n }\r\n\r\n victimDrugUse.modifiedBy = this.staffId;\r\n victimDrugUse.victimId = this.victimDetail.victimId;\r\n this.victimDetail.victimDrugUses.push(victimDrugUse);\r\n console.log('this.victimForm.value.victimDrugUses after')\r\n console.log(this.victimForm.value.victimDrugUses)\r\n \r\n });\r\n\r\n\r\n\r\n this.victimForm.value.victimDrugUses.filter(word => ( !(word.drugTypeId === null && word.otherDrug === null) ));\r\n\r\n\r\n console.log('adjust this.victimForm.value.victimDrugUses ')\r\n console.log(this.victimForm.value.victimDrugUses)\r\n \r\n this.victimDetail.victimWeaponUses = [];\r\n this.victimForm.value.victimWeaponUses.forEach(element => {\r\n const victimWeaponUse = <VictimWeaponUse>{};\r\n victimWeaponUse.victimId= this.victimDetail.victimId;\r\n victimWeaponUse.weaponTypeId= element; \r\n\r\n console.log('weapon element');\r\n console.log(element);\r\n console.log(this.victimForm.value.otherWeapon);\r\n console.log(this.victimForm.value.victimWeaponUses);\r\n\r\n if (element ==\"OTHER\"){\r\n victimWeaponUse.otherWeapon=this.victimForm.value.otherWeapon;\r\n }\r\n else{\r\n victimWeaponUse.otherWeapon = null;\r\n }\r\n\r\n victimWeaponUse.modifiedBy= this.staffId;\r\n this.victimDetail.victimWeaponUses.push(victimWeaponUse);\r\n \r\n });\r\n\r\n \r\n console.log('this.victimDetail before emit');\r\n console.log(this.victimDetail);\r\n\r\n this.victimService.putVictims(this.victimDetail.victimId,this.victimDetail).subscribe(\r\n (items: any) => {\r\n this.snackBar.open('Update Successfully!', '', {\r\n duration: 3000,\r\n });\r\n \r\n //Advocate section\r\n\r\n this.victimAdvocate.victimAdvocateId = this.victimDetail.victimId;\r\n this.victimAdvocate.lastName= this.victimForm.value.advocateLastName;\r\n this.victimAdvocate.firstName= this.victimForm.value.advocateFirstName;\r\n this.victimAdvocate.prefixId= this.victimForm.value.advocatePrefixId ? this.victimForm.value.advocatePrefixId : null;\r\n this.victimAdvocate.suffixId= this.victimForm.value.advocateSuffixId ? this.victimForm.value.advocateSuffixId : null;\r\n this.victimAdvocate.addressId= this.advocateAddressId ? this.advocateAddressId : null;\r\n this.victimAdvocate.noPhoneFlag= this.victimForm.value.advocateNoPhoneFlag? true: false;\r\n this.victimAdvocate.homePhone= this.victimForm.value.advocateHomePhone ? this.victimForm.value.advocateHomePhone : null;\r\n this.victimAdvocate.workPhone= this.victimForm.value.advocateWorkPhone ? this.victimForm.value.advocateWorkPhone : null;\r\n this.victimAdvocate.cellPhone= this.victimForm.value.advocateCellPhone ? this.victimForm.value.advocateCellPhone : null;\r\n this.victimAdvocate.email= this.victimForm.value.advocateEmail ? this.victimForm.value.advocateEmail : null;\r\n this.victimAdvocate.modifiedBy= this.staffId;\r\n \r\n \r\n \r\n if (this.victimDetail.victimAdvocateFlag=='YS' && this.victimDetail.advocateFirstName != null)\r\n {\r\n this.victimService.putVictimAdvocate(this.victimDetail.victimId,this.victimAdvocate).subscribe(\r\n resp=>{\r\n }\r\n );\r\n }\r\n else\r\n {\r\n console.log('add advocate');\r\n this.victimService.postVictimAdvocate(this.victimDetail.victimId, this.victimAdvocate).subscribe();\r\n }\r\n \r\n // guardian section\r\n this.victimGuardian.victimGuardianId = this.victimDetail.victimId;\r\n this.victimGuardian.lastName = this.victimForm.value.guardianLastName;\r\n this.victimGuardian.firstName = this.victimForm.value.guardianFirstName;\r\n this.victimGuardian.prefixId = this.victimForm.value.guardianPrefixId ? this.victimForm.value.guardianPrefixId : null;\r\n this.victimGuardian.suffixId = this.victimForm.value.guardianSuffixId ? this.victimForm.value.guardianSuffixId : null;\r\n this.victimGuardian.addressId = this.guardianAddressId ? this.guardianAddressId : null;\r\n this.victimGuardian.noPhoneFlag = this.victimForm.value.guardianNoPhoneFlag? true: false;\r\n this.victimGuardian.homePhone = this.victimForm.value.guardianHomePhone ? this.victimForm.value.guardianHomePhone : null;\r\n this.victimGuardian.workPhone = this.victimForm.value.guardianWorkPhone ? this.victimForm.value.guardianWorkPhone : null;\r\n this.victimGuardian.cellPhone = this.victimForm.value.guardianCellPhone ? this.victimForm.value.guardianCellPhone : null;\r\n this.victimGuardian.email = this.victimForm.value.guardianEmail ? this.victimForm.value.guardianEmail : null;\r\n this.victimGuardian.modifiedBy = this.staffId;\r\n \r\n if (this.victimDetail.minorFlag == true && this.victimDetail.guardianFirstName != null )\r\n {\r\n \r\n this.victimService.putVictimGuardian(this.victimDetail.victimId,this.victimGuardian).subscribe(\r\n resp=>{\r\n }\r\n );\r\n }\r\n else\r\n {\r\n \r\n this.victimService.postVictimGuardian(this.victimDetail.victimId, this.victimGuardian).subscribe();\r\n }\r\n \r\n }\r\n \r\n );\r\n \r\n }\r\n }//end of this.phoneValidationFlag = false\r\n \r\n this.onSave.emit(this.victimDetail);\r\n \r\n }\r\n\r\n //#endregion \"save victim\"\r\n addContact(){\r\n\r\n this.router.navigate(['victimContact',this.victimId]);\r\n }\r\n formatLabel(value: number) {\r\n return value;\r\n }\r\n\r\n \r\n}\r\n","import { Component, OnInit, Inject } from '@angular/core';\r\nimport {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';\r\n\r\n@Component({\r\n selector: 'csmart-victim-delete-confirm',\r\n template: `\r\n <h1 mat-dialog-title>Delete Confirmation</h1>\r\n <div mat-dialog-content>\r\n <p>Are you sure you want to delete this item?</p>\r\n </div>\r\n <div mat-dialog-actions class=\"actions\">\r\n <button mat-flat-button color=\"primary\" (click)=\"onNoClick()\">No</button>\r\n <button mat-flat-button color=\"warn\" [mat-dialog-close]='\"YES\"' cdkFocusInitial>Yes</button>\r\n </div>\r\n `,\r\n styles: [`\r\n .actions{\r\n display: flex;\r\n justify-content: space-between; \r\n }\r\n `]\r\n})\r\nexport class SmartVictimDeleteConfirmComponent implements OnInit {\r\n\r\n constructor( public dialogRef: MatDialogRef<SmartVictimDeleteConfirmComponent>,\r\n @Inject(MAT_DIALOG_DATA) public data: any) { }\r\n\r\n onNoClick(): void {\r\n this.dialogRef.close();\r\n }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\r\n//import {MAT_MOMENT_DATE_FORMATS, MomentDateAdapter} from '@angular/material-moment-adapter';\r\nimport {BrowserModule} from '@angular/platform-browser';\r\nimport {platformBrowserDynamic} from '@angular/platform-browser-dynamic';\r\nimport {CdkTableModule} from '@angular/cdk/table';\r\nimport {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE} from '@angular/material/core';\r\nimport {MatIconModule} from '@angular/material/icon';\r\n\r\n\r\nimport {\r\n MatButtonModule, MatCardModule, MatCheckboxModule, MatToolbarModule, MatSelectModule, MatDatepickerModule,\r\n MatProgressSpinnerModule, MatGridListModule, MatTableModule, MatSidenavModule, MatRadioModule, MatPaginatorModule,\r\n // tslint:disable-next-line:whitespace\r\n MatNativeDateModule, MatSliderModule, MatDialogModule, MatChipsModule,MatSortModule,\r\n MatTabsModule, MatRippleModule, MatListModule, MatInputModule, MatFormFieldModule, MatStepperModule, MatExpansionModule,\r\n \r\n \r\n} from '@angular/material';\r\nimport {MatSnackBarModule} from '@angular/material/snack-bar';\r\n\r\n\r\n\r\n\r\n@NgModule(\r\n {\r\n \r\n imports: [\r\n MatButtonModule,\r\n MatCardModule,\r\n MatCheckboxModule,\r\n MatToolbarModule,\r\n MatSelectModule,\r\n MatDatepickerModule,\r\n MatNativeDateModule,\r\n MatDialogModule,\r\n MatTabsModule,\r\n MatListModule,\r\n MatInputModule,\r\n MatStepperModule,\r\n BrowserAnimationsModule,\r\n MatGridListModule,\r\n MatProgressSpinnerModule,\r\n MatTableModule,\r\n MatSidenavModule,\r\n MatRadioModule,\r\n MatIconModule,\r\n MatSliderModule,\r\n MatChipsModule,\r\n MatSnackBarModule,\r\n CdkTableModule,\r\n MatSortModule,\r\n MatPaginatorModule,\r\n MatExpansionModule,\r\n MatRippleModule,\r\n\r\n\r\n ],\r\n exports: [\r\n \r\n MatButtonModule,\r\n MatCardModule,\r\n MatCheckboxModule,\r\n MatToolbarModule,\r\n MatSelectModule,\r\n MatDatepickerModule,\r\n MatNativeDateModule,\r\n MatDialogModule,\r\n MatTabsModule,\r\n MatListModule,\r\n MatInputModule,\r\n MatStepperModule,\r\n BrowserAnimationsModule,\r\n MatGridListModule,\r\n MatProgressSpinnerModule,\r\n MatTableModule,\r\n MatSidenavModule,\r\n MatRadioModule,\r\n MatIconModule,\r\n MatSliderModule,\r\n MatChipsModule,\r\n MatSnackBarModule,\r\n CdkTableModule,\r\n MatSortModule,\r\n MatPaginatorModule,\r\n MatExpansionModule,\r\n MatRippleModule,\r\n \r\n \r\n ],\r\n entryComponents: [\r\n // SpinnerComponent,\r\n ],\r\n\r\n\r\n }\r\n)\r\nexport class SharedModule { }\r\n","import { CommonDialogService } from './common-dialog.service';\r\n//import { MaterialModule } from '@angular/material';\r\nimport { NgModule } from '@angular/core';\r\nimport { SharedModule } from '../shared/app.shared.module';\r\n\r\nimport { CommonDialogComponent } from './common-dialog.component';\r\n\r\n@NgModule({\r\n imports: [\r\n // MaterialModule.forRoot(),\r\n SharedModule\r\n ],\r\n exports: [\r\n CommonDialogComponent,\r\n ],\r\n declarations: [\r\n CommonDialogComponent,\r\n ],\r\n providers: [\r\n CommonDialogComponent,\r\n ],\r\n entryComponents: [\r\n CommonDialogComponent,\r\n ],\r\n})\r\nexport class CommonDialogModule { }\r\n","import { AbstractControl, ValidatorFn } from '@angular/forms';\r\n\r\n\r\nexport function dateValidator(): ValidatorFn {\r\n return (control: AbstractControl): {[key: string]: any} => {\r\n const dateStr = control.value;\r\n const invalidObj = { 'date': 'future Date is Not Allowed' };\r\n const date = new Date(dateStr);\r\n if (date > new Date()) {\r\n return invalidObj;\r\n }\r\n return null;\r\n };\r\n}\r\n\r\n\r\nexport function passDateValidator(): ValidatorFn {\r\n return (control: AbstractControl): {[key: string]: any} => {\r\n const dateStr = control.value;\r\n const invalidObj = { 'date': 'Pass Date is Not Allowed' };\r\n const date = new Date(dateStr);\r\n if (date < new Date()) {\r\n return invalidObj;\r\n }\r\n return null;\r\n };\r\n}\r\n\r\n\r\n\r\nexport function dateLessThan(dateField1: string, dateField2: string, validatorField: { [key: string]: boolean }): ValidatorFn {\r\n return (c: AbstractControl): { [key: string]: any } | null => {\r\n const date1 = c.get(dateField1).value;\r\n const date2 = c.get(dateField2).value;\r\n \r\n console.log('date1');\r\n console.log(date1);\r\n console.log('date2');\r\n console.log(date2);\r\n //const invalidObj = { 'dateRule': 'date is Not Allowed' };\r\n if ((date1 !== null && date2 !== null) && date1 > date2) {\r\n console.log(validatorField);\r\n return validatorField;\r\n //return invalidObj;\r\n\r\n }\r\n console.log('return null');\r\n return null;\r\n };\r\n}\r\n\r\n\r\n\r\nexport function greaterLessThan(dateField1: string, dateField2: string, validatorField: { [key: string]: boolean }): ValidatorFn {\r\n return (c: AbstractControl): { [key: string]: any } | null => {\r\n const date1 = c.get(dateField1).value;\r\n const date2 = c.get(dateField2).value;\r\n \r\n console.log('end date');\r\n console.log(date1);\r\n console.log('ver date');\r\n console.log(date2);\r\n //const invalidObj = { 'dateRule': 'date is Not Allowed' };\r\n if ((date1 !== null && date2 !== null) && date1 < date2) {\r\n console.log(validatorField);\r\n return validatorField;\r\n //return invalidObj;\r\n\r\n }\r\n console.log('return null');\r\n return null;\r\n };\r\n}","import { Component, OnInit,Inject,OnChanges, Input, Output, EventEmitter,AfterViewInit } from '@angular/core';\r\nimport { NgcSmartVictimService } from '../smart-victim.service';\r\nimport { FormControl, FormGroup, FormBuilder,Validators} from '@angular/forms';\r\nimport { CommonDialogService} from '.././common-dialog/common-dialog.service';\r\nimport { MatDialog, MatDialogRef, MAT_DIALOG_DATA,MatSnackBar,MatTableDataSource } from '@angular/material';\r\nimport { SelectedOffender, LoginStaff } from '@csmart/ngc-smart-core';\r\nimport { Router, ActivatedRoute } from '@angular/router';\r\nimport { CaseNote} from '../smart-victim.model';\r\nimport { SmartAuthService } from '@csmart/ngc-smart-core';\r\nimport { dateValidator, passDateValidator } from '../shared/validators';\r\n\r\n\r\n\r\n@Component({\r\n \r\n templateUrl: './caseNote.component.html',\r\n styleUrls: ['./caseNote.component.css'],\r\n providers: [CommonDialogService]\r\n\r\n})\r\nexport class CaseNoteComponent implements OnInit,AfterViewInit {\r\n\r\n // @Input() isIntake: boolean;\r\n offenderId: number;\r\n loginStaff: LoginStaff;\r\n \r\n hiddenDetailFlag:boolean;\r\n caseNoteList: CaseNote[];\r\n caseNote: CaseNote;\r\n editCaseNote: CaseNote = <CaseNote>{};\r\n errorMessage: string;\r\n contactTypes: any[];\r\n contactPurposes: any[];\r\n result: any;\r\n victimName: string;\r\n staffId: number;\r\n victimId: number;\r\n private sub: any;\r\n caseNoteDataSource= new MatTableDataSource();\r\n addDisableFlag: boolean;\r\n hiddenAddNewFlag: boolean;\r\n caseNoteForm: FormGroup;\r\n\r\n constructor(\r\n private formBuilder: FormBuilder, \r\n private _victimServicesComponent: NgcSmartVictimService,\r\n private commonDialogService: CommonDialogService,\r\n public snackBar: MatSnackBar,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private smartAuthService: SmartAuthService,\r\n \r\n ) {\r\n this.initForm();\r\n }\r\n private initForm() {\r\n this.caseNoteForm = this.formBuilder.group({\r\n caseNoteDate: new FormControl('', Validators.compose([\r\n Validators.required,dateValidator()])),\r\n contactType: new FormControl('',Validators.required),\r\n contactPurpose: new FormControl('',Validators.required),\r\n comment: new FormControl('',Validators.required)\r\n });\r\n\r\n this.caseNoteForm.markAsPristine();\r\n this.caseNoteForm.markAsUntouched();\r\n\r\n }\r\n ngAfterViewInit() {\r\n this.smartAuthService.setPermission('Victim', this.route.snapshot);\r\n }\r\n \r\n ngOnInit() {\r\n var data = this.route.snapshot.data;\r\n this.loginStaff = data.loginStaff;\r\n this.staffId = this.loginStaff.staffId;\r\n\r\n\r\n this.sub = this.route.params.subscribe(params => {\r\n this.victimId = params['victimId'];\r\n \r\n });\r\n\r\n this.addDisableFlag= false;\r\n this.hiddenDetailFlag = true;\r\n this.hiddenAddNewFlag = false;\r\n\r\n\r\n this._victimServicesComponent.getVictim(this.victimId).subscribe(\r\n (items: any) => {\r\n this.victimName = items.firstName + ', ' + items.lastName;\r\n }\r\n );\r\n\r\n this._victimServicesComponent.getContactTypes().subscribe(\r\n (items: any) => {\r\n this.contactTypes = items;\r\n }\r\n );\r\n\r\n this._victimServicesComponent.getVictimContactPurposes().subscribe(\r\n (items: any) => {\r\n this.contactPurposes = items;\r\n }\r\n );\r\n\r\n \r\n this._victimServicesComponent.getCasetNotes(this.victimId).subscribe(\r\n caseNoteList => {\r\n console.log('caseNoteList');\r\n console.log(caseNoteList);\r\n this.caseNoteList = caseNoteList; \r\n this.caseNoteDataSource.data = this.caseNoteList;\r\n }\r\n );\r\n\r\n\r\n \r\n\r\n // this._victimServicesComponent.getCasetNotes(this.victimId).subscribe(\r\n // (itms: any) => {\r\n // const ELEMENT_DATA: Element[] = itms;\r\n // this.caseNoteDataSource.data = ELEMENT_DATA;\r\n // })\r\n }\r\n onEditCaseNote(victimCaseNoteId: number){\r\n \r\n this.hiddenDetailFlag =false;\r\n this.hiddenAddNewFlag = true;\r\n\r\n this.addDisableFlag = true;\r\n this.editCaseNote = this.caseNoteList.find(x => x.victimCaseNoteId === victimCaseNoteId);\r\n\r\n }\r\n \r\n onDeleteCaseNote(victimCaseNoteId: number){\r\n this.commonDialogService\r\n .confirm('', 'Do you want to delete this case note?', 'Yes', 'No')\r\n .subscribe(res => {this.result = res;\r\n if (this.result) {\r\n this._victimServicesComponent.deleteCaseNote(victimCaseNoteId, this.staffId)\r\n .subscribe(result => {\r\n this.snackBar.open('delete Successfully !', '', { duration: 3000,});\r\n\r\n this._victimServicesComponent.getCasetNotes(this.victimId).subscribe(\r\n caseNoteList => {\r\n this.caseNoteList = caseNoteList; \r\n this.caseNoteDataSource.data = this.caseNoteList;\r\n }\r\n );\r\n }\r\n );\r\n }\r\n\r\n });\r\n }\r\n onAddNew(){\r\n\r\n this.hiddenDetailFlag = false;\r\n this.editCaseNote.victimCaseNoteId = 0;\r\n\r\n const caseNoteDateControl = this.caseNoteForm.get('caseNoteDate');\r\n caseNoteDateControl.setValue(null);\r\n caseNoteDateControl.setErrors(null);\r\n caseNoteDateControl.markAsPristine();\r\n caseNoteDateControl.markAsPristine();\r\n\r\n\r\n const contactTypeControl = this.caseNoteForm.get('contactType');\r\n contactTypeControl.setValue(null);\r\n contactTypeControl.setErrors(null);\r\n contactTypeControl.markAsPristine();\r\n contactTypeControl.markAsUntouched();\r\n\r\n\r\n const contactPurposeControl = this.caseNoteForm.get('contactPurpose');\r\n contactPurposeControl.setValue(null);\r\n contactPurposeControl.setErrors(null);\r\n contactPurposeControl.markAsPristine();\r\n contactPurposeControl.markAsUntouched();\r\n\r\n\r\n const commentControl = this.caseNoteForm.get('comment');\r\n commentControl.setValue(null);\r\n commentControl.setErrors(null);\r\n commentControl.markAsPristine();\r\n commentControl.markAsUntouched();\r\n \r\n }\r\n back(){\r\n this.router.navigate(['victimHome']);\r\n \r\n }\r\n \r\n saveCaseNote(){\r\n\r\n if (this.editCaseNote.victimCaseNoteId === undefined || this.editCaseNote.victimCaseNoteId === 0) {\r\n\r\n const castNote: CaseNote = {\r\n victimId:this.victimId,\r\n victimCaseNoteId: 0,\r\n caseNoteDate: this.editCaseNote.caseNoteDate,\r\n contactTypeId: this.editCaseNote.contactTypeId,\r\n contactType: null,\r\n victimContactPurposeId: this.editCaseNote.victimContactPurposeId,\r\n victimContactPurpose: null,\r\n comment: this.editCaseNote.comment,\r\n modifiedBy: this.staffId,\r\n victimFirstName: null,\r\n victimLastName: null\r\n\r\n };\r\n this._victimServicesComponent.addCaseNote(castNote).subscribe(\r\n result => {\r\n this.snackBar.open('Saved Successfully !', '', {\r\n duration: 3000,\r\n });\r\n this.hiddenDetailFlag = true;\r\n this._victimServicesComponent.getCasetNotes(this.victimId).subscribe(\r\n caseNoteList => {\r\n this.caseNoteList = caseNoteList; \r\n this.caseNoteDataSource.data = this.caseNoteList;\r\n }\r\n );\r\n }\r\n );\r\n } else {\r\n this._victimServicesComponent.updateCaseNote(this.editCaseNote).subscribe(\r\n result => {\r\n this.snackBar.open('Update Successfully !', '', {\r\n duration: 3000,\r\n });\r\n this.hiddenDetailFlag = true;\r\n this.hiddenAddNewFlag = false;\r\n this.addDisableFlag = false;\r\n this._victimServicesComponent.getCasetNotes(this.victimId).subscribe(\r\n caseNoteList => {\r\n this.caseNoteList = caseNoteList; \r\n this.caseNoteDataSource.data = this.caseNoteList;\r\n }\r\n );\r\n }\r\n );\r\n } \r\n }\r\n\r\n}\r\n","import { Component, OnInit,Inject,OnChanges, Input, Output, EventEmitter,AfterViewInit } from '@angular/core';\r\nimport { NgcSmartVictimService } from '../smart-victim.service';\r\nimport { FormControl, FormGroup, FormBuilder } from '@angular/forms';\r\nimport { CommonDialogService} from '.././common-dialog/common-dialog.service';\r\nimport { MatDialog, MatDialogRef, MAT_DIALOG_DATA,MatSnackBar} from '@angular/material';\r\nimport { SelectedOffender, LoginStaff } from '@csmart/ngc-smart-core';\r\nimport { Router, ActivatedRoute } from '@angular/router';\r\nimport { Contact} from '../smart-victim.model';\r\nimport { SmartAuthService } from '@csmart/ngc-smart-core';\r\n\r\n@Component({\r\n templateUrl: './contact.component.html',\r\n styleUrls: ['./contact.component.css'],\r\n})\r\nexport class ContactComponent implements OnInit,AfterViewInit {\r\n\r\n offenderId: number;\r\n loginStaff: LoginStaff;\r\n contact: Contact;\r\n editContact: Contact = <Contact>{};\r\n errorMessage: string;\r\n contactMethods: any[];\r\n contactBy: any[];\r\n result: any;\r\n victimName: string;\r\n staffId: number;\r\n victimId: number;\r\n hiddenAddNewFlag: boolean;\r\n contactForm: FormGroup;\r\n private sub: any;\r\n staff: any = {};\r\n\r\n constructor(\r\n\r\n private _victimServicesComponent: NgcSmartVictimService,\r\n //private commonDialogService: CommonDialogService,\r\n public snackBar: MatSnackBar,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private smartAuthService: SmartAuthService,\r\n \r\n ) {\r\n this.contactForm = new FormGroup({\r\n contactDate: new FormControl(),\r\n contactMethod: new FormControl(),\r\n contactBy: new FormControl(),\r\n comment: new FormControl(),\r\n nextContactDate: new FormControl()\r\n });\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.smartAuthService.setPermission('Victim', this.route.snapshot);\r\n }\r\n \r\n ngOnInit() {\r\n var data = this.route.snapshot.data;\r\n this.loginStaff = data.loginStaff;\r\n this.staffId = this.loginStaff.staffId;\r\n \r\n this.staff = [\r\n {\r\n staffId: this.loginStaff.staffId,\r\n fullName: this.loginStaff.firstName + ' ' + this.loginStaff.lastName,\r\n },\r\n ];\r\n\r\n\r\n this.sub = this.route.params.subscribe(params => {\r\n this.victimId = params['victimId'];\r\n console.log('my this.victimId');\r\n console.log(this.victimId);\r\n \r\n });\r\n\r\n\r\n this._victimServicesComponent.getContactMethods().subscribe(\r\n (items: any) => {\r\n this.contactMethods = items;\r\n console.log('this.contactMethods');\r\n console.log(this.contactMethods);\r\n }\r\n );\r\n\r\n // this._victimServicesComponent.getContactBys().subscribe(\r\n // (items: any) => {\r\n // this.contactBy= items;\r\n // }\r\n // );\r\n\r\n \r\n // this._victimServicesComponent.getContacts(this.victimId).subscribe(\r\n // caseNoteList => {\r\n \r\n // this.caseNoteList = caseNoteList; \r\n \r\n // }\r\n // );\r\n \r\n }\r\n onEditContact(victimContactId: number){\r\n \r\n // this.hiddenDetailFlag =false;\r\n // this.hiddenAddNewFlag = true;\r\n\r\n // this.addDisableFlag = true;\r\n // this.editCaseNote = this.caseNoteList.find(x => x.victimCaseNoteId === victimCaseNoteId);\r\n\r\n }\r\n \r\n // onDeleteCaseNote(victimCaseNoteId: number){\r\n // this.commonDialogService\r\n // .confirm('', 'Do you want to delete this case note?', 'Yes', 'No')\r\n // .subscribe(res => {this.result = res;\r\n // if (this.result) {\r\n // this._victimServicesComponent.deleteCaseNote(victimCaseNoteId, this.staffId)\r\n // .subscribe(result => {\r\n // this.snackBar.open('delete Successfully !', '', { duration: 3000,});\r\n\r\n // this._victimServicesComponent.getCasetNotes(this.victimId).subscribe(\r\n // caseNoteList => {\r\n // this.caseNoteList = caseNoteList; \r\n \r\n // }\r\n // );\r\n // }\r\n // );\r\n // }\r\n\r\n // });\r\n // }\r\n onAddNew(){\r\n \r\n // this.editCas.caseNoteDate = null;\r\n // this.editCaseNote.contactTypeId = null;\r\n // this.editCaseNote.victimContactPurposeId = null;\r\n // this.editCaseNote.comment = null;\r\n }\r\n back(){\r\n\r\n \r\n this.router.navigate(['victimDetail', this.victimId ]); \r\n }\r\n \r\n saveContact(){\r\n\r\n const contact: Contact = {\r\n victimId:this.victimId,\r\n victimContactId: 0,\r\n contactDate: this.editContact.contactDate,\r\n victimContactMethodId: this.editContact.victimContactMethodId,\r\n contactMethod: null,\r\n contactedByName: null,\r\n contactedBy: this.editContact.contactedBy,\r\n comment: this.editContact.comment,\r\n nextContactDate: this.editContact.nextContactDate,\r\n modifiedBy: this.staffId,\r\n \r\n };\r\n this._victimServicesComponent.addContact(contact).subscribe(\r\n result => {\r\n this.snackBar.open('Saved Successfully !', '', {\r\n duration: 3000,\r\n });\r\n\r\n this.router.navigate(['victimDetail', this.victimId ]); \r\n }\r\n );\r\n }\r\n\r\n}\r\n","import { Component, OnInit,Inject,AfterViewInit } from '@angular/core';\r\nimport { NgcSmartVictimService } from '../smart-victim.service';\r\nimport { FormControl, FormGroup, FormBuilder } from '@angular/forms';\r\nimport { VictimSafetyPlan,VictimServiceDetail,VictimServiceStatusHistory } from '../smart-victim.model';\r\nimport { MatDialog, MatDialogRef, MAT_DIALOG_DATA,MatTableDataSource,MatSnackBar } from '@angular/material';\r\nimport { CommonDialogService} from '.././common-dialog/common-dialog.service';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Observable } from 'rxjs';\r\n//import { VictimSafetyPlanDetailComponent } from './victimSafetyPlanDetail.component';\r\nimport { SelectedOffender, LoginStaff } from '@csmart/ngc-smart-core';\r\nimport { Router, ActivatedRoute } from '@angular/router';\r\nimport { SmartAuthService } from '@csmart/ngc-smart-core';\r\n\r\n@Component({\r\n templateUrl: './victimSafetyPlan.component.html',\r\n providers: [CommonDialogService]\r\n})\r\n\r\nexport class VictimSafetyPlanComponent implements OnInit,AfterViewInit {\r\n //selectedOffender: SelectedOffender;\r\n loginStaff: LoginStaff;\r\n offenderId: number;\r\n\r\n\r\n hiddenDetailFlag:boolean;\r\n hiddenAddNewFlag: boolean;\r\n safetyPlans: VictimSafetyPlan[];\r\n safetyPlan: VictimSafetyPlan;\r\n editSafetyPlan: VictimSafetyPlan = <VictimSafetyPlan>{};\r\n errorMessage: string;\r\n contactTypes: any[];\r\n contactPurposes: any[];\r\n victimServiceTypes: any[];\r\n victimSafetyPlans: VictimSafetyPlan[];\r\n victimServiceStatus: any[];\r\n victimServiceStatusHistories: VictimServiceStatusHistory[];\r\n queryString: string;\r\n victimServiceDetail: VictimServiceDetail[];\r\n myVictimServiceId: number;\r\n result: any;\r\n victimName: string;\r\n staffId: number;\r\n victimId: number;\r\n private sub: any;\r\n safetyPlanDataSource = new MatTableDataSource();\r\n \r\n constructor(\r\n \r\n private _victimServicesComponent: NgcSmartVictimService,\r\n private commonDialogService: CommonDialogService,\r\n private http: HttpClient,\r\n public dialog: MatDialog,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n public snackBar: MatSnackBar,\r\n private smartAuthService: SmartAuthService,\r\n \r\n ) {\r\n \r\n\r\n }\r\n ngAfterViewInit() {\r\n this.smartAuthService.setPermission('Victim', this.route.snapshot);\r\n }\r\n \r\n ngOnInit() {\r\n\r\n var data = this.route.snapshot.data;\r\n this.loginStaff = data.loginStaff;\r\n this.staffId = this.loginStaff.staffId;\r\n\r\n this.sub = this.route.params.subscribe(params => {\r\n this.victimId = params['victimId'];\r\n\r\n });\r\n\r\n this.hiddenAddNewFlag = false;\r\n this.victimName= this.victimName;\r\n \r\n this._victimServicesComponent.getSafetyPlans(this.victimId).subscribe(\r\n victimSafetyPlans => {\r\n this.victimSafetyPlans = victimSafetyPlans; \r\n this.safetyPlanDataSource.data = this.victimSafetyPlans;\r\n console.log('this.victimSafetyPlans');\r\n console.log(this.victimSafetyPlans);\r\n\r\n \r\n }\r\n );\r\n\r\n \r\n // this.myVictimServiceId =1;\r\n // this._victimServicesComponent.getVictimServiceDetail(this.myVictimServiceId).subscribe(\r\n // victimServiceDetail => {\r\n // this.victimServiceDetail = victimServiceDetail;\r\n // console.log('service detail');\r\n // console.log(this.victimServiceDetail); \r\n // }\r\n // );\r\n\r\n this._victimServicesComponent.getServiceStatusHistories(1).subscribe(\r\n victimServiceStatusHistories => {\r\n // this.victimServiceStatusHistories = victimServiceStatusHistories; \r\n }\r\n );\r\n }\r\n \r\n//---------------graphQL--------------------------------------\r\n// getVictimServiceTypeProgramProviders(): Observable<VictimServiceTypeProgramProviderModel[]> {\r\n// const queryString = `\r\n// {\r\n// findVictimServiceTypeProgramProviders {\r\n// data {\r\n// victimServiceTypeProgramProviderId\r\n// victimServiceType\r\n// victimProgramProvider\r\n// }\r\n// }\r\n// }`;\r\n\r\n \r\n// return this.http.post<any>(environment.smartApiUrl, { query: queryString })\r\n// .map(result => {\r\n// return result.data.findVictimServiceTypeProgramProviders.data;\r\n// });\r\n// }\r\n\r\n goToSafetyPlanDetail(victimServiceId: number){\r\n \r\n this.router.navigate(['saftyPlanDetail', victimServiceId, this.victimId ]); \r\n\r\n }\r\n onAddNew(){\r\n this.hiddenDetailFlag = false;\r\n\r\n }\r\n onDeleteSafetyPlan(victimServiceId: number){\r\n\r\n this.commonDialogService\r\n .confirm('', 'Do you want to delete this safety plan?', 'Yes', 'No')\r\n .subscribe(res => {this.result = res;\r\n if (this.result) {\r\n\r\n this._victimServicesComponent.deleteSafetyPlan(victimServiceId,this.staffId)\r\n .subscribe(result => {\r\n\r\n this.snackBar.open('delete safety plan Successfully !', '', { duration: 3000,});\r\n\r\n this._victimServicesComponent.getSafetyPlans(this.victimId).subscribe(\r\n victimSafetyPlans => {\r\n this.victimSafetyPlans = victimSafetyPlans; \r\n this.safetyPlanDataSource.data = this.victimSafetyPlans;\r\n }\r\n );\r\n \r\n }\r\n );\r\n \r\n\r\n\r\n }\r\n\r\n });\r\n }\r\n\r\n back(){\r\n this.router.navigate(['victimHome']);\r\n \r\n }\r\n\r\n\r\n\r\n\r\n\r\n}\r\n\r\n","import { Component, OnInit, Inject } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';\r\nimport { FormBuilder, FormGroup } from '@angular/forms';\r\nimport { ProvidersDialogData} from '../smart-victim.model';\r\nimport { NgcSmartVictimService } from '../smart-victim.service';\r\n\r\n\r\n@Component({\r\n selector: 'app-service-provider',\r\n template: `\r\n <h1 mat-dialog-title> {{data.serviceType}}</h1>\r\n <div mat-dialog-content class=\"main\" [formGroup]=\"spForm\">\r\n <mat-form-field>\r\n <mat-label>service provider</mat-label>\r\n \r\n <mat-select formControlName=\"voteeProviderId\">\r\n <mat-option\r\n *ngFor=\"let providerOption of programProviders\"\r\n [value]=\"providerOption.victimProgramProviderId\">{{ providerOption.victimProgramProvider }}\r\n </mat-option>\r\n </mat-select>\r\n \r\n </mat-form-field>\r\n \r\n </div>\r\n <div mat-dialog-actions class=\"actions\">\r\n <button mat-raised-button color=\"primary\" (click)=\"cancel()\" cdkFocusInitial>\r\n Cancel Change\r\n </button>\r\n <button mat-raised-button color=\"primary\" [mat-dialog-close]=\"spForm.value\" >\r\n Save Change\r\n </button>\r\n </div>\r\n `,\r\n styles: [\r\n `\r\n .main {\r\n width: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n }\r\n\r\n .actions{\r\n display: flex;\r\n }\r\n `,\r\n ],\r\n})\r\n\r\n\r\n\r\nexport class SeriveProviderComponent implements OnInit {\r\n spForm: FormGroup;\r\n programProviders:[];\r\n\r\n constructor(\r\n private formBuilder: FormBuilder,\r\n public dialogRef: MatDialogRef<SeriveProviderComponent>,\r\n private _victimServicesComponent: NgcSmartVictimService,\r\n @Inject(MAT_DIALOG_DATA) public data: ProvidersDialogData,\r\n ) {\r\n\r\n\r\n this.spForm = this.formBuilder.group({\r\n voteeProviderId: [''],\r\n \r\n });\r\n }\r\n\r\n cancel() {\r\n this.dialogRef.close();\r\n }\r\n\r\n ngOnInit() {\r\n console.log('data.providerCollections')\r\n console.log(this.data);\r\n console.log(this.data.serviceTypeId);\r\n\r\n this._victimServicesComponent.getvVictimServiceTypeProgramProviders().subscribe(\r\n (items: any) => {\r\n this.programProviders = items.filter( (y) => (y.victimServiceTypeId === this.data.serviceTypeId));\r\n console.log('this.programProviders');\r\n console.log(this.programProviders);\r\n }\r\n );\r\n\r\n this.spForm.get('voteeProviderId').valueChanges.subscribe(voteeProviderId => {\r\n console.log('voteeProviderId in service provider component.')\r\n console.log(voteeProviderId)\r\n \r\n \r\n })\r\n }\r\n}\r\n","import { Component, OnInit,Inject } from '@angular/core';\r\nimport { NgcSmartVictimService } from '../smart-victim.service';\r\nimport { FormControl, FormGroup, FormBuilder,Validators } from '@angular/forms';\r\nimport { VictimSafetyPlan,VictimServiceDetail,\r\n VictimServiceStatusHistory,VictimServiceTypeProgramProviderModel,\r\n ProviderListCollectionModel } from '../smart-victim.model';\r\nimport { MatSnackBar,MatTableDataSource,MatDialog } from '@angular/material';\r\nimport { CommonDialogService} from '.././common-dialog/common-dialog.service';\r\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\r\nimport { Observable } from 'rxjs';\r\nimport { Router, ActivatedRoute } from '@angular/router';\r\nimport { SelectedOffender, LoginStaff } from '@csmart/ngc-smart-core';\r\nimport { dateValidator, passDateValidator } from '../shared/validators';\r\nimport { typeSourceSpan } from '@angular/compiler';\r\nimport { SeriveProviderComponent} from '../safetyPlan/serviceProvider.component'\r\nimport { ProvidersDialogData} from '../smart-victim.model';\r\n\r\n@Component({\r\n templateUrl: './victimSafetyPlanDetail.component.html',\r\n providers: [CommonDialogService],\r\n styleUrls: ['./victimSafetyPlan.component.css']\r\n \r\n})\r\n\r\nexport class VictimSafetyPlanDetailComponent implements OnInit {\r\n\r\n\r\n hiddenAddNewFlag: boolean;\r\n safetyPlans: VictimSafetyPlan[];\r\n safetyPlan: VictimSafetyPlan;\r\n editSafetyPlan: VictimSafetyPlan = <VictimSafetyPlan>{};\r\n errorMessage: string;\r\n contactTypes: any[];\r\n contactPurposes: any[];\r\n victimServiceTypes: any[];\r\n victimSafetyPlans: VictimSafetyPlan[];\r\n victimServiceStatus: any[];\r\n providerList: VictimServiceTypeProgramProviderModel[];\r\n providerListCollection:ProviderListCollectionModel[]=[];\r\n victimServiceDetail: VictimServiceDetail[];\r\n indx:any;\r\n serviceCheck = [];\r\n victimName: string;\r\n isDisplay: boolean;\r\n staffId: number;\r\n victimId: number;\r\n victimServiceId: number;\r\n offenderId: number;\r\n loginStaff: LoginStaff;\r\n private sub: any;\r\n result: any;\r\n victimServiceStatusHistoriesDataSource= new MatTableDataSource();\r\n providerId: string;\r\n selected: string;\r\n\r\n\r\n spForm: FormGroup;\r\n\r\n constructor(\r\n public dialog: MatDialog,\r\n private _victimServicesComponent: NgcSmartVictimService,\r\n private http: HttpClient,\r\n public snackBar: MatSnackBar,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private commonDialogService: CommonDialogService,\r\n private formBuilder: FormBuilder,\r\n \r\n ) {\r\n\r\n this.initForm();\r\n }\r\n\r\n private initForm() {\r\n\r\n\t\r\n\t\t\tthis.spForm = this.formBuilder.group({\r\n serviceGoal: new FormControl('', Validators.compose([\r\n Validators.required\t\t ])),\r\n goalStatus: new FormControl('', Validators.compose([\r\n Validators.required\t\t ])),\r\n goalStatusDate: new FormControl('', Validators.compose([\r\n Validators.required,dateValidator()\t\t ])),\r\n comment: new FormControl('',Validators.required)\r\n });\r\n this.spForm.markAsPristine();\r\n this.spForm.markAsUntouched();\r\n \r\n }\r\n \r\n ngOnInit() {\r\n\r\n \r\n\r\n var data = this.route.snapshot.data;\r\n this.loginStaff = data.loginStaff;\r\n this.staffId = this.loginStaff.staffId;\r\n\r\n this.sub = this.route.params.subscribe(params => {\r\n this.victimServiceId = params['victimServiceId'];\r\n this.victimId = params['victimId'];\r\n \r\n });\r\n \r\n this.hiddenAddNewFlag = false;\r\n this.isDisplay = false;\r\n \r\n \r\n\r\n this._victimServicesComponent.getVictimServiceTypes().subscribe(\r\n (items: any) => {\r\n this.victimServiceTypes = items;\r\n }\r\n );\r\n\r\n this._victimServicesComponent.getVictimServiceStatus().subscribe(\r\n (items: any) => {\r\n this.victimServiceStatus = items;\r\n }\r\n );\r\n\r\n this._victimServicesComponent.getVictim(this.victimId).subscribe(\r\n (items: any) => {\r\n this.victimName = items.firstName + ', ' + items.lastName;\r\n }\r\n );\r\n\r\n \r\n \r\n //---------------graphQL--------------------------------------\r\n // this.getVictimServiceTypeProgramProviders().subscribe(result => {\r\n // this.providerList = result;\r\n // });\r\n // console.log('this.victimServiceId');\r\n // console.log(this.victimServiceId);\r\n \r\n if (this.victimServiceId!=0){\r\n this._victimServicesComponent.getVictimServices(this.victimServiceId).subscribe(\r\n victimSafetyPlans => {\r\n console.log('victimSafetyPlans');\r\n console.log(victimSafetyPlans);\r\n\r\n this.editSafetyPlan = victimSafetyPlans[0];\r\n this.victimId = victimSafetyPlans[0].victimId;\r\n \r\n console.log('this.editSafetyPlan');\r\n console.log(this.editSafetyPlan);\r\n // console.log('this.editSafetyPlan.goal');\r\n // console.log(this.editSafetyPlan.goal);\r\n // console.log('this.editSafetyPlan[0].goal');\r\n // console.log(this.editSafetyPlan[0].goal);\r\n\r\n }\r\n );\r\n\r\n this._victimServicesComponent.getServiceStatusHistories(this.victimServiceId).subscribe(\r\n victimServiceStatusHistories => {\r\n // this.victimServiceStatusHistories = victimServiceStatusHistories;\r\n this.victimServiceStatusHistoriesDataSource.data = victimServiceStatusHistories;\r\n }\r\n );\r\n\r\n }\r\n\r\n this.loadProvider();\r\n \r\n }\r\n //pass in id\r\nisInArray(providerListCollectionKey:string, serviceTypeName: string, event){\r\n\r\n console.log('providerListCollectionKey');\r\n console.log(providerListCollectionKey);\r\n\r\n\r\n console.log('serviceTypeName');\r\n console.log(serviceTypeName);\r\n\r\n console.log('event.source.value');\r\n console.log(event.checked);\r\n\r\n if (event.checked == true){\r\n\r\n for(let j=0;j<this.providerListCollection.length;j++){\r\n if(providerListCollectionKey==this.providerListCollection[j].groupId){\r\n this.providerListCollection[j].isDisplay=!this.providerListCollection[j].isDisplay;\r\n\r\n \r\n\r\n const dialogRef = this.dialog.open(SeriveProviderComponent, {\r\n width: '500px',\r\n data: <ProvidersDialogData>{\r\n \r\n serviceType:serviceTypeName,\r\n serviceTypeId: providerListCollectionKey,\r\n providerCollections: [...this.providerListCollection],\r\n },\r\n panelClass: 'formFieldWidth480',\r\n });\r\n\r\n\r\n\r\n dialogRef.afterClosed().subscribe((result: any) => {\r\n console.log('The dialog was closed');\r\n console.log(result);\r\n if (result) {\r\n console.log('The dialog was closed, inside result');\r\n this.savePlanProvider(providerListCollectionKey,result.voteeProviderId);\r\n \r\n }\r\n \r\n \r\n });\r\n \r\n // return;\r\n }\r\n }\r\n\r\n }//if event.checked == true\r\n //this.router.navigate(['saftyPlanDetail', this.victimServiceId, this.victimId ]); \r\n \r\n }\r\n\r\nloadProvider(){ \r\n\r\n this.providerListCollection=[];\r\n this._victimServicesComponent.getvVictimServiceTypeProgramProviders()\r\n .subscribe(\r\n (providerList:VictimServiceTypeProgramProviderModel[] )=>{ \r\n if(providerList){\r\n \r\n let providers = Object.create(null);\r\n for(let i=0;i<providerList.length;i++){\r\n \r\n if (!providers[providerList[i].victimServiceTypeId]) {\r\n providers[providerList[i].victimServiceTypeId] = [];\r\n \r\n if ( this.editSafetyPlan.vVictimServiceDetails != null ){\r\n for (let j=0; j<this.editSafetyPlan.vVictimServiceDetails.length; j++){\r\n if ( providerList[i].victimServiceTypeId == this.editSafetyPlan.vVictimServiceDetails[j].victimServiceId.toString() ){\r\n this.isDisplay = true;\r\n }\r\n }\r\n }\r\n this.providerListCollection.push({ groupId: providerList[i].victimServiceTypeId,isDisplay:this.isDisplay, collection: providers[providerList[i].victimServiceTypeId] });\r\n }\r\n\r\n providers[providerList[i].victimServiceTypeId].push(providerList[i]);\r\n \r\n }\r\n \r\n\r\n }\r\n\r\n });\r\n\r\n }\r\n//---------------graphQL--------------------------------------\r\n// getVictimServiceTypeProgramProviders(): Observable<VictimServiceTypeProgramProviderModel[]> {\r\n// const queryString = `\r\n// {\r\n// findVictimServiceTypeProgramProviders {\r\n// data {\r\n// victimServiceTypeProgramProviderId\r\n// victimServiceType\r\n// victimProgramProvider\r\n// }\r\n// }\r\n// }`;\r\n \r\n// return this.http.post<any>(environment.smartApiUrl, { query: queryString })\r\n// .map(result => {\r\n// return result.data.findVictimServiceTypeProgramProviders.data;\r\n// });\r\n// }\r\n\r\n evaluateSelection(victimServiceTypeId: string) {\r\n if (this.editSafetyPlan.vVictimServiceDetails) {\r\n return this.editSafetyPlan.vVictimServiceDetails.findIndex(r => r.victimServiceTypeId === victimServiceTypeId) >= 0;\r\n }\r\n }\r\n\r\n\r\nsavePlanProvider(victimServiceTypeId: string,victimProgramProviderId: string){\r\n\r\n console.log('savePlanProvider');\r\n console.log(victimServiceTypeId);\r\n console.log(victimProgramProviderId);\r\n\r\n if (victimProgramProviderId === \"\" || victimProgramProviderId=== null || victimProgramProviderId === undefined){\r\n \r\n this.snackBar.open('Please pick a program on the drop down list !', '', { duration: 120,});\r\n // alert('Please pick a program on the drop down list !');\r\n\r\n }else\r\n {\r\n \r\n if ( this.victimServiceId == 0){\r\n //insert\r\n console.log('insert new plan');\r\n const safetyPlan: VictimSafetyPlan = {\r\n victimId:this.victimId,\r\n fullName: null,\r\n victimServiceId: 0,\r\n goal:this.editSafetyPlan.goal,\r\n comment: this.editSafetyPlan.comment,\r\n modifiedBy:this.staffId,\r\n victimServiceStatusId: null,\r\n status: null,\r\n startDate: null,\r\n vVictimServiceDetails: null,\r\n victimName: null\r\n};\r\nthis._victimServicesComponent.addSafetyPlan(safetyPlan).subscribe(\r\n (itms:any)=>{\r\n const victimServiceStatus: VictimServiceStatusHistory= {\r\n victimServiceStatusHistoryId:0,\r\n victimServiceId: itms.victimServiceId,\r\n victimServiceStatusId: this.editSafetyPlan.victimServiceStatusId ,\r\n startDate: this.editSafetyPlan.startDate,\r\n modifiedBy:this.staffId,\r\n comment:'test add safety plan'\r\n };\r\n\r\n this._victimServicesComponent.addVictimServiceStatus(victimServiceStatus).subscribe(\r\n \r\n () =>{\r\n console.log('check itms.victimServiceId iniside add victim serive status');\r\n console.log(itms.victimServiceId);\r\n\r\n const victimServiceDetail: VictimServiceDetail = {\r\n victimServiceId: itms.victimServiceId,\r\n victimServiceDetailId: 0,\r\n victimServiceTypeId: victimServiceTypeId,\r\n victimProgramProviderId: victimProgramProviderId,\r\n modifiedBy: this.staffId,\r\n victimProgramProvider: null\r\n };\r\n \r\n console.log('add plan provider here at insert');\r\n \r\n this._victimServicesComponent.addPlanProvider(victimServiceDetail).subscribe(\r\n\r\n () =>{\r\n \r\n this.router.navigate(['saftyPlanDetail', itms.victimServiceId, this.victimId ]); \r\n\r\n }\r\n );\r\n\r\n }\r\n );\r\n \r\n \r\n \r\n }\r\n\r\n\r\n);\r\n }\r\n else//update\r\n {\r\n const victimServiceDetail: VictimServiceDetail = {\r\n victimServiceId: this.victimServiceId,\r\n victimServiceDetailId: 0,\r\n victimServiceTypeId: victimServiceTypeId,\r\n victimProgramProviderId: victimProgramProviderId,\r\n modifiedBy: this.staffId,\r\n victimProgramProvider: null\r\n };\r\n console.log('add plan provider here at update');\r\n this._victimServicesComponent.addPlanProvider(victimServiceDetail).subscribe(\r\n\r\n () =>{\r\n \r\n this.router.navigate(['saftyPlanDetail', this.victimServiceId, this.victimId ]); \r\n\r\n }\r\n );\r\n }\r\n }\r\n\r\n\r\n}\r\n\r\n\r\n deleteProvider(victimProgramProviderId: string){\r\n\r\n this.commonDialogService\r\n .confirm('', 'Do you want to delete this provider?', 'Yes', 'No')\r\n .subscribe(res => {this.result = res;\r\n if (this.result) {\r\n this._victimServicesComponent.deleteProvider(victimProgramProviderId, this.staffId)\r\n .subscribe(result => {\r\n this.snackBar.open('delete provider Successfully !', '', {\r\n duration: 3000,\r\n });\r\n\r\n location.reload();\r\n \r\n }\r\n );\r\n \r\n }\r\n\r\n });\r\n \r\n // location.reload();\r\n\r\n }\r\nsaveSafetyPlan() {\r\n\r\n if (this.editSafetyPlan.victimServiceId === undefined ) {\r\n\r\n const safetyPlan: VictimSafetyPlan = {\r\n victimId: this.victimId,\r\n fullName: null,\r\n victimServiceId: 0,\r\n goal:this.editSafetyPlan.goal,\r\n comment: this.editSafetyPlan.comment,\r\n modifiedBy:this.staffId,\r\n victimServiceStatusId: null,\r\n status: null,\r\n startDate: null,\r\n vVictimServiceDetails: null,\r\n victimName: null\r\n };\r\n this._victimServicesComponent.addSafetyPlan(safetyPlan).subscribe(\r\n (itms:any)=>{\r\n const victimServiceStatus: VictimServiceStatusHistory= {\r\n victimServiceStatusHistoryId:0,\r\n victimServiceId: itms.victimServiceId,\r\n victimServiceStatusId: this.editSafetyPlan.victimServiceStatusId ,\r\n startDate: this.editSafetyPlan.startDate,\r\n modifiedBy:this.staffId,\r\n comment:'test add safety Plan'\r\n };\r\n\r\n this._victimServicesComponent.addVictimServiceStatus(victimServiceStatus).subscribe(\r\n resp=>{\r\n this.snackBar.open('Insert status successfully!', '', {\r\n duration: 3000,\r\n });\r\n \r\n }\r\n );\r\n\r\n \r\n this.router.navigate(['saftyPlanDetail', itms.victimServiceId, this.victimId ]); \r\n }\r\n\r\n\r\n );\r\n } else {\r\n // this.editSafetyPlan.modifiedBy=this.loginStaff.staffId;\r\n this.editSafetyPlan.modifiedBy =this.staffId;\r\n this._victimServicesComponent.updateSafetyPlan(this.editSafetyPlan).subscribe(\r\n resp=>{\r\n // this.snackBar.open('update Successfully!', '', {\r\n // duration: 3000,\r\n // });\r\n\r\n\r\n\r\n const victimServiceStatus: VictimServiceStatusHistory= {\r\n victimServiceStatusHistoryId:0,\r\n victimServiceId: this.editSafetyPlan.victimServiceId.toString(),\r\n victimServiceStatusId: this.editSafetyPlan.victimServiceStatusId ,\r\n startDate: this.editSafetyPlan.startDate,\r\n modifiedBy:this.staffId,\r\n comment:'test update safety Plan'\r\n };\r\n\r\n this._victimServicesComponent.addVictimServiceStatus(victimServiceStatus).subscribe();\r\n\r\n \r\n this.router.navigate(['saftyPlanDetail', this.editSafetyPlan.victimServiceId, this.victimId ]); \r\n \r\n }\r\n );\r\n } \r\n }\r\n\r\n back(){\r\n console.log('this.victimId');\r\n console.log(this.victimId);\r\n this.router.navigate(['saftyPlan', this.victimId]); \r\n }\r\n \r\n\r\n}\r\n\r\n","import { MsalGuard } from '@azure/msal-angular';\r\nimport { SmartErrorComponent } from '@csmart/ngc-smart-core';\r\nimport { LoginStaffResolverService, SelectedOffenderResolverService} from '@csmart/ngc-smart-core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\nimport { NgModule } from '@angular/core';\r\nimport { CaseNoteComponent } from './caseNote/caseNote.component';\r\nimport { ContactComponent } from './contact/contact.component';\r\nimport { VictimSafetyPlanComponent } from './safetyPlan/victimSafetyPlan.component';\r\nimport { VictimSafetyPlanDetailComponent } from './safetyPlan/victimSafetyPlanDetail.component';\r\nimport { SmartVictimDetailComponent } from './smart-victim-detail/smart-victim-detail.component';\r\nimport { NgcSmartVictimComponent} from './smart-victim.component'\r\n\r\nconst routes: Routes = [\r\n \r\n {path: 'casenote/:victimId', component: CaseNoteComponent,pathMatch: 'full',canActivate: [MsalGuard],resolve: { loginStaff: LoginStaffResolverService } },\r\n {path: 'saftyPlan/:victimId', component: VictimSafetyPlanComponent,pathMatch: 'full',resolve: { loginStaff: LoginStaffResolverService } },\r\n {path: 'saftyPlanDetail/:victimServiceId/:victimId', component: VictimSafetyPlanDetailComponent,pathMatch: 'full',resolve: { loginStaff: LoginStaffResolverService } },\r\n {path: 'victimList', component: NgcSmartVictimComponent, resolve: { loginStaff: LoginStaffResolverService, selectedOffender: SelectedOffenderResolverService} },\r\n {path: 'victimHome', component: NgcSmartVictimComponent, resolve: { loginStaff: LoginStaffResolverService, selectedOffender: SelectedOffenderResolverService} },\r\n {path: 'victimContact/:victimId', component: ContactComponent, resolve: { loginStaff: LoginStaffResolverService, selectedOffender: SelectedOffenderResolverService} },\r\n {path: 'victimDetail/:victimId', component: SmartVictimDetailComponent, resolve: { loginStaff: LoginStaffResolverService, selectedOffender: SelectedOffenderResolverService} },\r\n {path: 'smart-error', component: SmartErrorComponent }\r\n];\r\n\r\n@NgModule({\r\n imports: [\r\n RouterModule.forChild(routes)\r\n ],\r\n exports: [\r\n RouterModule\r\n ]\r\n})\r\nexport class VictimRoutingModule {\r\n}\r\n","export class VictimListFilter {\r\n \r\n offenderId: number;\r\n lastName: string;\r\n firstName: string;\r\n pdid: string;\r\n birthDate: Date;\r\n \r\n}","import { Component, OnInit, ViewEncapsulation,\r\n Output, EventEmitter } from '@angular/core';\r\n \r\nimport { VictimListFilter } from './VictimSearchFilter';\r\n \r\n @Component({\r\n selector: 'app-victim-search-form',\r\n templateUrl: './victimSearchForm.component.html',\r\n styleUrls: ['../smart-victim.component.css'],\r\n encapsulation: ViewEncapsulation.None\r\n })\r\n export class VictimSearchFormComponent implements OnInit {\r\n \r\n @Output() onSearch:EventEmitter<Object>=new EventEmitter<Object>();\r\n change: EventEmitter<VictimListFilter> = new EventEmitter<VictimListFilter>();\r\n \r\n filter: VictimListFilter = new VictimListFilter();\r\n \r\n constructor() { }\r\n \r\n ngOnInit() {\r\n\r\n }\r\n\r\n ngAfterViewInit() {\r\n\r\n // var element = <HTMLInputElement> document.getElementById(\"victimSearchButton\");\r\n // element.disabled = true;\r\n // setTimeout(function() {\r\n // element.disabled = false;\r\n // }, 10000);\r\n\r\n }\r\n onChange() {\r\n console.log('this.filter in serach form.');\r\n console.log(this.filter);\r\n\r\n this.onSearch.emit(this.filter);\r\n \r\n }\r\n }\r\n","import {\r\n Directive,\r\n ElementRef,\r\n Input,\r\n OnInit,\r\n OnDestroy,\r\n Renderer2,\r\n } from '@angular/core';\r\n import {\r\n FormGroup,\r\n FormBuilder,\r\n AbstractControl,\r\n Validators,\r\n FormControl,\r\n } from '@angular/forms';\r\n // import { Subscription } from 'rxjs/Subscription';\r\n @Directive({\r\n selector: \"[phoneMask]\",\r\n })\r\n export class PhoneMaskDirective implements OnInit, OnDestroy {\r\n private _phoneControl: AbstractControl;\r\n private _preValue: string;\r\n @Input(\"phoneControl\")\r\n public set phoneControl(control: AbstractControl) {\r\n this._phoneControl = control;\r\n }\r\n @Input(\"preValue\")\r\n public set preValue(value: string) {\r\n this._preValue = value;\r\n this.formatPhoneNumber(value);\r\n }\r\n // private sub:ISubscription;\r\n constructor(private el: ElementRef, private renderer: Renderer2) {}\r\n ngOnInit() {}\r\n ngOnDestroy() {\r\n // this.sub.unsubscribe();\r\n }\r\n formatPhoneNumber(data) {\r\n if (!this._preValue) {\r\n this._preValue = \"\";\r\n data = \"\";\r\n }\r\n let preInputValue: string = this._preValue;\r\n var lastChar: string = preInputValue.substr(preInputValue.length - 1);\r\n var newVal = data.replace(/\\D/g, \"\");\r\n let start = this.renderer.selectRootElement(\"#tel\").selectionStart;\r\n let end = this.renderer.selectRootElement(\"#tel\").selectionEnd;\r\n if (data.length < preInputValue.length) {\r\n if (preInputValue.length < start) {\r\n if (lastChar == \")\") {\r\n newVal = newVal.substr(0, newVal.length - 1);\r\n }\r\n }\r\n if (newVal.length == 0) {\r\n newVal = \"\";\r\n } else if (newVal.length <= 3) {\r\n newVal = newVal.replace(/^(\\d{0,3})/, \"($1\");\r\n } else if (newVal.length <= 6) {\r\n newVal = newVal.replace(/^(\\d{0,3})(\\d{0,3})/, \"($1) $2\");\r\n } else {\r\n newVal = newVal.replace(/^(\\d{0,3})(\\d{0,3})(.*)/, \"($1) $2-$3\");\r\n }\r\n this._phoneControl.setValue(newVal, { emitEvent: false });\r\n this.renderer.selectRootElement(\"#tel\").setSelectionRange(start, end);\r\n } else {\r\n var removedD = data.charAt(start);\r\n if (newVal.length == 0) {\r\n newVal = \"\";\r\n } else if (newVal.length <= 3) {\r\n newVal = newVal.replace(/^(\\d{0,3})/, \"($1)\");\r\n } else if (newVal.length <= 6) {\r\n newVal = newVal.replace(/^(\\d{0,3})(\\d{0,3})/, \"($1) $2\");\r\n } else {\r\n newVal = newVal.replace(/^(\\d{0,3})(\\d{0,3})(.*)/, \"($1) $2-$3\");\r\n }\r\n if (preInputValue.length >= start) {\r\n if (removedD == \"(\") {\r\n start = start + 1;\r\n end = end + 1;\r\n }\r\n if (removedD == \")\") {\r\n start = start + 2;\r\n end = end + 2;\r\n }\r\n if (removedD == \"-\") {\r\n start = start + 1;\r\n end = end + 1;\r\n }\r\n if (removedD == \" \") {\r\n start = start + 1;\r\n end = end + 1;\r\n }\r\n if (removedD == \"\") {\r\n start = start + 1;\r\n end = end + 1;\r\n }\r\n this._phoneControl.setValue(newVal, { emitEvent: false });\r\n this.renderer.selectRootElement(\"#tel\").setSelectionRange(start, end);\r\n } else {\r\n this._phoneControl.setValue(newVal, { emitEvent: false });\r\n this.renderer\r\n .selectRootElement(\"#tel\")\r\n .setSelectionRange(start + 2, end + 2); // +2 because of wanting standard typing\r\n }\r\n }\r\n }\r\n }","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ReactiveFormsModule,FormsModule} from '@angular/forms';\r\nimport {\r\n MatButtonModule, MatCheckboxModule, MatRadioModule,\r\n MatCardModule, MatSlideToggleModule,MatSliderModule,\r\n MatListModule, MatIconModule, MatButtonToggleModule,\r\n MatToolbarModule, MatTabsModule,\r\n MatMenuModule, MatInputModule, MatProgressBarModule,\r\n MatDatepickerModule, MatNativeDateModule,\r\n MatDialogModule, MatSidenavModule, MatSelectModule,\r\n MatTableModule, MatPaginatorModule, MatSortModule, MatGridListModule, MatExpansionModule,\r\n} from '@angular/material';\r\nimport { CdkTableModule } from '@angular/cdk/table';\r\nimport { LayoutModule } from '@angular/cdk/layout';\r\nimport { SmartAddressModule } from '@csmart/ngc-smart-address';\r\nimport { NgcSmartVictimComponent } from './smart-victim.component';\r\nimport { NgcSmartVictimService } from './smart-victim.service';\r\nimport { SmartVictimDetailComponent } from './smart-victim-detail/smart-victim-detail.component';\r\nimport { SmartVictimDeleteConfirmComponent } from './smart-victim-delete-confirm.component';\r\nimport { CommonDialogModule } from './common-dialog/common-dialog.module';\r\nimport { VictimRoutingModule } from './victim-routing.module';\r\nimport { CaseNoteComponent } from './caseNote/caseNote.component';\r\nimport { ContactComponent } from './contact/contact.component';\r\nimport { VictimSafetyPlanComponent } from './safetyPlan/victimSafetyPlan.component';\r\nimport { VictimSafetyPlanDetailComponent } from './safetyPlan/victimSafetyPlanDetail.component';\r\nimport { VictimSearchFormComponent } from './victimSearch/victimSearchForm.component';\r\nimport { ApolloModule, APOLLO_OPTIONS } from 'apollo-angular';\r\nimport { HttpLinkModule, HttpLink } from 'apollo-angular-link-http';\r\nimport { InMemoryCache } from 'apollo-cache-inmemory';\r\n//import { SharedModule } from './shared/app.shared.module';\r\n import { PhoneMaskDirective } from './shared/directives/phone-mask.directive';\r\n import { SeriveProviderComponent } from './safetyPlan/serviceProvider.component';\r\n\r\n\r\n\r\nconst COMPONENTS = [\r\n NgcSmartVictimComponent,\r\n SmartVictimDetailComponent,\r\n SmartVictimDeleteConfirmComponent,\r\n PhoneMaskDirective\r\n \r\n];\r\n\r\nconst ENTRY_COMPONENTS = [\r\n SmartVictimDeleteConfirmComponent,\r\n \r\n];\r\n\r\nconst BASE_MODULES = [\r\n CommonModule,\r\n ReactiveFormsModule\r\n];\r\n\r\nconst CORE_MODULES = [ SmartAddressModule ];\r\n\r\nconst MATERIAL_MODULES = [\r\n MatButtonModule, MatCheckboxModule,MatRadioModule,MatSliderModule,\r\n MatCardModule, MatSlideToggleModule,\r\n MatListModule, MatIconModule, MatButtonToggleModule,\r\n MatToolbarModule, MatTabsModule, MatExpansionModule,\r\n MatMenuModule, MatInputModule, MatProgressBarModule,\r\n MatDatepickerModule, MatNativeDateModule,MatPaginatorModule,\r\n MatDialogModule, MatSidenavModule, MatSelectModule,\r\n MatTableModule, MatSortModule, MatGridListModule, CdkTableModule, LayoutModule,\r\n];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENTS, \r\n CaseNoteComponent,\r\n ContactComponent,\r\n VictimSafetyPlanComponent,\r\n VictimSafetyPlanDetailComponent,\r\n VictimSearchFormComponent,\r\n SeriveProviderComponent\r\n ],\r\n imports: [\r\n ...BASE_MODULES,\r\n ...MATERIAL_MODULES,\r\n ...CORE_MODULES,\r\n CommonDialogModule,\r\n FormsModule,\r\n VictimRoutingModule,\r\n ApolloModule,\r\n //SharedModule\r\n \r\n \r\n ],\r\n exports: [...COMPONENTS,ApolloModule],\r\n entryComponents: [...ENTRY_COMPONENTS,SeriveProviderComponent],\r\n providers: [ NgcSmartVictimService ]\r\n})\r\nexport class NgcSmartVictimModule { }\r\n"]}
|
1
|
+
{"version":3,"sources":["../../../node_modules/tslib/tslib.es6.js","ng://@csmart/ngc-smart-victim/lib/smart-victim.model.ts","ng://@csmart/ngc-smart-victim/lib/smart-victim.service.ts","ng://@csmart/ngc-smart-victim/lib/intake.service.ts","ng://@csmart/ngc-smart-victim/lib/smart-victim.component.ts","ng://@csmart/ngc-smart-victim/lib/common-dialog/common-dialog.component.ts","ng://@csmart/ngc-smart-victim/lib/common-dialog/common-dialog.service.ts","ng://@csmart/ngc-smart-victim/lib/smart-victim-detail/smart-victim-detail.component.ts","ng://@csmart/ngc-smart-victim/lib/smart-victim-delete-confirm.component.ts","ng://@csmart/ngc-smart-victim/lib/shared/app.shared.module.ts","ng://@csmart/ngc-smart-victim/lib/common-dialog/common-dialog.module.ts","ng://@csmart/ngc-smart-victim/lib/shared/validators/date.validator.ts","ng://@csmart/ngc-smart-victim/lib/caseNote/caseNote.component.ts","ng://@csmart/ngc-smart-victim/lib/contact/contact.component.ts","ng://@csmart/ngc-smart-victim/lib/safetyPlan/victimSafetyPlan.component.ts","ng://@csmart/ngc-smart-victim/lib/safetyPlan/serviceProvider.component.ts","ng://@csmart/ngc-smart-victim/lib/safetyPlan/victimSafetyPlanDetail.component.ts","ng://@csmart/ngc-smart-victim/lib/victim-routing.module.ts","ng://@csmart/ngc-smart-victim/lib/victimSearch/VictimSearchFilter.ts","ng://@csmart/ngc-smart-victim/lib/victimSearch/victimSearchForm.component.ts","ng://@csmart/ngc-smart-victim/lib/shared/directives/phone-mask.directive.ts","ng://@csmart/ngc-smart-victim/lib/smart-victim.module.ts"],"names":["__read","o","n","m","Symbol","iterator","r","e","i","call","ar","next","done","push","value","error","__spread","arguments","length","concat","SMART_OFFENDER_SERVICE_URL","InjectionToken","SMART_LOOKUP_SERVICE_URL","SMART_VICTIM_SERVICE_URL","SMART_WARRANT_URL","VictimListFilter","VictimAdvocate","victimAdvocateId","lastName","firstName","prefixId","suffixId","addressId","noPhoneFlag","homePhone","workPhone","cellPhone","email","modifiedBy","this","VictimWeaponUse","victimId","weaponTypeId","otherWeapon","VictimDrugUse","drugTypeId","otherDrug","VictimSupport","victimSupportTypeId","VictimGuardian","victimGuardianId","birthDate","Victim","offenderId","underSupervisionFlag","victimOffenderRelationshipTypeId","middleName","genderCode","minorFlag","victimAdvocateFlag","guardianFirstName","guardianLastName","guardianPrefixId","guardianSuffixId","guardianNoPhoneFlag","guardianHomePhone","guardianWorkPhone","guardianCellPhone","guardianEmail","guardianAddressId","guardianBirthDate","advocateFirstName","advocateLastName","advocatePrefixId","advocateSuffixId","advocateNoPhoneFlag","advocateHomePhone","advocateWorkPhone","advocateCellPhone","advocateEmail","advocateAddressId","emergencyContact","emergencyContactPhone","commonChildrenFlag","commonChildrenNumber","cpoExpirationFlag","cpoExpirationDate","supportInPlaceFlag","weaponInvolvedFlag","drugUseFlag","alcoholUseFlag","accessRisk","relationship","vVictimAdvocate","vVictimGuardian","victimSupports","victimWeaponUses","victimDrugUses","allowCsosaContactFlag","headers","HttpHeaders","Content-Type","options","NgcSmartVictimService","http","smartOffenderServiceUrl","smartLookupServiceUrl","smartVictimServiceUrl","apollo","serviceApiUrl","prototype","handleError","console","observableThrowError","json","getDrugsTypes","get","pipe","map","res","getDocketList","queryString","post","query","_a","data","log","findDockets","getSupportTypes","getPrefixes","getSuffixes","getRelationshipTypes","getGenders","getWeaponTypes","getFlagOptionYesNoUnknowns","getContactTypes","getContactMethods","getContactBys","getVictimContactPurposes","getVictimServiceTypes","getVictimServiceStatus","getvVictimServiceTypeProgramProviders","getVictim","val","getVictimAdvocate","getVictimGuardian","postVictims","tempVal","JSON","stringify","putVictims","id","put","putVictimAdvocate","body","postVictimAdvocate","putVictimGuardian","postVictimGuardian","getVictimDrugUse","putVictimDrugUse","postVictimDrugUse","putVictimWeaponUse","postVictimWeaponUse","putVictimSupport","postVictimSupport","deleteVictims","delete","getVictims","catchError","getVictimsByFilter","filter","getVictimListByFilter","getCasetNotes","addCaseNote","caseNote","updateCaseNote","victimCaseNoteId","deleteCaseNote","staffId","getContacts","addContact","contact","updateContact","victimContactId","getSafetyPlans","getVictimServices","victimServiceId","getVictimServiceDetail","addSafetyPlan","victimSafetyPlan","updateSafetyPlan","addVictimServiceStatus","victimServiceStatusHistory","getServiceStatusHistories","deleteSafetyPlan","addPlanProvider","victimServiceDetail","deleteProvider","victimProgramProviderId","Injectable","args","providedIn","HttpClient","Inject","Apollo","Headers","IntakeServicesComponent","getIntakeByOffender","updateIntakeSteps","intakeStepStatus","IntakeStep","PhysicalInformation","Photo","HousingInformation","DocketInformation","Alias","IntakeBasicInformation","ContactInformation","DeceasedInformation","DriversLicense","EmploymentInformation","GangAffiliation","HealthInsurance","Identification","InternetIdentifier","MilitaryService","School","SelectiveService","Vehicle","VictimInformation","WarrantInformation","RunningRecord","Signature","NgcSmartVictimComponent","dialog","victimService","router","route","snackBar","intakeService","smartWarrantUrl","document","appModuleId","activatedRoute","victims","victimDetail","showDetail","victimListFilter","victimListDataSource","MatTableDataSource","doSpin","showListFlag","msg","isIntake","applyFilter","filterValue","trim","toLowerCase","addRecord","showAdd","editVictimDetail","record","save","detail","cancel","ngAfterViewInit","paginator","sort","ngOnChanges","updateAccessControlConfig","accessType","AccessType","UPDATE","roleId","snapshot","createAccessControlConfig","CREATE","deleteAccessControlConfig","DELETE","ngOnInit","_this","myPath","url","slice","intakeFlag","displayedColumns","showRelationshipColumn","showOffenderNameColumn","showOffenderPhoneColumn","showSearchForm","myOffenderId","accessByModule","showEdit","showCaseNote","showSafetyPlan","selectedOffender","pdid","subscribe","forEach","d","formatPhoneNumber","phoneNumberString","match","replace","saveIntake","intakeStep","intakeStepId","open","duration","location","href","goToCaseNote","navigate","goToSaftyPlan","getVictimList","err","Component","selector","template","MatDialog","Router","ActivatedRoute","MatSnackBar","DOCUMENT","Input","ViewChild","MatPaginator","MatSort","CommonDialogComponent","commondialogRef","cmdYesTitle","cmdNoTitle","MatDialogRef","CommonDialogService","confirm","title","message","dialogRef","componentInstance","afterClosed","warning","cmdOkTitle","stringConditionalValidator","predicate","validator","errorNamespace","formControl","parent","customError","SmartVictimDetailComponent","formBuilder","commonDialogService","onSave","EventEmitter","onCancel","hidden","victimAdvocate","victimGuardian","guardianTabFlag","advocateTabFlag","commonChildrenDivFlag","cpoExpirationDivFlag","supportInPlaceDivFlag","weaponInvolvedDivFlag","drugUseDivFlag","showDelete","datePipe","DatePipe","emailPattern","phoneNumber","editVictim","otherWeaponFlag","otherDrugFlag","contactDataSource","guardianPhoneExistFlag","advocatePhoneExistFlag","phoneValidationFlag","guaridanNoPhoneChkFlag","advocateNoPhoneChkFlag","addressValidators","street","street2","city","stateCode","zipCode","psaCode","initForm","victimForm","group","FormControl","Validators","compose","required","pattern","emergencyChildren","emergencyCpo","emergencyDrug","emergencySupport","emergencyWeapon","drug","weapon","support","markAsPristine","markAsUntouched","_getVictim","editMode","undefined","sub","params","victim","supportsData","t","setValue","weaponUsesData","drugUseData","contactList","patchValue","onAddressChange","onGuardianAddressChange","MyGuardianAddressId","onAdvocateAddressChange","MyAdvocateAddressId","reset","requiredImplementation","_required","ngControl","control","emptyValueControl","Object","assign","set","coerceBooleanProperty","defineProperty","MatInput","MatSelect","MatRadioGroup","setValidators","items","flagOption","genders","prefixes","suffixes","relationshipTypes","y","relationshipCategoryId","victimSupportTypes","weaponTypes","drugs","name","valueChanges","updateValueAndValidity","back","deleteVictim","result","emit","radioMinorChange","$event","radioAdvocateChange","advocateLastNameControl","advocateFirstNameControl","clearValidators","radioCicChange","type","radioSupportChange","radioWeaponChange","radioDrugChange","radioCpoChange","handleDOBChange","ageDifMs","Date","now","ageDate","Math","abs","getUTCFullYear","checkOtherWeapon","WeaponUse","otherWeaponControl","includes","checkOtherDrug","DrugUse","otherDrugControl","saveVictim","guardianCellhone","advocateCellhone","myVictimSupports","element","victimSupport","myVictimDrugUses","victimDrugUse","myVictimWeaponUses","victimWeaponUse","newVictim","transform","startDate","word","resp","formatLabel","providers","Location","FormBuilder","Output","SmartVictimDeleteConfirmComponent","onNoClick","close","MAT_DIALOG_DATA","SharedModule","NgModule","imports","MatButtonModule","MatCardModule","MatCheckboxModule","MatToolbarModule","MatSelectModule","MatDatepickerModule","MatNativeDateModule","MatDialogModule","MatTabsModule","MatListModule","MatInputModule","MatStepperModule","BrowserAnimationsModule","MatGridListModule","MatProgressSpinnerModule","MatTableModule","MatSidenavModule","MatRadioModule","MatIconModule","MatSliderModule","MatChipsModule","MatSnackBarModule","CdkTableModule","MatSortModule","MatPaginatorModule","MatExpansionModule","MatRippleModule","exports","entryComponents","CommonDialogModule","declarations","dateValidator","dateStr","date","CaseNoteComponent","_victimServicesComponent","smartAuthService","editCaseNote","caseNoteDataSource","caseNoteForm","caseNoteDate","contactType","contactPurpose","comment","setPermission","loginStaff","addDisableFlag","hiddenDetailFlag","hiddenAddNewFlag","victimName","contactTypes","contactPurposes","caseNoteList","onEditCaseNote","find","x","onDeleteCaseNote","onAddNew","caseNoteDateControl","setErrors","contactTypeControl","contactPurposeControl","commentControl","saveCaseNote","castNote","contactTypeId","victimContactPurposeId","victimContactPurpose","victimFirstName","victimLastName","SmartAuthService","ContactComponent","editContact","staff","contactForm","FormGroup","contactDate","contactMethod","contactBy","nextContactDate","fullName","contactMethods","onEditContact","saveContact","victimContactMethodId","contactedByName","contactedBy","VictimSafetyPlanComponent","editSafetyPlan","safetyPlanDataSource","victimSafetyPlans","victimServiceStatusHistories","goToSafetyPlanDetail","onDeleteSafetyPlan","SeriveProviderComponent","spForm","voteeProviderId","serviceTypeId","programProviders","victimServiceTypeId","VictimSafetyPlanDetailComponent","providerListCollection","serviceCheck","victimServiceStatusHistoriesDataSource","serviceGoal","goalStatus","goalStatusDate","isDisplay","victimServiceTypes","victimServiceStatus","loadProvider","isInArray","providerListCollectionKey","serviceTypeName","event","checked","j","groupId","width","serviceType","providerCollections","panelClass","savePlanProvider","providerList","create","vVictimServiceDetails","toString","collection","evaluateSelection","findIndex","safetyPlan","goal","victimServiceStatusId","status","itms","victimServiceStatusHistoryId","victimServiceDetailId","victimProgramProvider","reload","saveSafetyPlan","routes","path","component","pathMatch","canActivate","MsalGuard","resolve","LoginStaffResolverService","SelectedOffenderResolverService","SmartErrorComponent","VictimRoutingModule","RouterModule","forChild","VictimListFilter$1","VictimSearchFormComponent","onSearch","change","onChange","encapsulation","ViewEncapsulation","None","PhoneMaskDirective","el","renderer","_phoneControl","_preValue","ngOnDestroy","preInputValue","lastChar","substr","newVal","start","selectRootElement","selectionStart","end","selectionEnd","emitEvent","setSelectionRange","removedD","charAt","Directive","ElementRef","Renderer2","COMPONENTS","ENTRY_COMPONENTS","BASE_MODULES","CommonModule","ReactiveFormsModule","CORE_MODULES","NgcSmartCoreModule","SmartAddressModule","MATERIAL_MODULES","MatSlideToggleModule","MatButtonToggleModule","MatMenuModule","MatProgressBarModule","LayoutModule","NgcSmartVictimModule","FormsModule","ApolloModule"],"mappings":";;;;;;;;;;;;;;oFA8HO,SAASA,EAAOC,EAAGC,GACtB,IAAIC,EAAsB,mBAAXC,QAAyBH,EAAEG,OAAOC,UACjD,IAAKF,EAAG,OAAOF,EACf,IAAmBK,EAAYC,EAA3BC,EAAIL,EAAEM,KAAKR,GAAOS,EAAK,GAC3B,IACI,WAAc,IAANR,GAAgBA,KAAM,MAAQI,EAAIE,EAAEG,QAAQC,MAAMF,EAAGG,KAAKP,EAAEQ,OAExE,MAAOC,GAASR,EAAI,CAAEQ,MAAOA,GACjC,QACQ,IACQT,IAAMA,EAAEM,OAAST,EAAIK,EAAU,SAAIL,EAAEM,KAAKD,GAE1D,QAAkB,GAAID,EAAG,MAAMA,EAAEQ,OAE7B,OAAOL,EAGJ,SAASM,IACZ,IAAK,IAAIN,EAAK,GAAIF,EAAI,EAAGA,EAAIS,UAAUC,OAAQV,IAC3CE,EAAKA,EAAGS,OAAOnB,EAAOiB,UAAUT,KACpC,OAAOE,EC/IX,IAAaU,EAA6B,IAAIC,EAAAA,eAAuB,8BACxDC,EAA2B,IAAID,EAAAA,eAAuB,4BACtDE,EAA2B,IAAIF,EAAAA,eAAuB,4BACtDG,EAAoB,IAAIH,EAAAA,eAAuB,yBAa5D,IAAAI,EAAA,aAYA,IAAAC,EACI,SAAmBC,EAERC,EAEAC,EAEAC,EAEAC,EAEAC,EAEAC,EAEAC,EAEAC,EAEAC,EAEAC,EAEAC,GAtBQC,KAAAZ,iBAAAA,EAERY,KAAAX,SAAAA,EAEAW,KAAAV,UAAAA,EAEAU,KAAAT,SAAAA,EAEAS,KAAAR,SAAAA,EAEAQ,KAAAP,UAAAA,EAEAO,KAAAN,YAAAA,EAEAM,KAAAL,UAAAA,EAEAK,KAAAJ,UAAAA,EAEAI,KAAAH,UAAAA,EAEAG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EAAAA,cAGpEC,GAAA,WAAA,SAAAA,KAyBoC,2BAzBnCvM,EAAAA,SAAQnT,KAAA,CAAC,CACRmV,aAAY3gB,EAAMoqB,GAAU,CAC1BrJ,EACAqC,EACAgB,EACAa,EACAsD,GACA5D,IAEF/F,QAAO5e,EACFsqB,GACAM,GACAH,GAAY,CACf/J,EACAyK,EAAAA,YACAhD,GACAiD,EAAAA,eAKF5K,QAAOxgB,EAAMoqB,GAAU,CAAEgB,EAAAA,eACzB3K,gBAAezgB,EAAMqqB,GAAgB,CAAE1F,IACvCzG,UAAW,CAAE3Y,OAEqB2lB,EAzBpC","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import { InjectionToken } from '@angular/core';\r\n\r\n\r\nexport const SMART_OFFENDER_SERVICE_URL = new InjectionToken<string>('smart offender service url');\r\nexport const SMART_LOOKUP_SERVICE_URL = new InjectionToken<string>('smart lookup service url');\r\nexport const SMART_VICTIM_SERVICE_URL = new InjectionToken<string>('smart victim service url');\r\nexport const SMART_WARRANT_URL = new InjectionToken<string>('smart warrant web url');\r\n\r\n\r\nexport interface ElementsVictim {\r\n victimId: string;\r\n victimType: string;\r\n victimProvider: string;\r\n victimPolicyHolder: string;\r\n startDate: string;\r\n endDate: string;\r\n isActive: boolean;\r\n}\r\n\r\nexport class VictimListFilter {\r\n \r\n offenderId: number;\r\n lastName: string;\r\n firstName: string;\r\n pdid: string;\r\n birthDate: Date;\r\n \r\n}\r\n\r\n\r\n\r\nexport class VictimAdvocate {\r\n constructor(public victimAdvocateId: number,\r\n\r\n public lastName: string,\r\n\r\n public firstName: string,\r\n\r\n public prefixId: string,\r\n\r\n public suffixId: string,\r\n\r\n public addressId: number,\r\n\r\n public noPhoneFlag: boolean,\r\n\r\n public homePhone: string,\r\n\r\n public workPhone: string,\r\n\r\n public cellPhone: string,\r\n\r\n public email: string,\r\n\r\n public modifiedBy: number\r\n\r\n \r\n) { }\r\n}\r\n\r\n\r\nexport class VictimWeaponUse {\r\n constructor(\r\n // public victimWeaponUseId: number,\r\n\r\n public victimId: number,\r\n\r\n public weaponTypeId: string,\r\n\r\n public otherWeapon: string,\r\n\r\n public modifiedBy: number\r\n\r\n ) { }\r\n}\r\n\r\nexport class VictimDrugUse {\r\n constructor(\r\n //public victimDrugUseId: number,\r\n\r\n public victimId: number,\r\n\r\n public drugTypeId: string,\r\n\r\n public otherDrug: string,\r\n\r\n public modifiedBy: number\r\n\r\n ) { }\r\n}\r\n\r\n\r\n\r\n\r\nexport class VictimSupport {\r\n constructor(\r\n // public victimSupportId: number,\r\n\r\n public victimId: number,\r\n\r\n public victimSupportTypeId: string,\r\n\r\n public modifiedBy: number\r\n\r\n ) { }\r\n}\r\n\r\nexport class VictimGuardian {\r\n constructor(public victimGuardianId: number,\r\n\r\n public lastName: string,\r\n\r\n public firstName: string,\r\n\r\n public prefixId: string,\r\n\r\n public suffixId: string,\r\n\r\n public birthDate: string,\r\n\r\n public addressId: number,\r\n\r\n public noPhoneFlag: boolean,\r\n\r\n public homePhone: string,\r\n\r\n public workPhone: string,\r\n\r\n public cellPhone: string,\r\n\r\n public email: string,\r\n\r\n public modifiedBy: number\r\n \r\n \r\n\r\n ) { }\r\n}\r\n\r\nexport interface CaseNote {\r\n victimId: number;\r\n victimCaseNoteId: number;\r\n caseNoteDate: Date;\r\n contactTypeId: string;\r\n contactType: string;\r\n victimContactPurposeId: string;\r\n victimContactPurpose: string;\r\n comment: string;\r\n modifiedBy: number;\r\n victimFirstName: string;\r\n victimLastName: string;\r\n \r\n}\r\n\r\nexport interface Contact {\r\n victimId: number;\r\n victimContactId: number;\r\n contactDate: Date;\r\n victimContactMethodId: string;\r\n contactMethod: string;\r\n contactedBy: number;\r\n contactedByName: string;\r\n nextContactDate: Date;\r\n comment: string;\r\n modifiedBy: number;\r\n\r\n \r\n}\r\n\r\n\r\nexport interface VictimSafetyPlan {\r\n victimId: number;\r\n fullName: string;\r\n victimServiceId: number;\r\n goal:string;\r\n comment: string;\r\n modifiedBy: number;\r\n victimServiceStatusId: string;\r\n status: string;\r\n startDate: Date;\r\n vVictimServiceDetails: VictimServiceDetail[];\r\n victimName: String;\r\n \r\n \r\n}\r\n\r\nexport interface VictimServiceDetail{\r\n victimServiceId: number;\r\n victimServiceDetailId: number;\r\n victimServiceTypeId: string;\r\n victimProgramProviderId: string;\r\n victimProgramProvider: string;\r\n modifiedBy: number;\r\n\r\n\r\n}\r\nexport interface VictimServiceStatusHistory{\r\n\r\n victimServiceStatusHistoryId: number;\r\n victimServiceId: string;\r\n victimServiceStatusId: string;\r\n startDate: Date;\r\n comment: string;\r\n modifiedBy: number;\r\n}\r\n\r\n\r\nexport interface VictimServiceTypeProgramProviderModel {\r\n victimServiceTypeProgramProviderId: number; \r\n victimServiceType: string;\r\n victimProgramProviderId: string;\r\n victimServiceTypeId:string;\r\n victimProgramProvider: string;\r\n }\r\n \r\n export interface ProviderListCollectionModel{\r\n groupId:string;\r\n isDisplay:boolean;\r\n collection:VictimServiceTypeProgramProviderModel[];\r\n }\r\n\r\n\r\n\r\n export interface ProvidersDialogData {\r\n //iepAction: IepAction;\r\n serviceType;\r\n serviceTypeId;\r\n providerCollections: [];\r\n }\r\n\r\n\r\n export class Victim {\r\n constructor(\r\n public victimId: number,\r\n public offenderId: number,\r\n public underSupervisionFlag: string,\r\n public victimOffenderRelationshipTypeId: string,\r\n public lastName: string,\r\n public firstName: string,\r\n public middleName: string,\r\n public prefixId: string | null,\r\n public suffixId: string | null,\r\n public birthDate: string,\r\n public genderCode: string,\r\n public homePhone: string,\r\n public workPhone: string,\r\n public cellPhone: string,\r\n public email: string,\r\n public addressId: number,\r\n public minorFlag: boolean,\r\n public victimAdvocateFlag: string,\r\n\r\n public guardianFirstName: string,\r\n public guardianLastName: string,\r\n public guardianPrefixId: string,\r\n public guardianSuffixId: string,\r\n public guardianNoPhoneFlag: boolean,\r\n public guardianHomePhone: string,\r\n public guardianWorkPhone: string,\r\n public guardianCellPhone: string,\r\n public guardianEmail: string,\r\n public guardianAddressId: number,\r\n public guardianBirthDate: string,\r\n\r\n public advocateFirstName: string,\r\n public advocateLastName: string,\r\n public advocatePrefixId: string,\r\n public advocateSuffixId: string,\r\n public advocateNoPhoneFlag: boolean,\r\n public advocateHomePhone: string,\r\n public advocateWorkPhone: string,\r\n public advocateCellPhone: string,\r\n public advocateEmail: string,\r\n public advocateAddressId: number,\r\n\r\n public emergencyContact: string,\r\n public emergencyContactPhone: string,\r\n public commonChildrenFlag: boolean,\r\n public commonChildrenNumber: number,\r\n public cpoExpirationFlag: boolean,\r\n public cpoExpirationDate: string,\r\n public supportInPlaceFlag: boolean,\r\n public weaponInvolvedFlag: boolean,\r\n public drugUseFlag: boolean,\r\n public alcoholUseFlag: boolean,\r\n public accessRisk: string,\r\n public modifiedBy: number,\r\n public relationship: string,\r\n \r\n public vVictimAdvocate: VictimAdvocate,\r\n public vVictimGuardian: VictimGuardian,\r\n \r\n public victimSupports: VictimSupport[],\r\n public victimWeaponUses: VictimWeaponUse[],\r\n public victimDrugUses: VictimDrugUse[],\r\n\r\n public allowCsosaContactFlag: boolean\r\n ) { }\r\n}\r\n\r\n","import { HttpClient,HttpResponse, HttpHeaders } from '@angular/common/http';\r\nimport { Injectable, Inject } from '@angular/core';\r\nimport { SMART_LOOKUP_SERVICE_URL, SMART_OFFENDER_SERVICE_URL,SMART_VICTIM_SERVICE_URL,\r\n VictimListFilter,VictimDrugUse,Victim,VictimSafetyPlan,\r\n CaseNote,Contact,VictimServiceDetail,VictimServiceStatusHistory,VictimAdvocate,VictimGuardian} from './smart-victim.model';\r\nimport { Observable, throwError as observableThrowError} from 'rxjs';\r\nimport { map,catchError, filter } from 'rxjs/operators';\r\nimport { Apollo } from 'apollo-angular';\r\n\r\n\r\nconst headers = new HttpHeaders({ 'Content-Type': 'application/json' });\r\nconst options = { headers: headers };\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class NgcSmartVictimService {\r\n private serviceApiUrl = 'https://smart-service-test.azurewebsites.net/graphql';\r\n constructor(private http: HttpClient,\r\n @Inject(SMART_OFFENDER_SERVICE_URL) private smartOffenderServiceUrl: string,\r\n @Inject(SMART_LOOKUP_SERVICE_URL) private smartLookupServiceUrl: string,\r\n @Inject(SMART_VICTIM_SERVICE_URL) private smartVictimServiceUrl: string,\r\n private apollo: Apollo\r\n\r\n ) { }\r\n\r\n // getVictimInsurances(offenderId: any) {\r\n // return this.http.get(this.smartOffenderServiceUrl + '/VictimInsurances/?offenderId=' + offenderId).pipe();\r\n // }\r\n\r\n // getVictimInsurance(id: any) {\r\n // return this.http.get(this.smartOffenderServiceUrl + '/VictimInsurances/?id=' + id).pipe();\r\n // } \r\n\r\n // postVictimInsurance(val: any) {\r\n // return this.http.post(this.smartOffenderServiceUrl + '/VictimInsurances', val).pipe();\r\n // }\r\n\r\n // putVictimInsurance(id: any, val: any) {\r\n // return this.http.put(this.smartOffenderServiceUrl + '/VictimInsurances/?id=' + id, val).pipe();\r\n // }\r\n\r\n // deleteVictimInsurance(id: any) {\r\n // return this.http.delete(this.smartOffenderServiceUrl + '/VictimInsurances/?id=' + id).pipe();\r\n // }\r\n \r\n // getVictimInsuranceTypes() {\r\n // return this.http.get(this.smartLookupServiceUrl + '/VictimInsuranceTypes').pipe();\r\n // }\r\n\r\n // getVictimInsurancePolicyHolders() {\r\n // return this.http.get(this.smartLookupServiceUrl + '/VictimInsurancePolicyHolders').pipe();\r\n // }\r\n\r\n// getVictimInsuranceSwitchReasons() {\r\n// return this.http.get(this.smartLookupServiceUrl + '/VictimInsuranceSwitchReasons').pipe();\r\n// }\r\n\r\n// getVictimInsuranceProviders() {\r\n// return this.http.get(this.smartLookupServiceUrl + '/VictimInsuranceProvider').pipe();\r\n// }\r\n\r\n// getVictimInsuranceProvider(id) {\r\n// return this.http.get(this.smartLookupServiceUrl + '/VictimInsuranceProviders/' + id).pipe();\r\n// }\r\n\r\n// postProviderInformation(val: any) {\r\n// return this.http.post(this.smartLookupServiceUrl + '/VictimInsuranceProviders', val).pipe();\r\n// }\r\n\r\n\r\n\r\nprivate handleError(error: any) {\r\n console.error(error);\r\n return observableThrowError(error.json().error || 'Server error');\r\n}\r\n\r\ngetDrugsTypes() {\r\n return this.http.get(this.smartLookupServiceUrl + 'DrugTypes', options).pipe\r\n (\r\n map(res => res)\r\n );\r\n}\r\n\r\ngetDocketList(offenderId: number) {\r\n const queryString = `\r\n {\r\n findDockets(input: { where: { offenderId:${offenderId} } }) {\r\n totalCount\r\n message\r\n data {\r\n docketId\r\n docketNumber\r\n \r\n }\r\n }\r\n }`;\r\n\r\n return this.http.post<any>(this.serviceApiUrl, { query: queryString }).pipe(\r\n map(({ data }) => {\r\n console.log('dockets for this offender:', data.findDockets.data);\r\n return data.findDockets.data;\r\n }));\r\n\r\n\r\n}\r\n\r\ngetSupportTypes() {\r\n return this.http.get(this.smartLookupServiceUrl + 'VictimSupportTypes', options).pipe\r\n (\r\n map(res => res)\r\n );\r\n}\r\n\r\ngetPrefixes() {\r\n return this.http.get(this.smartLookupServiceUrl + 'Prefixes', options).pipe\r\n (\r\n map(res => res)\r\n );\r\n}\r\n\r\ngetSuffixes() {\r\n return this.http.get(this.smartLookupServiceUrl + 'Suffixes', options).pipe\r\n (\r\n map(res => res)\r\n );\r\n}\r\n\r\ngetRelationshipTypes() {\r\n return this.http.get(this.smartLookupServiceUrl + 'RelationshipTypes', options).pipe\r\n (\r\n map(res => res)\r\n );\r\n}\r\n\r\ngetGenders() {\r\n return this.http.get(this.smartLookupServiceUrl + 'Genders', options).pipe\r\n (\r\n map(res => res)\r\n );\r\n}\r\n\r\ngetWeaponTypes() {\r\n return this.http.get(this.smartLookupServiceUrl + 'WeaponTypes', options).pipe\r\n (\r\n map(res => res)\r\n );\r\n}\r\n\r\ngetFlagOptionYesNoUnknowns() {\r\n return this.http.get(this.smartLookupServiceUrl + 'FlagOptionYesNoUnknowns', options).pipe\r\n (\r\n map(res => { \r\n return res;\r\n })\r\n );\r\n}\r\n\r\ngetContactTypes() {\r\n return this.http.get(this.smartLookupServiceUrl + 'ContactTypes', options).pipe\r\n (\r\n map(res => { \r\n return res;\r\n })\r\n );\r\n }\r\n getContactMethods() {\r\n return this.http.get(this.smartLookupServiceUrl + 'VictimContactMethods', options).pipe\r\n (\r\n map(res => { \r\n return res;\r\n })\r\n );\r\n }\r\n getContactBys(){\r\n return this.http.get(this.smartLookupServiceUrl + 'VictimContactPurposes', options).pipe\r\n (\r\n map(res => { \r\n return res;\r\n })\r\n );\r\n\r\n }\r\n\r\ngetVictimContactPurposes() {\r\n return this.http.get(this.smartLookupServiceUrl + 'VictimContactPurposes', options).pipe\r\n (\r\n map(res => { \r\n return res;\r\n })\r\n );\r\n }\r\n\r\n getVictimServiceTypes() {\r\n return this.http.get(this.smartLookupServiceUrl + 'VictimServiceTypes', options).pipe\r\n (\r\n map(res => { \r\n return res;\r\n })\r\n );\r\n }\r\n getVictimServiceStatus() {\r\n return this.http.get(this.smartLookupServiceUrl + 'VictimServiceStatus', options).pipe\r\n (\r\n map(res => { \r\n return res;\r\n })\r\n );\r\n }\r\n\r\n getvVictimServiceTypeProgramProviders() {\r\n return this.http.get(this.smartLookupServiceUrl + 'vVictimServiceTypeProgramProviders', options).pipe\r\n (\r\n map(res => { \r\n return res;\r\n })\r\n );\r\n }\r\n\r\n\r\ngetVictim(val: any) {\r\n return this.http.get(this.smartVictimServiceUrl + 'Victims/' + val, options).pipe\r\n (\r\n map(res => { \r\n console.log('victim return data');\r\n console.log(res); \r\n return res;\r\n\r\n })\r\n );\r\n}\r\n\r\ngetVictimAdvocate(val: any) {\r\n return this.http.get(this.smartVictimServiceUrl + 'VictimAdvocates/' + val, options).pipe\r\n (\r\n\r\n map(res => { \r\n return res;})\r\n );\r\n}\r\n\r\ngetVictimGuardian(val: any) {\r\n return this.http.get(this.smartVictimServiceUrl + 'VictimGuardians/' + val, options).pipe\r\n (\r\n\r\n map(res => { \r\n return res;})\r\n );\r\n}\r\n\r\npostVictims(val: any) {\r\n const tempVal = JSON.stringify(val);\r\n return this.http.post(this.smartVictimServiceUrl+ 'Victims', tempVal, options).pipe\r\n (\r\n map(res => { return res;})\r\n );\r\n}\r\n\r\nputVictims(id: any, val: any) {\r\n const tempVal = JSON.stringify(val);\r\n return this.http.put(this.smartVictimServiceUrl + 'Victims/' + id, tempVal, options).pipe\r\n (\r\n map(res => { return res;})\r\n );\r\n}\r\n\r\nputVictimAdvocate(id: any, val: VictimAdvocate) {\r\n let body: string;\r\n body = JSON.stringify(val);\r\n return this.http.put(this.smartVictimServiceUrl + 'VictimAdvocates/' + id, body, options).pipe\r\n (\r\n map(res => { return res;})\r\n );\r\n\r\n\r\n\r\n\r\n}\r\n\r\npostVictimAdvocate(id: any, val: any) {\r\n const tempVal = JSON.stringify(val);\r\n return this.http.post(this.smartVictimServiceUrl + 'VictimAdvocates/' + id, tempVal, options).pipe\r\n (\r\n map(res => { return res;})\r\n );\r\n}\r\n\r\nputVictimGuardian(id: any, val: any) {\r\n console.log('update victim guardian');\r\n console.log(val);\r\n const tempVal = JSON.stringify(val);\r\n return this.http.put(this.smartVictimServiceUrl + 'VictimGuardians/' + id, tempVal, options).pipe\r\n (\r\n map(res => { return res;})\r\n );\r\n}\r\n\r\npostVictimGuardian(id: any, val: any) {\r\n const tempVal = JSON.stringify(val);\r\n return this.http.post(this.smartVictimServiceUrl + 'VictimGuardians/' + id, tempVal, options).pipe\r\n (\r\n map(res => { return res;})\r\n );\r\n}\r\n\r\ngetVictimDrugUse(val: any): Observable<VictimDrugUse[]>{\r\n return this.http.get(this.smartVictimServiceUrl + 'VictimDrugUses/' + val, options).pipe\r\n (\r\n map((res: VictimDrugUse[]) => { \r\n return res;})\r\n );\r\n}\r\n\r\nputVictimDrugUse(id: any, val: VictimDrugUse[]) {\r\n const tempVal = JSON.stringify(val);\r\n\r\n return this.http.put(this.smartVictimServiceUrl + 'VictimDrugUses/' + id, tempVal, options).pipe\r\n (\r\n map(res => { return res;})\r\n );\r\n}\r\n\r\npostVictimDrugUse(id: any, val: any) {\r\n const tempVal = JSON.stringify(val);\r\n return this.http.post(this.smartVictimServiceUrl + 'VictimDrugUses/' + id, tempVal, options).pipe\r\n (\r\n map(res => { return res;})\r\n );\r\n}\r\n\r\nputVictimWeaponUse(id: any, val: any) {\r\n const tempVal = JSON.stringify(val);\r\n return this.http.put(this.smartVictimServiceUrl + 'VictimWeaponUses/' + id, tempVal, options).pipe\r\n (\r\n map(res => { return res;})\r\n );\r\n}\r\n\r\npostVictimWeaponUse(id: any, val: any) {\r\n const tempVal = JSON.stringify(val);\r\n return this.http.post(this.smartVictimServiceUrl + 'VictimWeaponUses/' + id, tempVal, options).pipe\r\n (\r\n map(res => { return res;})\r\n );\r\n}\r\nputVictimSupport(id: any, val: any) {\r\n const tempVal = JSON.stringify(val);\r\n return this.http.put(this.smartVictimServiceUrl + 'VictimSupports/' + id, tempVal, options).pipe\r\n (\r\n map(res => { return res;})\r\n );\r\n}\r\n\r\npostVictimSupport(id: any, val: any) {\r\n const tempVal = JSON.stringify(val);\r\n return this.http.post(this.smartVictimServiceUrl + 'VictimSupports/' + id, tempVal, options).pipe\r\n (\r\n map(res => { return res;})\r\n );\r\n}\r\n\r\ndeleteVictims(val: any) {\r\n return this.http.delete(this.smartVictimServiceUrl+ 'Victims/' + val, options).pipe\r\n (\r\n map(res => { return res;})\r\n );\r\n}\r\n\r\n\r\n\r\n\r\n// //==============Victim Serive===================================\r\n\r\ngetVictims(offenderId: number): Observable <Victim[]> {\r\n\r\n return this.http.get(this.smartVictimServiceUrl + 'Victims/offender/' + offenderId)\r\n .pipe(map((res: Victim[]) => {\r\n \r\n return res;\r\n })\r\n ,catchError(this.handleError));\r\n}\r\n\r\ngetVictimsByFilter(filter: VictimListFilter): Observable<Victim[]>{\r\n return this.http\r\n .post(this.smartVictimServiceUrl + '/Victims', JSON.stringify(filter), { headers: headers })\r\n .pipe(map((res: Victim[]) => {\r\n return res;\r\n })\r\n ,catchError(this.handleError));\r\n}\r\n\r\ngetVictimListByFilter(filter: VictimListFilter) \r\n{\r\n console.log('filer in service');\r\n console.log(filter);\r\n\r\n return this.http\r\n .post(this.smartVictimServiceUrl + 'vVictims/Filter', JSON.stringify(filter), options)\r\n .pipe();\r\n\r\n}\r\n\r\n\r\ngetCasetNotes(victimId: number): Observable <CaseNote[]> {\r\n\r\n return this.http.get(this.smartVictimServiceUrl + 'VictimCaseNotes/victim/' + victimId)\r\n .pipe(map((res: CaseNote[]) => {\r\n return res;\r\n })\r\n ,catchError(this.handleError));\r\n \r\n\r\n}\r\naddCaseNote(caseNote: CaseNote) {\r\n let body: string;\r\n body = JSON.stringify(caseNote);\r\n return this.http\r\n .post(this.smartVictimServiceUrl + 'VictimCaseNotes/', body, options);\r\n \r\n }\r\n\r\n \r\nupdateCaseNote(caseNote: CaseNote){\r\n\r\n let body: string;\r\n body = JSON.stringify(caseNote);\r\n return this.http\r\n .put(this.smartVictimServiceUrl + 'VictimCaseNotes/' + caseNote.victimCaseNoteId, body, options)\r\n\r\n ;\r\n }\r\n\r\ndeleteCaseNote(id: number, staffId: number) {\r\n return this.http.delete(`${this.smartVictimServiceUrl}VictimCaseNotes/${id}?staffId=${staffId}`);\r\n }\r\n\r\n getContacts(victimId: number): Observable <Contact[]> {\r\n\r\n return this.http.get(this.smartVictimServiceUrl + 'VictimContacts/victim/' + victimId)\r\n .pipe(map((res: Contact[]) => {\r\n return res;\r\n })\r\n ,catchError(this.handleError));\r\n \r\n }\r\n addContact(contact: Contact) {\r\n let body: string;\r\n body = JSON.stringify(contact);\r\n return this.http\r\n .post(this.smartVictimServiceUrl + 'VictimContacts/', body, options);\r\n \r\n }\r\n \r\n \r\n updateContact(contact: Contact){\r\n \r\n let body: string;\r\n body = JSON.stringify(contact);\r\n return this.http\r\n .put(this.smartVictimServiceUrl + 'VictimContacts/' + contact.victimContactId, body, options)\r\n \r\n ;\r\n }\r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\ngetSafetyPlans(victimId: number): Observable <VictimSafetyPlan[]> {\r\n\r\n return this.http.get(this.smartVictimServiceUrl + 'vVictimServiceLists/victim/' + victimId)\r\n .pipe(map((res: VictimSafetyPlan[]) => {\r\n return res;\r\n })\r\n ,catchError(this.handleError));\r\n }\r\n\r\ngetVictimServices(victimServiceId: number): Observable <VictimSafetyPlan[]> {\r\n\r\n return this.http.get(this.smartVictimServiceUrl + 'vVictimServiceLists/victimServiceId/' + victimServiceId)\r\n .pipe(map((res: VictimSafetyPlan[]) => {\r\n return res;\r\n })\r\n ,catchError(this.handleError));\r\n \r\n }\r\n\r\ngetVictimServiceDetail(victimServiceId: number): Observable <VictimServiceDetail[]> {\r\n\r\n return this.http.get(this.smartVictimServiceUrl + 'VictimServiceDetails/' + victimServiceId)\r\n .pipe(map((res: VictimServiceDetail[]) => {\r\n \r\n return res;\r\n })\r\n ,catchError(this.handleError));\r\n\r\n}\r\naddSafetyPlan(victimSafetyPlan: VictimSafetyPlan) {\r\n\r\n let body: string;\r\n body = JSON.stringify(victimSafetyPlan);\r\n return this.http\r\n .post(this.smartVictimServiceUrl + 'VictimServices/', body, options)\r\n .pipe();\r\n \r\n }\r\nupdateSafetyPlan(victimSafetyPlan: VictimSafetyPlan){\r\n\r\n let body: string;\r\n body = JSON.stringify(victimSafetyPlan);\r\n return this.http\r\n .put(this.smartVictimServiceUrl + 'VictimServices/' + victimSafetyPlan.victimServiceId, body, options)\r\n\r\n ;\r\n }\r\naddVictimServiceStatus(victimServiceStatusHistory: VictimServiceStatusHistory){\r\n let body: string;\r\n body = JSON.stringify(victimServiceStatusHistory);\r\n return this.http\r\n .post(this.smartVictimServiceUrl + 'VictimServiceStatusHistories/', body, options);\r\n\r\n }\r\n\r\ngetServiceStatusHistories(victimServiceId: number){\r\n return this.http.get(this.smartVictimServiceUrl + 'VictimServiceStatusHistories/victimServiceId/' + victimServiceId)\r\n .pipe(\r\n map((res: VictimServiceStatusHistory[]) => {\r\n \r\n return res;\r\n })\r\n ,catchError(this.handleError)\r\n );\r\n}\r\n\r\ndeleteSafetyPlan(victimServiceId: number, staffId: number) {\r\n return this.http.delete(`${this.smartVictimServiceUrl}VictimServices/${victimServiceId}?staffId=${staffId}`);\r\n\r\n }\r\naddPlanProvider(victimServiceDetail:VictimServiceDetail){\r\n let body: string;\r\n body = JSON.stringify(victimServiceDetail);\r\n return this.http\r\n .post(this.smartVictimServiceUrl + 'VictimServiceDetails/', body, options)\r\n .pipe();\r\n\r\n }\r\n\r\ndeleteProvider(victimProgramProviderId: string, staffId: number){\r\n return this.http.delete(`${this.smartVictimServiceUrl}VictimServiceDetails/${victimProgramProviderId}?staffId=${staffId}`);\r\n\r\n}\r\n\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Observable } from 'rxjs';\r\nimport { map, filter } from 'rxjs/operators';\r\nimport { Injectable,Inject } from '@angular/core';\r\nimport { SMART_OFFENDER_SERVICE_URL} from './smart-victim.model';\r\n\r\n\r\nconst headers = new Headers({ 'Content-Type': 'application/json' });\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class IntakeServicesComponent {\r\n //serviceData = environment.smartOffenderServiceUrl;\r\n constructor(private http: HttpClient,\r\n @Inject(SMART_OFFENDER_SERVICE_URL) private smartOffenderServiceUrl: string, \r\n ) {}\r\n getIntakeByOffender(offenderId: any): Observable<Intake> {\r\n return this.http\r\n .get<Intake>(this.smartOffenderServiceUrl + 'IntakeBasic/offender/' + offenderId)\r\n .pipe();\r\n }\r\n\r\n updateIntakeSteps(\r\n offenderId: number,\r\n intakeStepStatus: IntakeStepStatusModel,\r\n ) {\r\n return this.http.put(\r\n this.smartOffenderServiceUrl + '/IntakeStepStatus/' + offenderId,\r\n intakeStepStatus,\r\n );\r\n }\r\n}\r\n\r\nexport interface Intake {\r\n intakeId: number;\r\n offenderId: number;\r\n intakeOffenderReportStatusId?: any;\r\n startDate: string;\r\n endDate?: any;\r\n assignmentId?: any;\r\n modifiedBy: number;\r\n}\r\n\r\nexport interface IntakeStepStatus {\r\n intakeStepStatusId: number;\r\n intakeId: number;\r\n intakeStepId: string;\r\n completedDate: Date;\r\n modifiedBy: number;\r\n}\r\n\r\nexport interface IntakeStepStatusModel\r\n{\r\n offenderId: number;\r\n intakeStepId: string;\r\n modifiedBy: number;\r\n}\r\n\r\nexport class IntakeStep{\r\n public static PhysicalInformation = \"PHYSIN\";\r\n public static Photo = \"PHOTOS\";\r\n public static HousingInformation = \"HOUSE\";\r\n public static DocketInformation = \"DOCKET\";\r\n public static Alias = \"ALIAS\";\r\n public static IntakeBasicInformation = \"INTKBI\";\r\n public static ContactInformation = \"CONTCT\";\r\n public static DeceasedInformation = \"DEATH\";\r\n public static DriversLicense = \"DRVLIC\";\r\n public static EmploymentInformation = \"EMPLOY\";\r\n public static GangAffiliation = \"GANG\";\r\n public static HealthInsurance = \"HLTHINS\";\r\n public static Identification = \"IDNTFCTN\";\r\n public static InternetIdentifier = \"INTERNETID\";\r\n public static MilitaryService = \"MLTSVC\";\r\n public static School = \"SCHOOL\";\r\n public static SelectiveService = \"SLCTVSVC\";\r\n public static Vehicle = \"VEHICLE\";\r\n public static VictimInformation = \"VICTIM\";\r\n public static WarrantInformation = \"WARRNT\";\r\n public static RunningRecord = \"RUNREC\";\r\n public static Signature = \"SIGN\";\r\n}","import { DOCUMENT, DatePipe } from '@angular/common';\r\nimport { Component, OnInit, OnChanges, ViewChild, Input, Output, AfterViewInit, Inject} from '@angular/core';\r\nimport { ActivatedRoute,Router } from '@angular/router';\r\nimport { MatTableDataSource} from '@angular/material/table';\r\nimport { MatPaginator, MatSort,MatSnackBar } from '@angular/material';\r\nimport { MAT_DIALOG_DATA, MatDialogRef, MatDialog } from '@angular/material';\r\nimport {\r\n SelectedOffender,\r\n LoginStaff,\r\n SmartAccessControlConfig,\r\n AccessType,\r\n} from \"@csmart/ngc-smart-core\";\r\nimport { NgcSmartVictimService } from './smart-victim.service';\r\nimport { ElementsVictim, VictimListFilter, Victim, SMART_WARRANT_URL } from './smart-victim.model';\r\nimport { SmartVictimDeleteConfirmComponent } from './smart-victim-delete-confirm.component';\r\n//import { SmartVictimDetailComponent } from './smart-victim-detail/smart-victim-detail.component';\r\n\r\nimport {\r\n IntakeStepStatusModel,\r\n IntakeStep,\r\n IntakeServicesComponent,\r\n} from './intake.service';\r\n@Component({\r\n selector: \"csmart-victim\",\r\n templateUrl: \"./smart-victim.component.html\",\r\n styleUrls: [\"./smart-victim.component.css\"],\r\n})\r\nexport class NgcSmartVictimComponent implements OnInit, OnChanges, AfterViewInit {\r\n @Input() offenderId: number;\r\n @Input() staffId: number;\r\n @Input() staffRole: string;\r\n @Input() showCaseNote: string;\r\n @Input() showSafetyPlan: string;\r\n //@Input() showAdd: string;\r\n @Input() showAdd: boolean;\r\n @Input() showEdit: string;\r\n @Input() showRelationshipColumn: boolean;\r\n @Input() showOffenderNameColumn: boolean;\r\n @Input() showOffenderPhoneColumn: boolean;\r\n @Input() showSearchForm: boolean;\r\n @Input() accessByModule: string;\r\n @Input() intakeFlag: string;\r\n @Input() appModuleId = '';\r\n @Input() activatedRoute: ActivatedRoute = null;\r\n\r\n @ViewChild(MatPaginator) paginator: MatPaginator;\r\n @ViewChild(MatSort) sort: MatSort;\r\n // @ViewChild(SmartVictimDetailComponent) child;\r\n\r\n displayedColumns: string[];\r\n victims: Victim[] = [];\r\n victimDetail = <Victim>{};\r\n showDetail = false;\r\n victimListFilter: VictimListFilter = new VictimListFilter();\r\n victimListDataSource = new MatTableDataSource();\r\n doSpin: boolean = false;\r\n showListFlag: boolean = false;\r\n msg: string = \"\";\r\n isIntake = false;\r\n\r\n updateAccessControlConfig: SmartAccessControlConfig;\r\n createAccessControlConfig: SmartAccessControlConfig;\r\n deleteAccessControlConfig: SmartAccessControlConfig;\r\n constructor(\r\n private dialog: MatDialog,\r\n private victimService: NgcSmartVictimService,\r\n private router: Router,\r\n private route: ActivatedRoute,\r\n private snackBar: MatSnackBar,\r\n private intakeService: IntakeServicesComponent,\r\n @Inject(SMART_WARRANT_URL) private smartWarrantUrl: string,\r\n @Inject(DOCUMENT) private document: any\r\n ) {}\r\n\r\n // private onChange(filter: VictimListFilter) {\r\n // console.log('filter in onchange');\r\n // console.log(filter);\r\n // this.getVictimList(filter);\r\n // }\r\n\r\n applyFilter(filterValue: string) {\r\n this.victimListDataSource.filter = filterValue.trim().toLowerCase();\r\n }\r\n addRecord() {\r\n this.showDetail = true;\r\n this.showAdd = false;\r\n this.victimDetail = null;\r\n this.showListFlag = false;\r\n }\r\n\r\n editVictimDetail(record) {\r\n console.log(\"victim edit record\");\r\n console.log(record);\r\n console.log(record.victimId);\r\n this.victimDetail = record;\r\n this.showDetail = true;\r\n this.showAdd = false;\r\n this.showListFlag = false;\r\n }\r\n\r\n save(detail: Victim) {\r\n this.showDetail = false;\r\n this.showAdd = true;\r\n this.showListFlag = true;\r\n }\r\n\r\n cancel() {\r\n this.showDetail = false;\r\n this.victimDetail = <Victim>{};\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.victimListDataSource.paginator = this.paginator;\r\n this.victimListDataSource.sort = this.sort;\r\n }\r\n\r\n ngOnChanges() {\r\n this.updateAccessControlConfig = {\r\n accessType: AccessType.UPDATE,\r\n appModuleId: this.appModuleId,\r\n roleId: null,\r\n route: this.activatedRoute.snapshot,\r\n };\r\n this.createAccessControlConfig = {\r\n accessType: AccessType.CREATE,\r\n appModuleId: this.appModuleId,\r\n roleId: null,\r\n route: this.activatedRoute.snapshot,\r\n };\r\n this.deleteAccessControlConfig = {\r\n accessType: AccessType.DELETE,\r\n appModuleId: this.appModuleId,\r\n roleId: null,\r\n route: this.activatedRoute.snapshot,\r\n };\r\n }\r\n\r\n ngOnInit() {\r\n var data = this.route.snapshot.data;\r\n var myPath = this.router.url.slice(-10);\r\n\r\n console.log(\"smart-victim ngOnInit\");\r\n console.log(this.intakeFlag);\r\n console.log(myPath);\r\n\r\n if (this.intakeFlag || myPath == \"victimHome\") {\r\n this.isIntake = true;\r\n }\r\n\r\n this.displayedColumns = [\"lastName\", \"firstName\"];\r\n\r\n if (\r\n this.showRelationshipColumn == true ||\r\n myPath == \"victimList\" ||\r\n myPath == \"victimHome\"\r\n ) {\r\n this.displayedColumns.push(\"relationship\");\r\n }\r\n if (this.showOffenderNameColumn == true) {\r\n this.displayedColumns.push(\"offenderName\");\r\n }\r\n\r\n if (\r\n this.showOffenderPhoneColumn == true ||\r\n myPath == \"victimList\" ||\r\n myPath == \"victimHome\"\r\n ) {\r\n this.displayedColumns.push(\"homePhone\");\r\n }\r\n\r\n this.displayedColumns.push(\"victimId\");\r\n\r\n if (this.showSearchForm == true) {\r\n this.showListFlag = false;\r\n }\r\n\r\n console.log(\"this.showSearchForm\");\r\n console.log(this.showSearchForm);\r\n console.log(\"myPath\");\r\n console.log(myPath);\r\n\r\n if (\r\n this.showSearchForm == false ||\r\n myPath == \"victimList\" ||\r\n myPath == \"victimHome\"\r\n ) {\r\n var myOffenderId;\r\n if (this.offenderId) {\r\n myOffenderId = this.offenderId;\r\n } else {\r\n console.log(\"back from previous page\");\r\n this.showAdd = true;\r\n this.showRelationshipColumn = true;\r\n //this.displayedColumns.push(\"relationship\");\r\n this.showOffenderPhoneColumn = true;\r\n // this.displayedColumns.push(\"homePhone\");\r\n this.accessByModule = \"true\";\r\n this.showEdit = \"true\";\r\n this.showCaseNote = \"true\";\r\n this.showSafetyPlan = \"true\";\r\n\r\n myOffenderId = data.selectedOffender.offenderId;\r\n }\r\n\r\n const victimListFilter: VictimListFilter = {\r\n offenderId: myOffenderId,\r\n lastName: null,\r\n firstName: null,\r\n pdid: null,\r\n birthDate: null,\r\n };\r\n\r\n console.log(\"victimListFilter in smar-victim componenet\");\r\n console.log(victimListFilter);\r\n\r\n this.victimService\r\n .getVictimListByFilter(victimListFilter)\r\n .subscribe((data: Victim[]) => {\r\n this.victimListDataSource.data = data;\r\n\r\n this.victims = data;\r\n\r\n data.forEach((d) => {\r\n if (d.homePhone == null || d.homePhone == \"\") {\r\n d.homePhone = d.cellPhone;\r\n }\r\n if (d.homePhone == null || d.homePhone == \"\") {\r\n d.homePhone = d.workPhone;\r\n }\r\n });\r\n console.log(\"victim data at line 179\");\r\n console.log(this.victims);\r\n console.log(\"showListFlag\");\r\n console.log(this.showListFlag);\r\n this.showListFlag = true;\r\n if (data.length == 0) {\r\n this.msg = \"No Record Found!\";\r\n }\r\n });\r\n } else {\r\n console.log(\"find filter\");\r\n console.log(this.victimListFilter);\r\n\r\n if (this.showListFlag === true) {\r\n if (this.victimListFilter != null) {\r\n this.victimService\r\n .getVictimListByFilter(this.victimListFilter)\r\n .subscribe((data: Victim[]) => {\r\n this.victimListDataSource.data = data;\r\n this.victims = data;\r\n console.log(\"victim data at line 201\");\r\n console.log(data);\r\n });\r\n }\r\n }\r\n }\r\n }\r\n\r\n formatPhoneNumber(phoneNumberString) {\r\n if (!phoneNumberString) return \"\";\r\n var cleaned = (\"\" + phoneNumberString).replace(/\\D/g, \"\");\r\n var match = cleaned.match(/^(\\d{3})(\\d{3})(\\d{4})$/);\r\n if (match) {\r\n return \"(\" + match[1] + \") \" + match[2] + \"-\" + match[3];\r\n }\r\n return \"\";\r\n }\r\n\r\n saveIntake() {\r\n if (!this.isIntake) {\r\n return;\r\n }\r\n const intakeStep = <IntakeStepStatusModel>{\r\n intakeStepId: IntakeStep.VictimInformation,\r\n offenderId: this.offenderId,\r\n modifiedBy: this.staffId,\r\n };\r\n this.intakeService\r\n .updateIntakeSteps(this.offenderId, intakeStep)\r\n .subscribe((res) => {\r\n console.log(\"save intake step.\");\r\n this.snackBar.open(\"Status Saved.\", \"\", {\r\n duration: 3000,\r\n });\r\n //this.router.navigate(['/warrant '], { queryParams: { intake: 1 } });\r\n\r\n this.document.location.href = `${this.smartWarrantUrl}/warrant`;\r\n });\r\n }\r\n\r\n goToCaseNote(victimId: number) {\r\n this.router.navigate([\"casenote\", victimId]);\r\n }\r\n\r\n goToSaftyPlan(victimId: number) {\r\n this.router.navigate([\"saftyPlan\", victimId]);\r\n }\r\n\r\n getVictimList(filter: VictimListFilter) {\r\n this.victimListFilter = filter;\r\n console.log(\"this.victimListFilter inside getVictimList\");\r\n console.log(this.victimListFilter);\r\n this.doSpin = true;\r\n this.victimService.getVictimListByFilter(filter).subscribe(\r\n (data: Victim[]) => {\r\n this.victimListDataSource.data = data;\r\n\r\n this.doSpin = !this.doSpin;\r\n\r\n if (data.length > 0) {\r\n this.showListFlag = true;\r\n } else {\r\n this.msg = \"No record found!\";\r\n }\r\n },\r\n (err) => {\r\n this.doSpin = !this.doSpin;\r\n }\r\n );\r\n }\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\nimport {MatDialog, MatDialogRef} from '@angular/material';\r\n\r\n@Component({\r\n selector: 'app-common-dialog',\r\n templateUrl: './common-dialog.component.html',\r\n styleUrls: ['./common-dialog.component.css']\r\n})\r\nexport class CommonDialogComponent implements OnInit {\r\npublic title: string;\r\npublic message: string;\r\npublic cmdYesTitle: string =\"Yes\";\r\npublic cmdNoTitle: string = \"No\";\r\n\r\n constructor(public commondialogRef: MatDialogRef<CommonDialogComponent>) { }\r\n\r\n ngOnInit() {\r\n \r\n }\r\n\r\n}\r\n","import { Observable } from 'rxjs';\r\nimport { CommonDialogComponent } from './common-dialog.component';\r\nimport { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';\r\nimport { Injectable } from '@angular/core';\r\n\r\n@Injectable()\r\nexport class CommonDialogService {\r\n\r\n constructor(private dialog: MatDialog) { }\r\n\r\n public confirm(title: string, message: string, cmdYesTitle: string, cmdNoTitle: string): Observable<boolean> {\r\n\r\n let dialogRef: MatDialogRef<CommonDialogComponent>;\r\n\r\n dialogRef = this.dialog.open(CommonDialogComponent);\r\n dialogRef.componentInstance.title = title;\r\n dialogRef.componentInstance.message = message;\r\n dialogRef.componentInstance.cmdYesTitle = cmdYesTitle;\r\n dialogRef.componentInstance.cmdNoTitle = cmdNoTitle;\r\n return dialogRef.afterClosed();\r\n }\r\n\r\n public warning(title: string, message: string, cmdOkTitle: string, ): Observable<boolean> {\r\n\r\n let dialogRef: MatDialogRef<CommonDialogComponent>;\r\n\r\n dialogRef = this.dialog.open(CommonDialogComponent);\r\n dialogRef.componentInstance.title = title;\r\n dialogRef.componentInstance.message = message;\r\n dialogRef.componentInstance.cmdYesTitle = cmdOkTitle;\r\n \r\n return dialogRef.afterClosed();\r\n }\r\n\r\n}\r\n","import { Component, OnInit, OnChanges, Input, Output, EventEmitter } from '@angular/core';\r\nimport { FormBuilder, FormGroup, FormControl,Validators,ValidatorFn } from '@angular/forms';\r\nimport { MatDialog,MatSnackBar,MatRadioChange, MatInput, MatSelect, MatRadioGroup } from '@angular/material';\r\nimport { Victim,VictimDrugUse, Contact, VictimAdvocate,VictimGuardian,VictimWeaponUse,VictimSupport } from '../smart-victim.model';\r\nimport { NgcSmartVictimService } from '../smart-victim.service';\r\nimport { Router, ActivatedRoute } from '@angular/router';\r\nimport { CommonDialogService} from '.././common-dialog/common-dialog.service';\r\nimport { DatePipe, formatDate, Location} from '@angular/common';\r\nimport { map } from 'rxjs/operators';\r\nimport { coerceBooleanProperty}from'@angular/cdk/coercion';\r\nimport { Moment } from 'moment';\r\nimport { truncate } from 'fs';\r\nimport { MatTableDataSource} from '@angular/material/table';\r\nimport { AddressValidators, SmartAddressComponent } from '@csmart/ngc-smart-address';\r\n\r\nexport interface BooleanFn {\r\n (): boolean;\r\n}\r\nexport interface StringFn {\r\n (): string;\r\n}\r\n\r\nexport function conditionalValidator(predicate: BooleanFn,\r\n validator: ValidatorFn,\r\n errorNamespace?: string): ValidatorFn {\r\nreturn (formControl => {\r\nif (!formControl.parent) {\r\nreturn null;\r\n}\r\nlet error = null;\r\nif (predicate()) {\r\nerror = validator(formControl);\r\n}\r\nif (errorNamespace && error) {\r\nconst customError = {};\r\ncustomError[errorNamespace] = error;\r\nerror = customError\r\n}\r\nreturn error;\r\n})\r\n}\r\n\r\n\r\nexport function stringConditionalValidator(predicate: StringFn,\r\n validator: ValidatorFn,\r\n errorNamespace?: string): ValidatorFn {\r\nreturn (formControl => {\r\nif (!formControl.parent) {\r\nreturn null;\r\n}\r\nlet error = null;\r\nif (predicate()=='YS') {\r\nerror = validator(formControl);\r\n}\r\nif (errorNamespace && error) {\r\nconst customError = {};\r\ncustomError[errorNamespace] = error;\r\nerror = customError\r\n}\r\nreturn error;\r\n})\r\n}\r\n\r\n@Component({\r\n selector: 'csmart-victim-detail',\r\n templateUrl: './smart-victim-detail.component.html',\r\n styleUrls: ['./smart-victim-detail.component.css'],\r\n providers: [CommonDialogService]\r\n})\r\nexport class SmartVictimDetailComponent implements OnInit, OnChanges {\r\n @Input() victimDetail = <Victim>{};\r\n @Input() staffId: number;\r\n @Input() offenderId: number;\r\n @Input() isIntake: boolean;\r\n\r\n @Output() onSave = new EventEmitter();\r\n @Output() onCancel = new EventEmitter();\r\n \r\n\r\n victimId: number;\r\n victimForm: FormGroup;\r\n\r\n drugs: any;\r\n victimSupportTypes: any;\r\n prefixes: any;\r\n //victim: Victim = <Victim>{};\r\n suffixes: any;\r\n relationshipTypes: any;\r\n genders: any;\r\n docketlist: any;\r\n weaponTypes: any;\r\n flagOption: any;\r\n selectedWeaponTypes: any;\r\n selectedVictimSupportTypes: any;\r\n selectedDrugs: any;\r\n id: any;\r\n hidden: boolean=true;\r\n private sub: any;\r\n victimAdvocate: VictimAdvocate = <VictimAdvocate>{};\r\n victimGuardian: VictimGuardian = <VictimGuardian>{}; \r\n victimWeaponUse: VictimWeaponUse;\r\n victimSupport: VictimSupport;\r\n victimDrugUse: VictimDrugUse;\r\n result: any;\r\n editMode: any;\r\n guardianTabFlag: boolean = false;\r\n advocateTabFlag: boolean = false;\r\n commonChildrenDivFlag: boolean = false;\r\n cpoExpirationDivFlag : boolean = false;\r\n supportInPlaceDivFlag: boolean = false;\r\n weaponInvolvedDivFlag: boolean = false;\r\n drugUseDivFlag: boolean = false;\r\n showDelete: boolean = false;\r\n addressId: number = 0;\r\n advocateAddressId: number = 0;\r\n guardianAddressId: number = 0;\r\n datePipe = new DatePipe('en-US');\r\n emailPattern = \"^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,4}$\";\r\n phoneNumber = \"\\\\d{10}\";\r\n editVictim: Victim = <Victim>{};\r\n victimAge: number;\r\n otherWeaponFlag: boolean = false;\r\n otherDrugFlag: boolean = false;\r\n\r\n contactDataSource= new MatTableDataSource();\r\n contactList: Contact[];\r\n guardianPhoneExistFlag: boolean = false;\r\n advocatePhoneExistFlag: boolean = false;\r\n phoneValidationFlag: boolean = false;\r\n guaridanNoPhoneChkFlag: boolean = true;\r\n advocateNoPhoneChkFlag: boolean = true;\r\n\r\n addressValidators: AddressValidators = {\r\n street: [],\r\n street2: [],\r\n city: [],\r\n stateCode: [],\r\n zipCode: [],\r\n psaCode: [],\r\n };\r\n\r\n constructor(\r\n private location: Location,\r\n private formBuilder: FormBuilder, \r\n private dialog: MatDialog,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n public snackBar: MatSnackBar,\r\n private commonDialogService: CommonDialogService,\r\n private victimService: NgcSmartVictimService) {\r\n this.initForm();\r\n }\r\n\r\n private initForm() {\r\n \r\n this.victimForm = this.formBuilder.group({\r\n underSupervisionFlag: new FormControl('', Validators.compose([ Validators.required])),\r\n victimOffenderRelationshipTypeId:new FormControl('', Validators.compose([ Validators.required])),\r\n lastName: new FormControl('', Validators.compose([ Validators.required])),\r\n firstName: new FormControl('', Validators.compose([ Validators.required])),\r\n middleName: new FormControl('', ),\r\n prefixId: new FormControl('', ),\r\n suffixId: new FormControl('', ),\r\n genderCode:new FormControl('', ),\r\n birthDate: new FormControl('', ),\r\n homePhone: new FormControl('', Validators.compose([Validators.pattern(this.phoneNumber) ])),\r\n cellPhone: new FormControl('', Validators.compose([Validators.pattern(this.phoneNumber) ])),\r\n workPhone: new FormControl('', Validators.compose([Validators.pattern(this.phoneNumber) ])),\r\n email:new FormControl('', Validators.compose([Validators.pattern(this.emailPattern) ])),\r\n minorFlag:new FormControl('', Validators.compose([ Validators.required])),\r\n victimAdvocateFlag: new FormControl('', Validators.compose([ Validators.required])),\r\n guardianLastName:new FormControl('', ),\r\n guardianFirstName: new FormControl('',),\r\n guardianPrefixId:new FormControl('', ),\r\n guardianSuffixId: new FormControl('', ), \r\n //guardianGender:new FormControl('', ),\r\n guardianBirthDate: new FormControl('', ),\r\n guardianNoPhoneFlag:new FormControl(true),\r\n\r\n guardianHomePhone:new FormControl('', Validators.compose([Validators.pattern(this.phoneNumber) ] )),\r\n guardianCellPhone:new FormControl('', Validators.compose([Validators.pattern(this.phoneNumber) ] )),\r\n guardianWorkPhone:new FormControl('', Validators.compose([Validators.pattern(this.phoneNumber) ] )),\r\n \r\n \r\n guardianEmail:new FormControl('', Validators.compose([Validators.pattern(this.emailPattern) ])),\r\n advocateNoPhoneFlag: new FormControl(true),\r\n \r\n\r\n advocateWorkPhone:new FormControl('', Validators.compose([ Validators.pattern(this.phoneNumber) ] )),\r\n advocateHomePhone:new FormControl('', Validators.compose([ Validators.pattern(this.phoneNumber) ] )),\r\n advocateCellPhone: new FormControl('', Validators.compose([ Validators.pattern(this.phoneNumber) ] )),\r\n \r\n\r\n advocateSuffixId:new FormControl('', ),\r\n advocatePrefixId: new FormControl('', ),\r\n advocateFirstName: new FormControl('', stringConditionalValidator(() => this.victimForm.get('victimAdvocateFlag').value, Validators.required, 'illuminatiError')),\r\n advocateLastName: new FormControl('', stringConditionalValidator(() => this.victimForm.get('victimAdvocateFlag').value, Validators.required,'illuminatiError')),\r\n advocateEmail: new FormControl('', Validators.compose([Validators.pattern(this.emailPattern) ])),\r\n emergencyContact: new FormControl('', ),\r\n emergencyContactPhone:new FormControl('', Validators.compose([Validators.pattern(this.phoneNumber) ])),\r\n emergencyChildren: new FormControl('', ),\r\n emergencyCpo: new FormControl('', ),\r\n emergencyDrug:new FormControl('', ),\r\n emergencySupport: new FormControl('', ),\r\n emergencyWeapon: new FormControl('', ),\r\n drug: new FormControl('', ),\r\n weapon: new FormControl('', ),\r\n support: new FormControl('', ),\r\n commonChildrenFlag: new FormControl('', ),\r\n commonChildrenNumber:new FormControl('', ),\r\n cpoExpirationFlag: new FormControl('', ),\r\n cpoExpirationDate: new FormControl('', ),\r\n accessRisk:new FormControl('', ),\r\n drugUseFlag:new FormControl('', ),\r\n supportInPlaceFlag: new FormControl('', ),\r\n weaponInvolvedFlag: new FormControl('', ),\r\n otherWeapon: new FormControl('', ),\r\n otherDrug: new FormControl('', ),\r\n alcoholUseFlag:new FormControl('', ),\r\n victimSupports:new FormControl('', ),\r\n victimWeaponUses:new FormControl('', ),\r\n victimDrugUses:new FormControl('', ),\r\n allowCsosaContactFlag: new FormControl('', ),\r\n \r\n \r\n});\r\n\r\n this.victimForm.markAsPristine();\r\n\t\tthis.victimForm.markAsUntouched();\r\n\r\n }\r\n\r\n private _getVictim() {\r\n if (this.victimId === 0) { \r\n \r\n return; \r\n };\r\n\t\tif (this.editMode == true) {\r\n console.log('find victim id inside getVictim');\r\n console.log(this.victimId);\r\n\r\n if (this.victimId === undefined) {\r\n this.sub = this.route.params.subscribe(params => {\r\n this.victimId = params['victimId'];\r\n console.log('my this.victimId');\r\n console.log(this.victimId);\r\n });\r\n }\r\n\r\n this.victimService.getVictim(this.victimId)\r\n .subscribe((victim: Victim) => {\r\n console.log('victim data 1');\r\n console.log(victim);\r\n this.editVictim = <Victim>victim;\r\n \r\n var supportsData =[];\r\n this.editVictim.victimSupports.forEach( t=>{supportsData.push(t.victimSupportTypeId); } )\r\n const victimSupportsControl = this.victimForm.get('victimSupports');\r\n victimSupportsControl.setValue(supportsData);\r\n\r\n\r\n var weaponUsesData =[];\r\n var otherWeapon = \"\";\r\n this.editVictim.victimWeaponUses.forEach( t=>{\r\n weaponUsesData.push(t.weaponTypeId); \r\n if (t.weaponTypeId == \"OTHER\"){\r\n otherWeapon = t.otherWeapon;\r\n this.otherWeaponFlag = true;\r\n }\r\n \r\n } )\r\n\r\n\r\n const victimWeaponUsesControl = this.victimForm.get('victimWeaponUses');\r\n victimWeaponUsesControl.setValue(weaponUsesData);\r\n\r\n const otherWeaponControl = this.victimForm.get('otherWeapon');\r\n otherWeaponControl.setValue(otherWeapon);\r\n\r\n\r\n //this.weaponUsesData = this.editVictim.victimWeaponUses;\r\n \r\n var drugUseData =[];\r\n var otherDrug = \"\";\r\n\r\n console.log('load this.editVictim.victimDrugUses');\r\n console.log(this.editVictim.victimDrugUses);\r\n this.editVictim.victimDrugUses.forEach( t=>{\r\n \r\n if (t.drugTypeId === null){\r\n otherDrug = t.otherDrug;\r\n this.otherDrugFlag = true;\r\n t.drugTypeId ='OTHER';\r\n\r\n }\r\n drugUseData.push(t.drugTypeId);\r\n \r\n } )\r\n\r\n console.log('this.editVictim.victimDrugUses after push');\r\n console.log(drugUseData);\r\n\r\n\r\n\r\n const victimDrugUsesControl = this.victimForm.get('victimDrugUses');\r\n victimDrugUsesControl.setValue(drugUseData);\r\n\r\n const otherDrugControl = this.victimForm.get('otherDrug');\r\n otherDrugControl.setValue(otherDrug);\r\n\r\n\r\n\r\n //contact\r\n this.victimService.getContacts(this.victimId).subscribe(\r\n contactList => {\r\n console.log('contactList');\r\n console.log(contactList);\r\n this.contactList = contactList; \r\n this.contactDataSource.data = this.contactList;\r\n }\r\n );\r\n\r\n //no phone field\r\n\r\n if ( this.editVictim.guardianNoPhoneFlag === false ){\r\n this.victimForm.patchValue({guardianNoPhoneFlag: false});\r\n }\r\n if ( this.editVictim.advocateNoPhoneFlag === false ){\r\n this.victimForm.patchValue({advocateNoPhoneFlag: false});\r\n }\r\n\r\n }, error => {\r\n this.snackBar.open(\"Error occured while retriving Victim Information. Please try again.\");\r\n });\r\n return;\r\n\t\t} else {\r\n //new\r\n\r\n }\r\n }\r\n \r\n ngOnChanges() {\r\n \r\n }\r\n\r\n onAddressChange(addressId) { \r\n this.victimForm.patchValue({addressId: addressId})\r\n this.addressId = addressId;\r\n }\r\n onGuardianAddressChange(MyGuardianAddressId) { \r\n this.victimForm.patchValue({guardianAddressId: MyGuardianAddressId})\r\n this.guardianAddressId = MyGuardianAddressId;\r\n }\r\n onAdvocateAddressChange(MyAdvocateAddressId) { \r\n this.victimForm.patchValue({advocateAddressId: MyAdvocateAddressId})\r\n this.advocateAddressId = MyAdvocateAddressId;\r\n }\r\n cancel() {\r\n this.victimForm.reset();\r\n}\r\n\r\n\r\n\r\n\r\n ngOnInit() {\r\n\r\n console.log('show offenderId');\r\n console.log(this.offenderId);\r\n console.log('show staffId');\r\n console.log(this.staffId);\r\n console.log('show isIntake');\r\n console.log(this.isIntake);\r\n //this.victimDetail.guardianNoPhoneFlag = true;\r\n //this.victimForm.value.guardianNoPhoneFlag = true;\r\n //this.victimForm.get('guardianNoPhoneFlag').setValue(true);\r\n\r\n //required field\r\n const requiredImplementation = {get:function():boolean{if(this._required){return this._required;}\r\n if(this.ngControl&&this.ngControl.control&&this.ngControl.control.validator\r\n ){const emptyValueControl=Object.assign({},\r\n this.ngControl.control);(emptyValueControl as any).value=null;\r\n return('required'in(this.ngControl.control.validator(emptyValueControl)||{}));}\r\n return false;},set:function(value:boolean){this._required=coerceBooleanProperty(value);},};\r\n Object.defineProperty(MatInput.prototype,'required',requiredImplementation,);\r\n Object.defineProperty(MatSelect.prototype,'required',requiredImplementation,);\r\n Object.defineProperty(MatRadioGroup.prototype,'required',requiredImplementation,);\r\n //required field end\r\n\r\n \r\n\r\n if (this.victimDetail!=null) {\r\n // edit record\r\n this.editMode = true; \r\n this.showDelete= true; \r\n this.victimId = this.victimDetail.victimId;\r\n \r\n this.guardianTabFlag = this.victimDetail.minorFlag;\r\n\r\n \r\n if (this.victimDetail.victimAdvocateFlag=='YS'){\r\n this.advocateTabFlag = true;\r\n }\r\n\r\n if (this.otherWeaponFlag == true){\r\n const otherWeaponControl = this.victimForm.get('otherWeapon');\r\n otherWeaponControl.setValidators(Validators.required);\r\n\r\n }\r\n\r\n if (this.otherDrugFlag == true){\r\n const otherDrugControl = this.victimForm.get('otherDrug');\r\n otherDrugControl.setValidators(Validators.required);\r\n\r\n }\r\n\r\n this.cpoExpirationDivFlag =this.victimDetail.cpoExpirationFlag;\r\n this.commonChildrenDivFlag = this.victimDetail.commonChildrenFlag;\r\n this.supportInPlaceDivFlag= this.victimDetail.supportInPlaceFlag;\r\n this.weaponInvolvedDivFlag= this.victimDetail.weaponInvolvedFlag;\r\n this.drugUseDivFlag= this.victimDetail.drugUseFlag;\r\n this.addressId = this.victimDetail.addressId;\r\n this.guardianAddressId = this.victimDetail.guardianAddressId;\r\n this.advocateAddressId = this.victimDetail.advocateAddressId;\r\n\r\n this._getVictim();\r\n\r\n } else {\r\n //add new record\r\n this.victimForm.patchValue({guardianNoPhoneFlag: true});\r\n this.victimForm.patchValue({advocateNoPhoneFlag: true});\r\n \r\n }\r\n\r\n this.victimService.getFlagOptionYesNoUnknowns().subscribe(\r\n (items: any) => {\r\n this.flagOption = items;\r\n }\r\n );\r\n this.victimService.getGenders().subscribe(\r\n (items: any) => {\r\n this.genders = items;\r\n }\r\n );\r\n this.victimService.getPrefixes().subscribe(\r\n (items: any) => {\r\n this.prefixes = items;\r\n }\r\n );\r\n this.victimService.getSuffixes().subscribe(\r\n (items: any) => {\r\n this.suffixes = items;\r\n }\r\n );\r\n this.victimService.getRelationshipTypes().subscribe(\r\n (items: any) => {\r\n this.relationshipTypes = items.filter( (y) => (y.relationshipCategoryId === 'ST' || y.relationshipCategoryId === 'FM' ));\r\n }\r\n );\r\n this.victimService.getSupportTypes().subscribe(\r\n (items: any) => {\r\n this.victimSupportTypes = items;\r\n }\r\n );\r\n this.victimService.getWeaponTypes().subscribe(\r\n (items: any) => {\r\n this.weaponTypes = items;\r\n }\r\n );\r\n this.victimService.getDrugsTypes().subscribe(\r\n (items: any) => {\r\n console.log('drug lookup items');\r\n console.log(items);\r\n this.drugs = items;\r\n this.drugs.push({drugTypeId: 'OTHER', name: 'Other'});\r\n console.log(this.drugs);\r\n }\r\n );\r\n // this.victimService.getDocketList(this.offenderId).subscribe(\r\n // (items: any) => {\r\n // this.docketlist = items;\r\n // }\r\n\r\n // );\r\n\r\n this.victimForm.get('minorFlag').valueChanges\r\n .subscribe(value => {\r\n // this.victimForm.get('guardianFirstName').updateValueAndValidity();\r\n // this.victimForm.get('guardianLastName').updateValueAndValidity();\r\n this.victimForm.get('guardianWorkPhone').updateValueAndValidity();\r\n this.victimForm.get('guardianHomePhone').updateValueAndValidity();\r\n this.victimForm.get('guardianCellPhone').updateValueAndValidity();\r\n \r\n });\r\n\r\n\r\n this.victimForm.get('victimAdvocateFlag').valueChanges\r\n .subscribe(value => {\r\n this.victimForm.get('advocateFirstName').updateValueAndValidity();\r\n this.victimForm.get('advocateLastName').updateValueAndValidity();\r\n this.victimForm.get('advocateWorkPhone').updateValueAndValidity();\r\n this.victimForm.get('advocateHomePhone').updateValueAndValidity();\r\n this.victimForm.get('advocateCellPhone').updateValueAndValidity();\r\n \r\n });\r\n\r\n }\r\n\r\n back(){\r\n\r\n //this.onSave.emit(this.victimDetail);\r\n this.router.navigate(['victimList']);\r\n \r\n }\r\n\r\n deleteVictim() {\r\n this.commonDialogService\r\n .confirm('', 'Do you want to delete this Victim?', 'Yes', 'No')\r\n .subscribe(res => {this.result = res;\r\n if (this.result) {\r\n this.victimService.deleteVictims(this.victimDetail.victimId)\r\n .subscribe(result => {\r\n this.snackBar.open('Delete Successfully!', '', {\r\n duration: 3000, });}\r\n \r\n );\r\n // this.router.navigate(['victim']);\r\n this.onSave.emit(this.victimDetail);\r\n }\r\n });\r\n\r\n }\r\n\r\n radioMinorChange($event: MatRadioChange){\r\n // const guardianLastNameControl = this.victimForm.get('guardianLastName');\r\n //const guardianFirstNameControl = this.victimForm.get('guardianFirstName');\r\n\r\n \r\n if ($event.value === true) {\r\n this.guardianTabFlag = true;\r\n // guardianLastNameControl.setValidators(Validators.required);\r\n // guardianFirstNameControl.setValidators(Validators.required);\r\n //this.victimForm.value.guardianNoPhoneFlag = true;\r\n \r\n \r\n }\r\n else{\r\n this.guardianTabFlag = false;\r\n // guardianLastNameControl.clearValidators();\r\n // guardianFirstNameControl.clearValidators();\r\n \r\n \r\n }\r\n\r\n\t\t//guardianLastNameControl.updateValueAndValidity();\r\n // guardianFirstNameControl.updateValueAndValidity();\r\n \r\n }\r\n\r\n radioAdvocateChange($event: MatRadioChange){\r\n\r\n const advocateLastNameControl = this.victimForm.get('advocateLastName');\r\n const advocateFirstNameControl = this.victimForm.get('advocateFirstName');\r\n // const advocateNoPhoneControl = this.victimForm.get('advocateNoPhoneFlag');\r\n \r\n \r\n\r\n if ($event.value === \"YS\") {\r\n this.advocateTabFlag = true;\r\n advocateLastNameControl.setValidators(Validators.required);\r\n advocateFirstNameControl.setValidators(Validators.required);\r\n \r\n \r\n }\r\n else{\r\n this.advocateTabFlag = false;\r\n \r\n advocateLastNameControl.clearValidators();\r\n advocateFirstNameControl.clearValidators();\r\n\r\n }\r\n\r\n advocateLastNameControl.updateValueAndValidity();\r\n advocateFirstNameControl.updateValueAndValidity();\r\n \r\n }\r\n\r\n radioCicChange($event: MatRadioChange){\r\n if ($event.value === true) {\r\n this.commonChildrenDivFlag = true;\r\n // requrie field\r\n this.setValidators('commonChildren');\r\n }\r\n else{\r\n this.commonChildrenDivFlag = false;\r\n }\r\n }\r\n\r\n setValidators(type) {\r\n if(type == 'commonChildren'){\r\n this.victimForm.get('commonChildrenNumber').clearValidators();\r\n this.victimForm.get('commonChildrenNumber').setValidators(Validators.required);\r\n }\r\n else if (type == 'cpo'){\r\n this.victimForm.get('cpoExpirationDate').clearValidators();\r\n this.victimForm.get('cpoExpirationDate').setValidators(Validators.required);\r\n\r\n }\r\n }\r\n radioSupportChange($event: MatRadioChange){\r\n if ($event.value === true) {\r\n this.supportInPlaceDivFlag = true;\r\n }\r\n else{\r\n this.supportInPlaceDivFlag = false;\r\n }\r\n }\r\n radioWeaponChange($event: MatRadioChange){\r\n if ($event.value === true) {\r\n this.weaponInvolvedDivFlag = true;\r\n }\r\n else{\r\n this.weaponInvolvedDivFlag = false;\r\n }\r\n }\r\n radioDrugChange($event: MatRadioChange){\r\n if ($event.value === true) {\r\n this.drugUseDivFlag = true;\r\n }\r\n else{\r\n this.drugUseDivFlag = false;\r\n }\r\n }\r\n\r\n radioCpoChange($event: MatRadioChange){\r\n if ($event.value === true) {\r\n this.cpoExpirationDivFlag = true;\r\n this.setValidators('cpo');\r\n }\r\n else{\r\n this.cpoExpirationDivFlag = false;\r\n }\r\n }\r\n\r\n handleDOBChange($event ){\r\n var ageDifMs = Date.now() - $event.value;\r\n var ageDate = new Date(ageDifMs); \r\n if( Math.abs(ageDate.getUTCFullYear() - 1970) <= 18){\r\n \r\n this.snackBar.open('Victim is a Minor. This information is a sensitive and should not be disclosed to any unauthorized parties. Contact the legal guardian.', '', {\r\n duration: 6000,});\r\n const minorControl = this.victimForm.get('minorFlag');\r\n minorControl.setValue(true);\r\n // const guardianLastNameControl = this.victimForm.get('guardianLastName');\r\n // const guardianFirstNameControl = this.victimForm.get('guardianFirstName');\r\n \r\n\r\n this.guardianTabFlag = true;\r\n // guardianLastNameControl.setValidators(Validators.required);\r\n // guardianFirstNameControl.setValidators(Validators.required);\r\n\r\n \r\n \r\n }\r\n\r\n }\r\n checkOtherWeapon(WeaponUse){\r\n\r\n const otherWeaponControl = this.victimForm.get('otherWeapon');\r\n if (WeaponUse.includes(\"OTHER\")){\r\n this.otherWeaponFlag = true;\r\n otherWeaponControl.setValidators(Validators.required)\r\n\r\n }else{\r\n this.otherWeaponFlag = false;\r\n otherWeaponControl.clearValidators();\r\n }\r\n otherWeaponControl.updateValueAndValidity();\r\n }\r\n\r\n checkOtherDrug(DrugUse){\r\n\r\n const otherDrugControl = this.victimForm.get('otherDrug');\r\n if (DrugUse.includes(\"OTHER\")){\r\n this.otherDrugFlag = true;\r\n otherDrugControl.setValidators(Validators.required)\r\n \r\n\r\n }else{\r\n this.otherDrugFlag = false;\r\n otherDrugControl.clearValidators();\r\n \r\n\r\n }\r\n otherDrugControl.updateValueAndValidity();\r\n }\r\n \r\n //#region \"save victim\"\r\n saveVictim() {\r\n //var myPath = this.router.url.slice(-10)\r\n\r\n //guardian phone logic\r\n if (!this.victimForm.value.guardianNoPhoneFlag)\r\n {\r\n if (this.victimForm.value.guardianHomePhone){\r\n if (this.victimForm.value.guardianHomePhone !== null){\r\n if (this.victimForm.value.guardianHomePhone !== \"\"){\r\n this.guardianPhoneExistFlag = true;\r\n }\r\n }\r\n }\r\n\r\n\r\n\r\n if (this.victimForm.value.guardianWorkPhone !== undefined){\r\n if (this.victimForm.value.guardianWorkPhone !== null){\r\n if (this.victimForm.value.guardianWorkPhone !== \"\"){\r\n this.guardianPhoneExistFlag = true;\r\n }\r\n }\r\n }\r\n\r\n\r\n if (this.victimForm.value.guardianCellPhone){\r\n if (this.victimForm.value.guardianCellPhone !== null){\r\n if (this.victimForm.value.guardianCellhone !== \"\"){\r\n this.guardianPhoneExistFlag = true;\r\n }\r\n }\r\n }\r\n\r\n }\r\n \r\n console.log('this.victimForm.value.guardianNoPhoneFlag');\r\n console.log(this.victimForm.value.guardianNoPhoneFlag);\r\n console.log('this.guardianPhoneExistFlag');\r\n console.log(this.guardianPhoneExistFlag);\r\n \r\n\r\n if (this.guardianPhoneExistFlag === false && this.victimForm.value.guardianNoPhoneFlag === false)\r\n {\r\n \r\n this.phoneValidationFlag = true;\r\n this.commonDialogService\r\n .warning('', 'Please check the guardian phone field. You have to fill one of the three phone fileds.', 'Ok')\r\n .subscribe(res => {this.result = res;\r\n \r\n });\r\n }\r\n console.log('this.phoneValidationFlag');\r\n console.log(this.phoneValidationFlag);\r\n\r\n//advocate phone logic\r\nif (!this.victimForm.value.advocateNoPhoneFlag)\r\n{\r\n if (this.victimForm.value.advocateHomePhone){\r\n if (this.victimForm.value.advocateHomePhone !== null){\r\n if (this.victimForm.value.advocateHomePhone !== \"\"){\r\n this.advocatePhoneExistFlag = true;\r\n }\r\n }\r\n }\r\n\r\n\r\n\r\n if (this.victimForm.value.advocateWorkPhone !== undefined){\r\n if (this.victimForm.value.advocateWorkPhone !== null){\r\n if (this.victimForm.value.advocateWorkPhone !== \"\"){\r\n this.advocatePhoneExistFlag = true;\r\n }\r\n }\r\n }\r\n\r\n\r\n if (this.victimForm.value.advocateCellPhone){\r\n if (this.victimForm.value.advocateCellPhone !== null){\r\n if (this.victimForm.value.advocateCellhone !== \"\"){\r\n this.advocatePhoneExistFlag = true;\r\n }\r\n }\r\n }\r\n\r\n}\r\n\r\n console.log('this.victimForm.value.advocateNoPhoneFlag');\r\n console.log(this.victimForm.value.advocateNoPhoneFlag);\r\n console.log('this.advocatePhoneExistFlag');\r\n console.log(this.advocatePhoneExistFlag);\r\n\r\n if(this.advocatePhoneExistFlag === false && this.victimForm.value.advocateNoPhoneFlag === false)\r\n {\r\n \r\n this.phoneValidationFlag = true;\r\n this.commonDialogService\r\n .warning('', 'Please check the advocate phone field. You have to fill one of the three phone fileds.', 'Ok')\r\n .subscribe(res => {this.result = res;\r\n \r\n });\r\n }\r\n\r\n\r\n console.log('this.phoneValidationFlag 1');\r\n console.log(this.phoneValidationFlag);\r\n if ( this.phoneValidationFlag === false){\r\n\r\n\r\n if (this.victimDetail === null){\r\n //insert new victim\r\n \r\n var myVictimSupports = [];\r\n if (this.victimForm.value.victimSupports){\r\n this.victimForm.value.victimSupports.forEach(element => {\r\n const victimSupport= <VictimSupport>{};\r\n victimSupport.victimId= this.victimForm.value.victimId;\r\n victimSupport.victimSupportTypeId= element;\r\n victimSupport.modifiedBy= this.staffId;\r\n myVictimSupports.push(victimSupport);\r\n });\r\n }\r\n\r\n var myVictimDrugUses = [];\r\n console.log('this.victimForm.value.victimDrugUses during save');\r\n console.log(this.victimForm.value.victimDrugUses);\r\n if (this.victimForm.value.victimDrugUses){\r\n this.victimForm.value.victimDrugUses.forEach(element => {\r\n const victimDrugUse = <VictimDrugUse>{};\r\n victimDrugUse.drugTypeId = element;\r\n\r\n if (element ===\"OTHER\" || element === \"\" || element === null){\r\n victimDrugUse.drugTypeId = null;\r\n victimDrugUse.otherDrug = this.victimForm.value.otherDrug;\r\n }\r\n else{\r\n victimDrugUse.drugTypeId = element;\r\n victimDrugUse.otherDrug = null; \r\n }\r\n \r\n victimDrugUse.modifiedBy = this.staffId;\r\n victimDrugUse.victimId = this.victimForm.value.victimId;\r\n myVictimDrugUses.push(victimDrugUse);\r\n });\r\n }\r\n\r\n console.log('this.victimForm.value.victimDrugUses during save 1');\r\n console.log(this.victimForm.value.victimDrugUses);\r\n\r\n\r\n\r\n var myVictimWeaponUses = [];\r\n\r\n if (this.victimForm.value.victimWeaponUses){\r\n this.victimForm.value.victimWeaponUses.forEach(element => {\r\n const victimWeaponUse = <VictimWeaponUse>{};\r\n victimWeaponUse.victimId= this.victimForm.value.victimId;\r\n victimWeaponUse.weaponTypeId= element;\r\n\r\n if (element ==\"OTHER\"){\r\n victimWeaponUse.otherWeapon = this.victimForm.value.otherWeapon;\r\n }\r\n else{\r\n victimWeaponUse.otherWeapon = null; \r\n }\r\n\r\n victimWeaponUse.modifiedBy= this.staffId;\r\n myVictimWeaponUses.push(victimWeaponUse);\r\n });\r\n }\r\n\r\n const newVictim = {\r\n victimId: 0,\r\n offenderId: this.offenderId,\r\n victimOffenderRelationshipTypeId:this.victimForm.value.victimOffenderRelationshipTypeId,\r\n lastName: this.victimForm.value.lastName,\r\n firstName: this.victimForm.value.firstName,\r\n middleName: this.victimForm.value.middleName ? this.victimForm.value.middleName : null,\r\n prefixId:this.victimForm.value.prefixId ? this.victimForm.value.prefixId : null ,\r\n suffixId:this.victimForm.value.suffixId ? this.victimForm.value.suffixId: null,\r\n birthDate:this.victimForm.value.birthDate? this.victimForm.value.birthDate : null,\r\n genderCode: this.victimForm.value.genderCode? this.victimForm.value.genderCode: null,\r\n underSupervisionFlag: this.victimForm.value.underSupervisionFlag,\r\n minorFlag: this.victimForm.value.minorFlag,\r\n victimAdvocateFlag: this.victimForm.value.victimAdvocateFlag,\r\n homePhone: this.victimForm.value.homePhone ? this.victimForm.value.homePhone : null,\r\n workPhone: this.victimForm.value.workPhone ? this.victimForm.value.workPhone : null,\r\n cellPhone: this.victimForm.value.cellPhone ? this.victimForm.value.cellPhone: null,\r\n email: this.victimForm.value.email ? this.victimForm.value.email: null,\r\n addressId: this.victimForm.value.addressId ? this.victimForm.value.addressId: 1,\r\n emergencyContact: this.victimForm.value.emergencyContact ? this.victimForm.value.emergencyContact : null,\r\n emergencyContactPhone: this.victimForm.value.emergencyContactPhone ? this.victimForm.value.emergencyContactPhone: null ,\r\n commonChildrenFlag: this.victimForm.value.commonChildrenFlag,\r\n commonChildrenNumber: this.victimForm.value.commonChildrenNumber,\r\n cpoExpirationFlag: this.victimForm.value.cpoExpirationFlag,\r\n cpoExpirationDate: this.victimForm.value.cpoExpirationDate ? this.datePipe.transform(this.victimForm.value.startDate, 'short') : null,\r\n supportInPlaceFlag: this.victimForm.value.supportInPlaceFlag,\r\n weaponInvolvedFlag: this.victimForm.value.weaponInvolvedFlag,\r\n drugUseFlag: this.victimForm.value.drugUseFlag,\r\n alcoholUseFlag: this.victimForm.value.alcoholUseFlag,\r\n accessRisk:this.victimForm.value.accessRisk,\r\n modifiedBy:this.staffId,\r\n vVictimAdvocate: null,\r\n vVictimGuardian: null,\r\n victimDrugUses: myVictimDrugUses,\r\n victimSupports: myVictimSupports,\r\n victimWeaponUses: myVictimWeaponUses,\r\n\r\n advocateFirstName: null,\r\n advocateLastName: null,\r\n advocateEmail: null,\r\n advocatePrefixId: null,\r\n advocateSuffixId: null,\r\n advocateNoPhoneFlag: null,\r\n advocateHomePhone: null,\r\n advocateWorkPhone: null,\r\n advocateCellPhone: null,\r\n advocateAddressId: null,\r\n guardianFirstName: null,\r\n guardianLastName: null,\r\n guardianEmail: null,\r\n guardianPrefixId: null,\r\n guardianSuffixId: null,\r\n guardianNoPhoneFlag: null,\r\n guardianHomePhone: null,\r\n guardianWorkPhone: null,\r\n guardianCellPhone: null,\r\n guardianAddressId: null,\r\n guardianBirthDate: null,\r\n relationship: null,\r\n allowCsosaContactFlag: null\r\n \r\n\r\n }\r\n\r\n if (this.addressId == 0){\r\n newVictim.addressId = null;\r\n } else {\r\n newVictim.addressId = this.addressId;\r\n }\r\n \r\n newVictim.advocateAddressId = this.advocateAddressId;\r\n newVictim.guardianAddressId = this.guardianAddressId;\r\n console.log('newVictim');\r\n console.log(newVictim);\r\n this.victimService.postVictims(newVictim).subscribe(\r\n (items: any) => {\r\n \r\n const id = items ? items.victimId : '';\r\n\r\n if (this.victimForm.value.victimAdvocateFlag == \"YS\"){\r\n console.log('add advocate');\r\n const victimAdvocate: VictimAdvocate = {\r\n victimAdvocateId: id,\r\n lastName: this.victimForm.value.advocateLastName,\r\n firstName: this.victimForm.value.advocateFirstName,\r\n prefixId: this.victimForm.value.advocatePrefixId,\r\n suffixId: this.victimForm.value.advocateSuffixId,\r\n addressId: this.advocateAddressId ? this.advocateAddressId: null,\r\n noPhoneFlag: this.victimForm.value.advocateNoPhoneFlag ? this.victimForm.value.advocateNoPhoneFlag: null,\r\n homePhone: this.victimForm.value.advocateHomePhone,\r\n workPhone: this.victimForm.value.advocateWorkPhone,\r\n cellPhone: this.victimForm.value.advocateCellPhone,\r\n email: this.victimForm.value.advocateEmail,\r\n modifiedBy: this.staffId\r\n \r\n \r\n };\r\n \r\n this.victimService.postVictimAdvocate(id, victimAdvocate).subscribe();\r\n }\r\n \r\n if (this.victimForm.value.minorFlag == true){\r\n \r\n const victimGuardian: VictimGuardian = {\r\n victimGuardianId: id,\r\n lastName: this.victimForm.value.guardianLastName,\r\n firstName: this.victimForm.value.guardianFirstName,\r\n prefixId: this.victimForm.value.guardianPrefixId, \r\n suffixId: this.victimForm.value.guardianSuffixId,\r\n birthDate: this.victimForm.value.guardianBirthDate,\r\n addressId: this.guardianAddressId? this.guardianAddressId: null,\r\n noPhoneFlag: this.victimForm.value.guardianNoPhoneFlag? this.victimForm.value.guardianNoPhoneFlag: null,\r\n homePhone: this.victimForm.value.guardianHomePhone,\r\n workPhone: this.victimForm.value.guardianWorkPhone,\r\n cellPhone: this.victimForm.value.guardianCellPhone,\r\n email: this.victimForm.value.guardianEmail,\r\n modifiedBy: this.staffId\r\n \r\n \r\n };\r\n \r\n this.victimService.postVictimGuardian(id, victimGuardian).subscribe();\r\n \r\n }\r\n\r\n this.snackBar.open('Add Victim Successfully!', '', {\r\n duration: 3000,\r\n });\r\n\r\n //insert new\r\n if (this.isIntake===true){\r\n this.router.navigate(['victimHome']);\r\n }\r\n else\r\n {\r\n this.router.navigate(['victimList']);\r\n }\r\n //this.onSave.emit(this.victimDetail);\r\n \r\n }\r\n );\r\n\r\n }\r\n else {\r\n //update victim\r\n\r\n \r\n this.victimDetail.underSupervisionFlag = this.victimForm.value.underSupervisionFlag;\r\n this.victimDetail.victimOffenderRelationshipTypeId = this.victimForm.value.victimOffenderRelationshipTypeId;\r\n this.victimDetail.lastName = this.victimForm.value.lastName;\r\n this.victimDetail.firstName = this.victimForm.value.firstName;\r\n this.victimDetail.middleName = this.victimForm.value.middleName;\r\n this.victimDetail.prefixId = this.victimForm.value.prefixId ? this.victimForm.value.prefixId : null;\r\n this.victimDetail.suffixId = this.victimForm.value.suffixId ? this.victimForm.value.suffixId : null;\r\n this.victimDetail.birthDate = this.victimForm.value.birthDate;\r\n this.victimDetail.genderCode = this.victimForm.value.genderCode;\r\n this.victimDetail.minorFlag = this.victimForm.value.minorFlag;\r\n this.victimDetail.homePhone = this.victimForm.value.homePhone? this.victimForm.value.homePhone: null;\r\n this.victimDetail.workPhone = this.victimForm.value.workPhone? this.victimForm.value.workPhone: null;\r\n this.victimDetail.cellPhone = this.victimForm.value.cellPhone? this.victimForm.value.cellPhone: null;\r\n this.victimDetail.email = this.victimForm.value.email;\r\n this.victimDetail.victimAdvocateFlag = this.victimForm.value.victimAdvocateFlag;\r\n this.victimDetail.emergencyContact = this.victimForm.value.emergencyContact;\r\n this.victimDetail.emergencyContactPhone = this.victimForm.value.emergencyContactPhone? this.victimForm.value.emergencyContactPhone: null;\r\n this.victimDetail.commonChildrenFlag = this.victimForm.value.commonChildrenFlag;\r\n this.victimDetail.commonChildrenNumber = this.victimForm.value.commonChildrenNumber;\r\n this.victimDetail.cpoExpirationDate = this.victimForm.value.cpoExpirationDate;\r\n this.victimDetail.cpoExpirationFlag = this.victimForm.value.cpoExpirationFlag;\r\n this.victimDetail.supportInPlaceFlag = this.victimForm.value.supportInPlaceFlag;\r\n this.victimDetail.weaponInvolvedFlag = this.victimForm.value.weaponInvolvedFlag;\r\n this.victimDetail.drugUseFlag = this.victimForm.value.drugUseFlag;\r\n this.victimDetail.alcoholUseFlag = this.victimForm.value.alcoholUseFlag;\r\n this.victimDetail.accessRisk = this.victimForm.value.accessRisk;\r\n this.victimDetail.addressId = this.addressId;\r\n this.victimDetail.allowCsosaContactFlag = this.victimForm.value.allowCsosaContactFlag;\r\n \r\n \r\n this.victimDetail.victimSupports = [];\r\n this.victimForm.value.victimSupports.forEach(element => {\r\n const victimSupport= <VictimSupport>{};\r\n victimSupport.victimId= this.victimDetail.victimId;\r\n victimSupport.victimSupportTypeId= element;\r\n victimSupport.modifiedBy= this.staffId;\r\n this.victimDetail.victimSupports.push(victimSupport);\r\n });\r\n\r\n\r\n this.victimDetail.victimDrugUses = [];\r\n\r\n console.log('this.victimForm.value.victimDrugUses calculate')\r\n console.log(this.victimForm.value.victimDrugUses)\r\n\r\n this.victimForm.value.victimDrugUses.forEach(element => {\r\n const victimDrugUse = <VictimDrugUse>{};\r\n victimDrugUse.drugTypeId = element;\r\n console.log('this.victimForm.value.victimDrugUses before')\r\n console.log(this.victimForm.value.victimDrugUses)\r\n \r\n if (element === \"OTHER\" || element === \"\" ){\r\n victimDrugUse.drugTypeId = null;\r\n victimDrugUse.otherDrug = this.victimForm.value.otherDrug;\r\n }\r\n else{\r\n victimDrugUse.drugTypeId = element;\r\n victimDrugUse.otherDrug = null;\r\n }\r\n\r\n victimDrugUse.modifiedBy = this.staffId;\r\n victimDrugUse.victimId = this.victimDetail.victimId;\r\n this.victimDetail.victimDrugUses.push(victimDrugUse);\r\n console.log('this.victimForm.value.victimDrugUses after')\r\n console.log(this.victimForm.value.victimDrugUses)\r\n \r\n });\r\n\r\n\r\n\r\n this.victimForm.value.victimDrugUses.filter(word => ( !(word.drugTypeId === null && word.otherDrug === null) ));\r\n\r\n\r\n console.log('adjust this.victimForm.value.victimDrugUses ')\r\n console.log(this.victimForm.value.victimDrugUses)\r\n \r\n this.victimDetail.victimWeaponUses = [];\r\n this.victimForm.value.victimWeaponUses.forEach(element => {\r\n const victimWeaponUse = <VictimWeaponUse>{};\r\n victimWeaponUse.victimId= this.victimDetail.victimId;\r\n victimWeaponUse.weaponTypeId= element; \r\n\r\n console.log('weapon element');\r\n console.log(element);\r\n console.log(this.victimForm.value.otherWeapon);\r\n console.log(this.victimForm.value.victimWeaponUses);\r\n\r\n if (element ==\"OTHER\"){\r\n victimWeaponUse.otherWeapon=this.victimForm.value.otherWeapon;\r\n }\r\n else{\r\n victimWeaponUse.otherWeapon = null;\r\n }\r\n\r\n victimWeaponUse.modifiedBy= this.staffId;\r\n this.victimDetail.victimWeaponUses.push(victimWeaponUse);\r\n \r\n });\r\n\r\n \r\n console.log('this.victimDetail before emit');\r\n console.log(this.victimDetail);\r\n\r\n this.victimService.putVictims(this.victimDetail.victimId,this.victimDetail).subscribe(\r\n (items: any) => {\r\n this.snackBar.open('Update Successfully!', '', {\r\n duration: 3000,\r\n });\r\n \r\n //Advocate section\r\n\r\n this.victimAdvocate.victimAdvocateId = this.victimDetail.victimId;\r\n this.victimAdvocate.lastName= this.victimForm.value.advocateLastName;\r\n this.victimAdvocate.firstName= this.victimForm.value.advocateFirstName;\r\n this.victimAdvocate.prefixId= this.victimForm.value.advocatePrefixId ? this.victimForm.value.advocatePrefixId : null;\r\n this.victimAdvocate.suffixId= this.victimForm.value.advocateSuffixId ? this.victimForm.value.advocateSuffixId : null;\r\n this.victimAdvocate.addressId= this.advocateAddressId ? this.advocateAddressId : null;\r\n this.victimAdvocate.noPhoneFlag= this.victimForm.value.advocateNoPhoneFlag? true: false;\r\n this.victimAdvocate.homePhone= this.victimForm.value.advocateHomePhone ? this.victimForm.value.advocateHomePhone : null;\r\n this.victimAdvocate.workPhone= this.victimForm.value.advocateWorkPhone ? this.victimForm.value.advocateWorkPhone : null;\r\n this.victimAdvocate.cellPhone= this.victimForm.value.advocateCellPhone ? this.victimForm.value.advocateCellPhone : null;\r\n this.victimAdvocate.email= this.victimForm.value.advocateEmail ? this.victimForm.value.advocateEmail : null;\r\n this.victimAdvocate.modifiedBy= this.staffId;\r\n \r\n console.log('work on advocate part');\r\n if (this.victimDetail.victimAdvocateFlag=='YS')\r\n {\r\n console.log('work on advocate flag is YS ');\r\n if(this.victimDetail.advocateFirstName != null){\r\n console.log('check advocate fisrt name ');\r\n console.log(this.victimDetail.advocateFirstName);\r\n this.victimService.putVictimAdvocate(this.victimDetail.victimId,this.victimAdvocate).subscribe(\r\n resp=>{} );\r\n }\r\n else\r\n {\r\n console.log('add advocate');\r\n console.log(this.victimAdvocate);\r\n this.victimService.postVictimAdvocate(this.victimDetail.victimId, this.victimAdvocate).subscribe();\r\n }\r\n\r\n\r\n }\r\n \r\n \r\n // guardian section\r\n this.victimGuardian.victimGuardianId = this.victimDetail.victimId;\r\n this.victimGuardian.lastName = this.victimForm.value.guardianLastName;\r\n this.victimGuardian.firstName = this.victimForm.value.guardianFirstName;\r\n this.victimGuardian.prefixId = this.victimForm.value.guardianPrefixId ? this.victimForm.value.guardianPrefixId : null;\r\n this.victimGuardian.suffixId = this.victimForm.value.guardianSuffixId ? this.victimForm.value.guardianSuffixId : null;\r\n this.victimGuardian.addressId = this.guardianAddressId ? this.guardianAddressId : null;\r\n this.victimGuardian.noPhoneFlag = this.victimForm.value.guardianNoPhoneFlag? true: false;\r\n this.victimGuardian.homePhone = this.victimForm.value.guardianHomePhone ? this.victimForm.value.guardianHomePhone : null;\r\n this.victimGuardian.workPhone = this.victimForm.value.guardianWorkPhone ? this.victimForm.value.guardianWorkPhone : null;\r\n this.victimGuardian.cellPhone = this.victimForm.value.guardianCellPhone ? this.victimForm.value.guardianCellPhone : null;\r\n this.victimGuardian.email = this.victimForm.value.guardianEmail ? this.victimForm.value.guardianEmail : null;\r\n this.victimGuardian.modifiedBy = this.staffId;\r\n \r\n if (this.victimDetail.minorFlag == true)\r\n {\r\n if(this.victimDetail.guardianFirstName != null )\r\n this.victimService.putVictimGuardian(this.victimDetail.victimId,this.victimGuardian).subscribe(\r\n resp=>{\r\n }\r\n );\r\n else\r\n {\r\n console.log('add gurdian');\r\n console.log(this.victimGuardian);\r\n this.victimService.postVictimGuardian(this.victimDetail.victimId, this.victimGuardian).subscribe();\r\n }\r\n\r\n }\r\n \r\n \r\n }\r\n \r\n );\r\n \r\n }\r\n }//end of this.phoneValidationFlag = false\r\n console.log('this.victimDetail');\r\n console.log(this.victimDetail);\r\n this.onSave.emit(this.victimDetail);\r\n \r\n }\r\n\r\n //#endregion \"save victim\"\r\n addContact(){\r\n\r\n this.router.navigate(['victimContact',this.victimId]);\r\n }\r\n formatLabel(value: number) {\r\n return value;\r\n }\r\n\r\n \r\n}\r\n","import { Component, OnInit, Inject } from '@angular/core';\r\nimport {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';\r\n\r\n@Component({\r\n selector: 'csmart-victim-delete-confirm',\r\n template: `\r\n <h1 mat-dialog-title>Delete Confirmation</h1>\r\n <div mat-dialog-content>\r\n <p>Are you sure you want to delete this item?</p>\r\n </div>\r\n <div mat-dialog-actions class=\"actions\">\r\n <button mat-flat-button color=\"primary\" (click)=\"onNoClick()\">No</button>\r\n <button mat-flat-button color=\"warn\" [mat-dialog-close]='\"YES\"' cdkFocusInitial>Yes</button>\r\n </div>\r\n `,\r\n styles: [`\r\n .actions{\r\n display: flex;\r\n justify-content: space-between; \r\n }\r\n `]\r\n})\r\nexport class SmartVictimDeleteConfirmComponent implements OnInit {\r\n\r\n constructor( public dialogRef: MatDialogRef<SmartVictimDeleteConfirmComponent>,\r\n @Inject(MAT_DIALOG_DATA) public data: any) { }\r\n\r\n onNoClick(): void {\r\n this.dialogRef.close();\r\n }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\r\n//import {MAT_MOMENT_DATE_FORMATS, MomentDateAdapter} from '@angular/material-moment-adapter';\r\nimport {BrowserModule} from '@angular/platform-browser';\r\nimport {platformBrowserDynamic} from '@angular/platform-browser-dynamic';\r\nimport {CdkTableModule} from '@angular/cdk/table';\r\nimport {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE} from '@angular/material/core';\r\nimport {MatIconModule} from '@angular/material/icon';\r\n\r\n\r\nimport {\r\n MatButtonModule, MatCardModule, MatCheckboxModule, MatToolbarModule, MatSelectModule, MatDatepickerModule,\r\n MatProgressSpinnerModule, MatGridListModule, MatTableModule, MatSidenavModule, MatRadioModule, MatPaginatorModule,\r\n // tslint:disable-next-line:whitespace\r\n MatNativeDateModule, MatSliderModule, MatDialogModule, MatChipsModule,MatSortModule,\r\n MatTabsModule, MatRippleModule, MatListModule, MatInputModule, MatFormFieldModule, MatStepperModule, MatExpansionModule,\r\n \r\n \r\n} from '@angular/material';\r\nimport {MatSnackBarModule} from '@angular/material/snack-bar';\r\n\r\n\r\n\r\n\r\n@NgModule(\r\n {\r\n \r\n imports: [\r\n MatButtonModule,\r\n MatCardModule,\r\n MatCheckboxModule,\r\n MatToolbarModule,\r\n MatSelectModule,\r\n MatDatepickerModule,\r\n MatNativeDateModule,\r\n MatDialogModule,\r\n MatTabsModule,\r\n MatListModule,\r\n MatInputModule,\r\n MatStepperModule,\r\n BrowserAnimationsModule,\r\n MatGridListModule,\r\n MatProgressSpinnerModule,\r\n MatTableModule,\r\n MatSidenavModule,\r\n MatRadioModule,\r\n MatIconModule,\r\n MatSliderModule,\r\n MatChipsModule,\r\n MatSnackBarModule,\r\n CdkTableModule,\r\n MatSortModule,\r\n MatPaginatorModule,\r\n MatExpansionModule,\r\n MatRippleModule,\r\n\r\n\r\n ],\r\n exports: [\r\n \r\n MatButtonModule,\r\n MatCardModule,\r\n MatCheckboxModule,\r\n MatToolbarModule,\r\n MatSelectModule,\r\n MatDatepickerModule,\r\n MatNativeDateModule,\r\n MatDialogModule,\r\n MatTabsModule,\r\n MatListModule,\r\n MatInputModule,\r\n MatStepperModule,\r\n BrowserAnimationsModule,\r\n MatGridListModule,\r\n MatProgressSpinnerModule,\r\n MatTableModule,\r\n MatSidenavModule,\r\n MatRadioModule,\r\n MatIconModule,\r\n MatSliderModule,\r\n MatChipsModule,\r\n MatSnackBarModule,\r\n CdkTableModule,\r\n MatSortModule,\r\n MatPaginatorModule,\r\n MatExpansionModule,\r\n MatRippleModule,\r\n \r\n \r\n ],\r\n entryComponents: [\r\n // SpinnerComponent,\r\n ],\r\n\r\n\r\n }\r\n)\r\nexport class SharedModule { }\r\n","import { CommonDialogService } from './common-dialog.service';\r\n//import { MaterialModule } from '@angular/material';\r\nimport { NgModule } from '@angular/core';\r\nimport { SharedModule } from '../shared/app.shared.module';\r\n\r\nimport { CommonDialogComponent } from './common-dialog.component';\r\n\r\n@NgModule({\r\n imports: [\r\n // MaterialModule.forRoot(),\r\n SharedModule\r\n ],\r\n exports: [\r\n CommonDialogComponent,\r\n ],\r\n declarations: [\r\n CommonDialogComponent,\r\n ],\r\n providers: [\r\n CommonDialogComponent,\r\n ],\r\n entryComponents: [\r\n CommonDialogComponent,\r\n ],\r\n})\r\nexport class CommonDialogModule { }\r\n","import { AbstractControl, ValidatorFn } from '@angular/forms';\r\n\r\n\r\nexport function dateValidator(): ValidatorFn {\r\n return (control: AbstractControl): {[key: string]: any} => {\r\n const dateStr = control.value;\r\n const invalidObj = { 'date': 'future Date is Not Allowed' };\r\n const date = new Date(dateStr);\r\n if (date > new Date()) {\r\n return invalidObj;\r\n }\r\n return null;\r\n };\r\n}\r\n\r\n\r\nexport function passDateValidator(): ValidatorFn {\r\n return (control: AbstractControl): {[key: string]: any} => {\r\n const dateStr = control.value;\r\n const invalidObj = { 'date': 'Pass Date is Not Allowed' };\r\n const date = new Date(dateStr);\r\n if (date < new Date()) {\r\n return invalidObj;\r\n }\r\n return null;\r\n };\r\n}\r\n\r\n\r\n\r\nexport function dateLessThan(dateField1: string, dateField2: string, validatorField: { [key: string]: boolean }): ValidatorFn {\r\n return (c: AbstractControl): { [key: string]: any } | null => {\r\n const date1 = c.get(dateField1).value;\r\n const date2 = c.get(dateField2).value;\r\n \r\n console.log('date1');\r\n console.log(date1);\r\n console.log('date2');\r\n console.log(date2);\r\n //const invalidObj = { 'dateRule': 'date is Not Allowed' };\r\n if ((date1 !== null && date2 !== null) && date1 > date2) {\r\n console.log(validatorField);\r\n return validatorField;\r\n //return invalidObj;\r\n\r\n }\r\n console.log('return null');\r\n return null;\r\n };\r\n}\r\n\r\n\r\n\r\nexport function greaterLessThan(dateField1: string, dateField2: string, validatorField: { [key: string]: boolean }): ValidatorFn {\r\n return (c: AbstractControl): { [key: string]: any } | null => {\r\n const date1 = c.get(dateField1).value;\r\n const date2 = c.get(dateField2).value;\r\n \r\n console.log('end date');\r\n console.log(date1);\r\n console.log('ver date');\r\n console.log(date2);\r\n //const invalidObj = { 'dateRule': 'date is Not Allowed' };\r\n if ((date1 !== null && date2 !== null) && date1 < date2) {\r\n console.log(validatorField);\r\n return validatorField;\r\n //return invalidObj;\r\n\r\n }\r\n console.log('return null');\r\n return null;\r\n };\r\n}","import { Component, OnInit,Inject,OnChanges, Input, Output, EventEmitter,AfterViewInit } from '@angular/core';\r\nimport { NgcSmartVictimService } from '../smart-victim.service';\r\nimport { FormControl, FormGroup, FormBuilder,Validators} from '@angular/forms';\r\nimport { CommonDialogService} from '.././common-dialog/common-dialog.service';\r\nimport { MatDialog, MatDialogRef, MAT_DIALOG_DATA,MatSnackBar,MatTableDataSource } from '@angular/material';\r\nimport { SelectedOffender, LoginStaff } from '@csmart/ngc-smart-core';\r\nimport { Router, ActivatedRoute } from '@angular/router';\r\nimport { CaseNote} from '../smart-victim.model';\r\nimport { SmartAuthService } from '@csmart/ngc-smart-core';\r\nimport { dateValidator, passDateValidator } from '../shared/validators';\r\n\r\n\r\n\r\n@Component({\r\n \r\n templateUrl: './caseNote.component.html',\r\n styleUrls: ['./caseNote.component.css'],\r\n providers: [CommonDialogService]\r\n\r\n})\r\nexport class CaseNoteComponent implements OnInit,AfterViewInit {\r\n\r\n // @Input() isIntake: boolean;\r\n offenderId: number;\r\n loginStaff: LoginStaff;\r\n \r\n hiddenDetailFlag:boolean;\r\n caseNoteList: CaseNote[];\r\n caseNote: CaseNote;\r\n editCaseNote: CaseNote = <CaseNote>{};\r\n errorMessage: string;\r\n contactTypes: any[];\r\n contactPurposes: any[];\r\n result: any;\r\n victimName: string;\r\n staffId: number;\r\n victimId: number;\r\n private sub: any;\r\n caseNoteDataSource= new MatTableDataSource();\r\n addDisableFlag: boolean;\r\n hiddenAddNewFlag: boolean;\r\n caseNoteForm: FormGroup;\r\n\r\n constructor(\r\n private formBuilder: FormBuilder, \r\n private _victimServicesComponent: NgcSmartVictimService,\r\n private commonDialogService: CommonDialogService,\r\n public snackBar: MatSnackBar,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private smartAuthService: SmartAuthService,\r\n \r\n ) {\r\n this.initForm();\r\n }\r\n private initForm() {\r\n this.caseNoteForm = this.formBuilder.group({\r\n caseNoteDate: new FormControl('', Validators.compose([\r\n Validators.required,dateValidator()])),\r\n contactType: new FormControl('',Validators.required),\r\n contactPurpose: new FormControl('',Validators.required),\r\n comment: new FormControl('',Validators.required)\r\n });\r\n\r\n this.caseNoteForm.markAsPristine();\r\n this.caseNoteForm.markAsUntouched();\r\n\r\n }\r\n ngAfterViewInit() {\r\n this.smartAuthService.setPermission('Victim', this.route.snapshot);\r\n }\r\n \r\n ngOnInit() {\r\n var data = this.route.snapshot.data;\r\n this.loginStaff = data.loginStaff;\r\n this.staffId = this.loginStaff.staffId;\r\n\r\n\r\n this.sub = this.route.params.subscribe(params => {\r\n this.victimId = params['victimId'];\r\n \r\n });\r\n\r\n this.addDisableFlag= false;\r\n this.hiddenDetailFlag = true;\r\n this.hiddenAddNewFlag = false;\r\n\r\n\r\n this._victimServicesComponent.getVictim(this.victimId).subscribe(\r\n (items: any) => {\r\n this.victimName = items.firstName + ', ' + items.lastName;\r\n }\r\n );\r\n\r\n this._victimServicesComponent.getContactTypes().subscribe(\r\n (items: any) => {\r\n this.contactTypes = items;\r\n }\r\n );\r\n\r\n this._victimServicesComponent.getVictimContactPurposes().subscribe(\r\n (items: any) => {\r\n this.contactPurposes = items;\r\n }\r\n );\r\n\r\n \r\n this._victimServicesComponent.getCasetNotes(this.victimId).subscribe(\r\n caseNoteList => {\r\n console.log('caseNoteList');\r\n console.log(caseNoteList);\r\n this.caseNoteList = caseNoteList; \r\n this.caseNoteDataSource.data = this.caseNoteList;\r\n }\r\n );\r\n\r\n\r\n \r\n\r\n // this._victimServicesComponent.getCasetNotes(this.victimId).subscribe(\r\n // (itms: any) => {\r\n // const ELEMENT_DATA: Element[] = itms;\r\n // this.caseNoteDataSource.data = ELEMENT_DATA;\r\n // })\r\n }\r\n onEditCaseNote(victimCaseNoteId: number){\r\n \r\n this.hiddenDetailFlag =false;\r\n this.hiddenAddNewFlag = true;\r\n\r\n this.addDisableFlag = true;\r\n this.editCaseNote = this.caseNoteList.find(x => x.victimCaseNoteId === victimCaseNoteId);\r\n\r\n }\r\n \r\n onDeleteCaseNote(victimCaseNoteId: number){\r\n this.commonDialogService\r\n .confirm('', 'Do you want to delete this case note?', 'Yes', 'No')\r\n .subscribe(res => {this.result = res;\r\n if (this.result) {\r\n this._victimServicesComponent.deleteCaseNote(victimCaseNoteId, this.staffId)\r\n .subscribe(result => {\r\n this.snackBar.open('delete Successfully !', '', { duration: 3000,});\r\n\r\n this._victimServicesComponent.getCasetNotes(this.victimId).subscribe(\r\n caseNoteList => {\r\n this.caseNoteList = caseNoteList; \r\n this.caseNoteDataSource.data = this.caseNoteList;\r\n }\r\n );\r\n }\r\n );\r\n }\r\n\r\n });\r\n }\r\n onAddNew(){\r\n\r\n this.hiddenDetailFlag = false;\r\n this.editCaseNote.victimCaseNoteId = 0;\r\n\r\n const caseNoteDateControl = this.caseNoteForm.get('caseNoteDate');\r\n caseNoteDateControl.setValue(null);\r\n caseNoteDateControl.setErrors(null);\r\n caseNoteDateControl.markAsPristine();\r\n caseNoteDateControl.markAsPristine();\r\n\r\n\r\n const contactTypeControl = this.caseNoteForm.get('contactType');\r\n contactTypeControl.setValue(null);\r\n contactTypeControl.setErrors(null);\r\n contactTypeControl.markAsPristine();\r\n contactTypeControl.markAsUntouched();\r\n\r\n\r\n const contactPurposeControl = this.caseNoteForm.get('contactPurpose');\r\n contactPurposeControl.setValue(null);\r\n contactPurposeControl.setErrors(null);\r\n contactPurposeControl.markAsPristine();\r\n contactPurposeControl.markAsUntouched();\r\n\r\n\r\n const commentControl = this.caseNoteForm.get('comment');\r\n commentControl.setValue(null);\r\n commentControl.setErrors(null);\r\n commentControl.markAsPristine();\r\n commentControl.markAsUntouched();\r\n \r\n }\r\n back(){\r\n this.router.navigate(['victimHome']);\r\n \r\n }\r\n \r\n saveCaseNote(){\r\n\r\n if (this.editCaseNote.victimCaseNoteId === undefined || this.editCaseNote.victimCaseNoteId === 0) {\r\n\r\n const castNote: CaseNote = {\r\n victimId:this.victimId,\r\n victimCaseNoteId: 0,\r\n caseNoteDate: this.editCaseNote.caseNoteDate,\r\n contactTypeId: this.editCaseNote.contactTypeId,\r\n contactType: null,\r\n victimContactPurposeId: this.editCaseNote.victimContactPurposeId,\r\n victimContactPurpose: null,\r\n comment: this.editCaseNote.comment,\r\n modifiedBy: this.staffId,\r\n victimFirstName: null,\r\n victimLastName: null\r\n\r\n };\r\n this._victimServicesComponent.addCaseNote(castNote).subscribe(\r\n result => {\r\n this.snackBar.open('Saved Successfully !', '', {\r\n duration: 3000,\r\n });\r\n this.hiddenDetailFlag = true;\r\n this._victimServicesComponent.getCasetNotes(this.victimId).subscribe(\r\n caseNoteList => {\r\n this.caseNoteList = caseNoteList; \r\n this.caseNoteDataSource.data = this.caseNoteList;\r\n }\r\n );\r\n }\r\n );\r\n } else {\r\n this._victimServicesComponent.updateCaseNote(this.editCaseNote).subscribe(\r\n result => {\r\n this.snackBar.open('Update Successfully !', '', {\r\n duration: 3000,\r\n });\r\n this.hiddenDetailFlag = true;\r\n this.hiddenAddNewFlag = false;\r\n this.addDisableFlag = false;\r\n this._victimServicesComponent.getCasetNotes(this.victimId).subscribe(\r\n caseNoteList => {\r\n this.caseNoteList = caseNoteList; \r\n this.caseNoteDataSource.data = this.caseNoteList;\r\n }\r\n );\r\n }\r\n );\r\n } \r\n }\r\n\r\n}\r\n","import { Component, OnInit,Inject,OnChanges, Input, Output, EventEmitter,AfterViewInit } from '@angular/core';\r\nimport { NgcSmartVictimService } from '../smart-victim.service';\r\nimport { FormControl, FormGroup, FormBuilder,Validators } from '@angular/forms';\r\nimport { CommonDialogService} from '.././common-dialog/common-dialog.service';\r\nimport { MatDialog, MatDialogRef, MAT_DIALOG_DATA,MatSnackBar} from '@angular/material';\r\nimport { SelectedOffender, LoginStaff } from '@csmart/ngc-smart-core';\r\nimport { Router, ActivatedRoute } from '@angular/router';\r\nimport { Contact} from '../smart-victim.model';\r\nimport { SmartAuthService } from '@csmart/ngc-smart-core';\r\nimport { dateValidator,passDateValidator,dateLessThan } from '../shared/validators';\r\n\r\n@Component({\r\n templateUrl: './contact.component.html',\r\n styleUrls: ['./contact.component.css'],\r\n})\r\nexport class ContactComponent implements OnInit,AfterViewInit {\r\n\r\n offenderId: number;\r\n loginStaff: LoginStaff;\r\n contact: Contact;\r\n editContact: Contact = <Contact>{};\r\n errorMessage: string;\r\n contactMethods: any[];\r\n contactBy: any[];\r\n result: any;\r\n victimName: string;\r\n staffId: number;\r\n victimId: number;\r\n hiddenAddNewFlag: boolean;\r\n contactForm: FormGroup;\r\n private sub: any;\r\n staff: any = {};\r\n\r\n constructor(\r\n\r\n private _victimServicesComponent: NgcSmartVictimService,\r\n //private commonDialogService: CommonDialogService,\r\n public snackBar: MatSnackBar,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private smartAuthService: SmartAuthService,\r\n \r\n ) {\r\n this.contactForm = new FormGroup({\r\n //contactDate: new FormControl(),\r\n contactDate:new FormControl('', Validators.compose([\r\n dateValidator()\t ])),\r\n\r\n contactMethod: new FormControl(),\r\n contactBy: new FormControl(),\r\n comment: new FormControl(),\r\n nextContactDate: new FormControl()\r\n });\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.smartAuthService.setPermission('Victim', this.route.snapshot);\r\n }\r\n \r\n ngOnInit() {\r\n var data = this.route.snapshot.data;\r\n this.loginStaff = data.loginStaff;\r\n this.staffId = this.loginStaff.staffId;\r\n \r\n this.staff = [\r\n {\r\n staffId: this.loginStaff.staffId,\r\n fullName: this.loginStaff.firstName + ' ' + this.loginStaff.lastName,\r\n },\r\n ];\r\n\r\n\r\n this.sub = this.route.params.subscribe(params => {\r\n this.victimId = params['victimId'];\r\n console.log('my this.victimId');\r\n console.log(this.victimId);\r\n \r\n });\r\n\r\n\r\n this._victimServicesComponent.getContactMethods().subscribe(\r\n (items: any) => {\r\n this.contactMethods = items;\r\n console.log('this.contactMethods');\r\n console.log(this.contactMethods);\r\n }\r\n );\r\n\r\n // this._victimServicesComponent.getContactBys().subscribe(\r\n // (items: any) => {\r\n // this.contactBy= items;\r\n // }\r\n // );\r\n\r\n \r\n // this._victimServicesComponent.getContacts(this.victimId).subscribe(\r\n // caseNoteList => {\r\n \r\n // this.caseNoteList = caseNoteList; \r\n \r\n // }\r\n // );\r\n \r\n }\r\n onEditContact(victimContactId: number){\r\n \r\n // this.hiddenDetailFlag =false;\r\n // this.hiddenAddNewFlag = true;\r\n\r\n // this.addDisableFlag = true;\r\n // this.editCaseNote = this.caseNoteList.find(x => x.victimCaseNoteId === victimCaseNoteId);\r\n\r\n }\r\n \r\n // onDeleteCaseNote(victimCaseNoteId: number){\r\n // this.commonDialogService\r\n // .confirm('', 'Do you want to delete this case note?', 'Yes', 'No')\r\n // .subscribe(res => {this.result = res;\r\n // if (this.result) {\r\n // this._victimServicesComponent.deleteCaseNote(victimCaseNoteId, this.staffId)\r\n // .subscribe(result => {\r\n // this.snackBar.open('delete Successfully !', '', { duration: 3000,});\r\n\r\n // this._victimServicesComponent.getCasetNotes(this.victimId).subscribe(\r\n // caseNoteList => {\r\n // this.caseNoteList = caseNoteList; \r\n \r\n // }\r\n // );\r\n // }\r\n // );\r\n // }\r\n\r\n // });\r\n // }\r\n onAddNew(){\r\n \r\n // this.editCas.caseNoteDate = null;\r\n // this.editCaseNote.contactTypeId = null;\r\n // this.editCaseNote.victimContactPurposeId = null;\r\n // this.editCaseNote.comment = null;\r\n }\r\n back(){\r\n\r\n \r\n this.router.navigate(['victimDetail', this.victimId ]); \r\n }\r\n \r\n saveContact(){\r\n\r\n const contact: Contact = {\r\n victimId:this.victimId,\r\n victimContactId: 0,\r\n contactDate: this.editContact.contactDate,\r\n victimContactMethodId: this.editContact.victimContactMethodId,\r\n contactMethod: null,\r\n contactedByName: null,\r\n contactedBy: this.editContact.contactedBy,\r\n comment: this.editContact.comment,\r\n nextContactDate: this.editContact.nextContactDate,\r\n modifiedBy: this.staffId,\r\n \r\n };\r\n this._victimServicesComponent.addContact(contact).subscribe(\r\n result => {\r\n this.snackBar.open('Saved Successfully !', '', {\r\n duration: 3000,\r\n });\r\n\r\n this.router.navigate(['victimDetail', this.victimId ]); \r\n }\r\n );\r\n }\r\n\r\n}\r\n","import { Component, OnInit,Inject,AfterViewInit } from '@angular/core';\r\nimport { NgcSmartVictimService } from '../smart-victim.service';\r\nimport { FormControl, FormGroup, FormBuilder } from '@angular/forms';\r\nimport { VictimSafetyPlan,VictimServiceDetail,VictimServiceStatusHistory } from '../smart-victim.model';\r\nimport { MatDialog, MatDialogRef, MAT_DIALOG_DATA,MatTableDataSource,MatSnackBar } from '@angular/material';\r\nimport { CommonDialogService} from '.././common-dialog/common-dialog.service';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Observable } from 'rxjs';\r\n//import { VictimSafetyPlanDetailComponent } from './victimSafetyPlanDetail.component';\r\nimport { SelectedOffender, LoginStaff } from '@csmart/ngc-smart-core';\r\nimport { Router, ActivatedRoute } from '@angular/router';\r\nimport { SmartAuthService } from '@csmart/ngc-smart-core';\r\n\r\n@Component({\r\n templateUrl: './victimSafetyPlan.component.html',\r\n providers: [CommonDialogService]\r\n})\r\n\r\nexport class VictimSafetyPlanComponent implements OnInit,AfterViewInit {\r\n //selectedOffender: SelectedOffender;\r\n loginStaff: LoginStaff;\r\n offenderId: number;\r\n\r\n\r\n hiddenDetailFlag:boolean;\r\n hiddenAddNewFlag: boolean;\r\n safetyPlans: VictimSafetyPlan[];\r\n safetyPlan: VictimSafetyPlan;\r\n editSafetyPlan: VictimSafetyPlan = <VictimSafetyPlan>{};\r\n errorMessage: string;\r\n contactTypes: any[];\r\n contactPurposes: any[];\r\n victimServiceTypes: any[];\r\n victimSafetyPlans: VictimSafetyPlan[];\r\n victimServiceStatus: any[];\r\n victimServiceStatusHistories: VictimServiceStatusHistory[];\r\n queryString: string;\r\n victimServiceDetail: VictimServiceDetail[];\r\n myVictimServiceId: number;\r\n result: any;\r\n victimName: string;\r\n staffId: number;\r\n victimId: number;\r\n private sub: any;\r\n safetyPlanDataSource = new MatTableDataSource();\r\n \r\n constructor(\r\n \r\n private _victimServicesComponent: NgcSmartVictimService,\r\n private commonDialogService: CommonDialogService,\r\n private http: HttpClient,\r\n public dialog: MatDialog,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n public snackBar: MatSnackBar,\r\n private smartAuthService: SmartAuthService,\r\n \r\n ) {\r\n \r\n\r\n }\r\n ngAfterViewInit() {\r\n this.smartAuthService.setPermission('Victim', this.route.snapshot);\r\n }\r\n \r\n ngOnInit() {\r\n\r\n var data = this.route.snapshot.data;\r\n this.loginStaff = data.loginStaff;\r\n this.staffId = this.loginStaff.staffId;\r\n\r\n this.sub = this.route.params.subscribe(params => {\r\n this.victimId = params['victimId'];\r\n\r\n });\r\n\r\n this.hiddenAddNewFlag = false;\r\n this.victimName= this.victimName;\r\n \r\n this._victimServicesComponent.getSafetyPlans(this.victimId).subscribe(\r\n victimSafetyPlans => {\r\n this.victimSafetyPlans = victimSafetyPlans; \r\n this.safetyPlanDataSource.data = this.victimSafetyPlans;\r\n console.log('this.victimSafetyPlans');\r\n console.log(this.victimSafetyPlans);\r\n\r\n \r\n }\r\n );\r\n\r\n \r\n // this.myVictimServiceId =1;\r\n // this._victimServicesComponent.getVictimServiceDetail(this.myVictimServiceId).subscribe(\r\n // victimServiceDetail => {\r\n // this.victimServiceDetail = victimServiceDetail;\r\n // console.log('service detail');\r\n // console.log(this.victimServiceDetail); \r\n // }\r\n // );\r\n\r\n this._victimServicesComponent.getServiceStatusHistories(1).subscribe(\r\n victimServiceStatusHistories => {\r\n // this.victimServiceStatusHistories = victimServiceStatusHistories; \r\n }\r\n );\r\n }\r\n \r\n//---------------graphQL--------------------------------------\r\n// getVictimServiceTypeProgramProviders(): Observable<VictimServiceTypeProgramProviderModel[]> {\r\n// const queryString = `\r\n// {\r\n// findVictimServiceTypeProgramProviders {\r\n// data {\r\n// victimServiceTypeProgramProviderId\r\n// victimServiceType\r\n// victimProgramProvider\r\n// }\r\n// }\r\n// }`;\r\n\r\n \r\n// return this.http.post<any>(environment.smartApiUrl, { query: queryString })\r\n// .map(result => {\r\n// return result.data.findVictimServiceTypeProgramProviders.data;\r\n// });\r\n// }\r\n\r\n goToSafetyPlanDetail(victimServiceId: number){\r\n \r\n this.router.navigate(['saftyPlanDetail', victimServiceId, this.victimId ]); \r\n\r\n }\r\n onAddNew(){\r\n this.hiddenDetailFlag = false;\r\n\r\n }\r\n onDeleteSafetyPlan(victimServiceId: number){\r\n\r\n this.commonDialogService\r\n .confirm('', 'Do you want to delete this safety plan?', 'Yes', 'No')\r\n .subscribe(res => {this.result = res;\r\n if (this.result) {\r\n\r\n this._victimServicesComponent.deleteSafetyPlan(victimServiceId,this.staffId)\r\n .subscribe(result => {\r\n\r\n this.snackBar.open('delete safety plan Successfully !', '', { duration: 3000,});\r\n\r\n this._victimServicesComponent.getSafetyPlans(this.victimId).subscribe(\r\n victimSafetyPlans => {\r\n this.victimSafetyPlans = victimSafetyPlans; \r\n this.safetyPlanDataSource.data = this.victimSafetyPlans;\r\n }\r\n );\r\n \r\n }\r\n );\r\n \r\n\r\n\r\n }\r\n\r\n });\r\n }\r\n\r\n back(){\r\n this.router.navigate(['victimHome']);\r\n \r\n }\r\n\r\n\r\n\r\n\r\n\r\n}\r\n\r\n","import { Component, OnInit, Inject } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';\r\nimport { FormBuilder, FormGroup } from '@angular/forms';\r\nimport { ProvidersDialogData} from '../smart-victim.model';\r\nimport { NgcSmartVictimService } from '../smart-victim.service';\r\n\r\n\r\n@Component({\r\n selector: 'app-service-provider',\r\n template: `\r\n <h1 mat-dialog-title> {{data.serviceType}}</h1>\r\n <div mat-dialog-content class=\"main\" [formGroup]=\"spForm\">\r\n <mat-form-field>\r\n <mat-label>service provider</mat-label>\r\n \r\n <mat-select formControlName=\"voteeProviderId\">\r\n <mat-option\r\n *ngFor=\"let providerOption of programProviders\"\r\n [value]=\"providerOption.victimProgramProviderId\">{{ providerOption.victimProgramProvider }}\r\n </mat-option>\r\n </mat-select>\r\n \r\n </mat-form-field>\r\n \r\n </div>\r\n <div mat-dialog-actions class=\"actions\">\r\n <button mat-raised-button color=\"primary\" (click)=\"cancel()\" cdkFocusInitial>\r\n Cancel Change\r\n </button>\r\n <button mat-raised-button color=\"primary\" [mat-dialog-close]=\"spForm.value\" >\r\n Save Change\r\n </button>\r\n </div>\r\n `,\r\n styles: [\r\n `\r\n .main {\r\n width: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n }\r\n\r\n .actions{\r\n display: flex;\r\n }\r\n `,\r\n ],\r\n})\r\n\r\n\r\n\r\nexport class SeriveProviderComponent implements OnInit {\r\n spForm: FormGroup;\r\n programProviders:[];\r\n\r\n constructor(\r\n private formBuilder: FormBuilder,\r\n public dialogRef: MatDialogRef<SeriveProviderComponent>,\r\n private _victimServicesComponent: NgcSmartVictimService,\r\n @Inject(MAT_DIALOG_DATA) public data: ProvidersDialogData,\r\n ) {\r\n\r\n\r\n this.spForm = this.formBuilder.group({\r\n voteeProviderId: [''],\r\n \r\n });\r\n }\r\n\r\n cancel() {\r\n this.dialogRef.close();\r\n }\r\n\r\n ngOnInit() {\r\n console.log('data.providerCollections')\r\n console.log(this.data);\r\n console.log(this.data.serviceTypeId);\r\n\r\n this._victimServicesComponent.getvVictimServiceTypeProgramProviders().subscribe(\r\n (items: any) => {\r\n this.programProviders = items.filter( (y) => (y.victimServiceTypeId === this.data.serviceTypeId));\r\n console.log('this.programProviders');\r\n console.log(this.programProviders);\r\n }\r\n );\r\n\r\n this.spForm.get('voteeProviderId').valueChanges.subscribe(voteeProviderId => {\r\n console.log('voteeProviderId in service provider component.')\r\n console.log(voteeProviderId)\r\n \r\n \r\n })\r\n }\r\n}\r\n","import { Component, OnInit,Inject } from '@angular/core';\r\nimport { NgcSmartVictimService } from '../smart-victim.service';\r\nimport { FormControl, FormGroup, FormBuilder,Validators } from '@angular/forms';\r\nimport { VictimSafetyPlan,VictimServiceDetail,\r\n VictimServiceStatusHistory,VictimServiceTypeProgramProviderModel,\r\n ProviderListCollectionModel } from '../smart-victim.model';\r\nimport { MatSnackBar,MatTableDataSource,MatDialog } from '@angular/material';\r\nimport { CommonDialogService} from '.././common-dialog/common-dialog.service';\r\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\r\nimport { Observable } from 'rxjs';\r\nimport { Router, ActivatedRoute } from '@angular/router';\r\nimport { SelectedOffender, LoginStaff } from '@csmart/ngc-smart-core';\r\nimport { dateValidator, passDateValidator } from '../shared/validators';\r\nimport { typeSourceSpan } from '@angular/compiler';\r\nimport { SeriveProviderComponent} from '../safetyPlan/serviceProvider.component'\r\nimport { ProvidersDialogData} from '../smart-victim.model';\r\n\r\n@Component({\r\n templateUrl: './victimSafetyPlanDetail.component.html',\r\n providers: [CommonDialogService],\r\n styleUrls: ['./victimSafetyPlan.component.css']\r\n \r\n})\r\n\r\nexport class VictimSafetyPlanDetailComponent implements OnInit {\r\n\r\n\r\n hiddenAddNewFlag: boolean;\r\n safetyPlans: VictimSafetyPlan[];\r\n safetyPlan: VictimSafetyPlan;\r\n editSafetyPlan: VictimSafetyPlan = <VictimSafetyPlan>{};\r\n errorMessage: string;\r\n contactTypes: any[];\r\n contactPurposes: any[];\r\n victimServiceTypes: any[];\r\n victimSafetyPlans: VictimSafetyPlan[];\r\n victimServiceStatus: any[];\r\n providerList: VictimServiceTypeProgramProviderModel[];\r\n providerListCollection:ProviderListCollectionModel[]=[];\r\n victimServiceDetail: VictimServiceDetail[];\r\n indx:any;\r\n serviceCheck = [];\r\n victimName: string;\r\n isDisplay: boolean;\r\n staffId: number;\r\n victimId: number;\r\n victimServiceId: number;\r\n offenderId: number;\r\n loginStaff: LoginStaff;\r\n private sub: any;\r\n result: any;\r\n victimServiceStatusHistoriesDataSource= new MatTableDataSource();\r\n providerId: string;\r\n selected: string;\r\n\r\n\r\n spForm: FormGroup;\r\n\r\n constructor(\r\n public dialog: MatDialog,\r\n private _victimServicesComponent: NgcSmartVictimService,\r\n private http: HttpClient,\r\n public snackBar: MatSnackBar,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private commonDialogService: CommonDialogService,\r\n private formBuilder: FormBuilder,\r\n \r\n ) {\r\n\r\n this.initForm();\r\n }\r\n\r\n private initForm() {\r\n\r\n\t\r\n\t\t\tthis.spForm = this.formBuilder.group({\r\n serviceGoal: new FormControl('', Validators.compose([\r\n Validators.required\t\t ])),\r\n goalStatus: new FormControl('', Validators.compose([\r\n Validators.required\t\t ])),\r\n goalStatusDate: new FormControl('', Validators.compose([\r\n Validators.required,dateValidator()\t\t ])),\r\n comment: new FormControl('',Validators.required)\r\n });\r\n this.spForm.markAsPristine();\r\n this.spForm.markAsUntouched();\r\n \r\n }\r\n \r\n ngOnInit() {\r\n\r\n \r\n\r\n var data = this.route.snapshot.data;\r\n this.loginStaff = data.loginStaff;\r\n this.staffId = this.loginStaff.staffId;\r\n\r\n this.sub = this.route.params.subscribe(params => {\r\n this.victimServiceId = params['victimServiceId'];\r\n this.victimId = params['victimId'];\r\n \r\n });\r\n \r\n this.hiddenAddNewFlag = false;\r\n this.isDisplay = false;\r\n \r\n \r\n\r\n this._victimServicesComponent.getVictimServiceTypes().subscribe(\r\n (items: any) => {\r\n this.victimServiceTypes = items;\r\n }\r\n );\r\n\r\n this._victimServicesComponent.getVictimServiceStatus().subscribe(\r\n (items: any) => {\r\n this.victimServiceStatus = items;\r\n }\r\n );\r\n\r\n this._victimServicesComponent.getVictim(this.victimId).subscribe(\r\n (items: any) => {\r\n this.victimName = items.firstName + ', ' + items.lastName;\r\n }\r\n );\r\n\r\n \r\n \r\n //---------------graphQL--------------------------------------\r\n // this.getVictimServiceTypeProgramProviders().subscribe(result => {\r\n // this.providerList = result;\r\n // });\r\n // console.log('this.victimServiceId');\r\n // console.log(this.victimServiceId);\r\n \r\n if (this.victimServiceId!=0){\r\n this._victimServicesComponent.getVictimServices(this.victimServiceId).subscribe(\r\n victimSafetyPlans => {\r\n console.log('victimSafetyPlans');\r\n console.log(victimSafetyPlans);\r\n\r\n this.editSafetyPlan = victimSafetyPlans[0];\r\n this.victimId = victimSafetyPlans[0].victimId;\r\n \r\n console.log('this.editSafetyPlan');\r\n console.log(this.editSafetyPlan);\r\n // console.log('this.editSafetyPlan.goal');\r\n // console.log(this.editSafetyPlan.goal);\r\n // console.log('this.editSafetyPlan[0].goal');\r\n // console.log(this.editSafetyPlan[0].goal);\r\n\r\n }\r\n );\r\n\r\n this._victimServicesComponent.getServiceStatusHistories(this.victimServiceId).subscribe(\r\n victimServiceStatusHistories => {\r\n // this.victimServiceStatusHistories = victimServiceStatusHistories;\r\n this.victimServiceStatusHistoriesDataSource.data = victimServiceStatusHistories;\r\n }\r\n );\r\n\r\n }\r\n\r\n this.loadProvider();\r\n \r\n }\r\n //pass in id\r\nisInArray(providerListCollectionKey:string, serviceTypeName: string, event){\r\n\r\n console.log('providerListCollectionKey');\r\n console.log(providerListCollectionKey);\r\n\r\n\r\n console.log('serviceTypeName');\r\n console.log(serviceTypeName);\r\n\r\n console.log('event.source.value');\r\n console.log(event.checked);\r\n\r\n if (event.checked == true){\r\n\r\n for(let j=0;j<this.providerListCollection.length;j++){\r\n if(providerListCollectionKey==this.providerListCollection[j].groupId){\r\n this.providerListCollection[j].isDisplay=!this.providerListCollection[j].isDisplay;\r\n\r\n \r\n\r\n const dialogRef = this.dialog.open(SeriveProviderComponent, {\r\n width: '500px',\r\n data: <ProvidersDialogData>{\r\n \r\n serviceType:serviceTypeName,\r\n serviceTypeId: providerListCollectionKey,\r\n providerCollections: [...this.providerListCollection],\r\n },\r\n panelClass: 'formFieldWidth480',\r\n });\r\n\r\n\r\n\r\n dialogRef.afterClosed().subscribe((result: any) => {\r\n console.log('The dialog was closed');\r\n console.log(result);\r\n if (result) {\r\n console.log('The dialog was closed, inside result');\r\n this.savePlanProvider(providerListCollectionKey,result.voteeProviderId);\r\n \r\n }\r\n \r\n \r\n });\r\n \r\n // return;\r\n }\r\n }\r\n\r\n }//if event.checked == true\r\n //this.router.navigate(['saftyPlanDetail', this.victimServiceId, this.victimId ]); \r\n \r\n }\r\n\r\nloadProvider(){ \r\n\r\n this.providerListCollection=[];\r\n this._victimServicesComponent.getvVictimServiceTypeProgramProviders()\r\n .subscribe(\r\n (providerList:VictimServiceTypeProgramProviderModel[] )=>{ \r\n if(providerList){\r\n \r\n let providers = Object.create(null);\r\n for(let i=0;i<providerList.length;i++){\r\n \r\n if (!providers[providerList[i].victimServiceTypeId]) {\r\n providers[providerList[i].victimServiceTypeId] = [];\r\n \r\n if ( this.editSafetyPlan.vVictimServiceDetails != null ){\r\n for (let j=0; j<this.editSafetyPlan.vVictimServiceDetails.length; j++){\r\n if ( providerList[i].victimServiceTypeId == this.editSafetyPlan.vVictimServiceDetails[j].victimServiceId.toString() ){\r\n this.isDisplay = true;\r\n }\r\n }\r\n }\r\n this.providerListCollection.push({ groupId: providerList[i].victimServiceTypeId,isDisplay:this.isDisplay, collection: providers[providerList[i].victimServiceTypeId] });\r\n }\r\n\r\n providers[providerList[i].victimServiceTypeId].push(providerList[i]);\r\n \r\n }\r\n \r\n\r\n }\r\n\r\n });\r\n\r\n }\r\n//---------------graphQL--------------------------------------\r\n// getVictimServiceTypeProgramProviders(): Observable<VictimServiceTypeProgramProviderModel[]> {\r\n// const queryString = `\r\n// {\r\n// findVictimServiceTypeProgramProviders {\r\n// data {\r\n// victimServiceTypeProgramProviderId\r\n// victimServiceType\r\n// victimProgramProvider\r\n// }\r\n// }\r\n// }`;\r\n \r\n// return this.http.post<any>(environment.smartApiUrl, { query: queryString })\r\n// .map(result => {\r\n// return result.data.findVictimServiceTypeProgramProviders.data;\r\n// });\r\n// }\r\n\r\n evaluateSelection(victimServiceTypeId: string) {\r\n if (this.editSafetyPlan.vVictimServiceDetails) {\r\n return this.editSafetyPlan.vVictimServiceDetails.findIndex(r => r.victimServiceTypeId === victimServiceTypeId) >= 0;\r\n }\r\n }\r\n\r\n\r\nsavePlanProvider(victimServiceTypeId: string,victimProgramProviderId: string){\r\n\r\n console.log('savePlanProvider');\r\n console.log(victimServiceTypeId);\r\n console.log(victimProgramProviderId);\r\n\r\n if (victimProgramProviderId === \"\" || victimProgramProviderId=== null || victimProgramProviderId === undefined){\r\n \r\n this.snackBar.open('Please pick a program on the drop down list !', '', { duration: 120,});\r\n // alert('Please pick a program on the drop down list !');\r\n\r\n }else\r\n {\r\n \r\n if ( this.victimServiceId == 0){\r\n //insert\r\n console.log('insert new plan');\r\n const safetyPlan: VictimSafetyPlan = {\r\n victimId:this.victimId,\r\n fullName: null,\r\n victimServiceId: 0,\r\n goal:this.editSafetyPlan.goal,\r\n comment: this.editSafetyPlan.comment,\r\n modifiedBy:this.staffId,\r\n victimServiceStatusId: null,\r\n status: null,\r\n startDate: null,\r\n vVictimServiceDetails: null,\r\n victimName: null\r\n};\r\nthis._victimServicesComponent.addSafetyPlan(safetyPlan).subscribe(\r\n (itms:any)=>{\r\n const victimServiceStatus: VictimServiceStatusHistory= {\r\n victimServiceStatusHistoryId:0,\r\n victimServiceId: itms.victimServiceId,\r\n victimServiceStatusId: this.editSafetyPlan.victimServiceStatusId ,\r\n startDate: this.editSafetyPlan.startDate,\r\n modifiedBy:this.staffId,\r\n comment:'test add safety plan'\r\n };\r\n\r\n this._victimServicesComponent.addVictimServiceStatus(victimServiceStatus).subscribe(\r\n \r\n () =>{\r\n console.log('check itms.victimServiceId iniside add victim serive status');\r\n console.log(itms.victimServiceId);\r\n\r\n const victimServiceDetail: VictimServiceDetail = {\r\n victimServiceId: itms.victimServiceId,\r\n victimServiceDetailId: 0,\r\n victimServiceTypeId: victimServiceTypeId,\r\n victimProgramProviderId: victimProgramProviderId,\r\n modifiedBy: this.staffId,\r\n victimProgramProvider: null\r\n };\r\n \r\n console.log('add plan provider here at insert');\r\n \r\n this._victimServicesComponent.addPlanProvider(victimServiceDetail).subscribe(\r\n\r\n () =>{\r\n \r\n this.router.navigate(['saftyPlanDetail', itms.victimServiceId, this.victimId ]); \r\n\r\n }\r\n );\r\n\r\n }\r\n );\r\n \r\n \r\n \r\n }\r\n\r\n\r\n);\r\n }\r\n else//update\r\n {\r\n const victimServiceDetail: VictimServiceDetail = {\r\n victimServiceId: this.victimServiceId,\r\n victimServiceDetailId: 0,\r\n victimServiceTypeId: victimServiceTypeId,\r\n victimProgramProviderId: victimProgramProviderId,\r\n modifiedBy: this.staffId,\r\n victimProgramProvider: null\r\n };\r\n console.log('add plan provider here at update');\r\n this._victimServicesComponent.addPlanProvider(victimServiceDetail).subscribe(\r\n\r\n () =>{\r\n \r\n this.router.navigate(['saftyPlanDetail', this.victimServiceId, this.victimId ]); \r\n\r\n }\r\n );\r\n }\r\n }\r\n\r\n\r\n}\r\n\r\n\r\n deleteProvider(victimProgramProviderId: string){\r\n\r\n this.commonDialogService\r\n .confirm('', 'Do you want to delete this provider?', 'Yes', 'No')\r\n .subscribe(res => {this.result = res;\r\n if (this.result) {\r\n this._victimServicesComponent.deleteProvider(victimProgramProviderId, this.staffId)\r\n .subscribe(result => {\r\n this.snackBar.open('delete provider Successfully !', '', {\r\n duration: 3000,\r\n });\r\n\r\n location.reload();\r\n \r\n }\r\n );\r\n \r\n }\r\n\r\n });\r\n \r\n // location.reload();\r\n\r\n }\r\nsaveSafetyPlan() {\r\n\r\n if (this.editSafetyPlan.victimServiceId === undefined ) {\r\n\r\n const safetyPlan: VictimSafetyPlan = {\r\n victimId: this.victimId,\r\n fullName: null,\r\n victimServiceId: 0,\r\n goal:this.editSafetyPlan.goal,\r\n comment: this.editSafetyPlan.comment,\r\n modifiedBy:this.staffId,\r\n victimServiceStatusId: null,\r\n status: null,\r\n startDate: null,\r\n vVictimServiceDetails: null,\r\n victimName: null\r\n };\r\n this._victimServicesComponent.addSafetyPlan(safetyPlan).subscribe(\r\n (itms:any)=>{\r\n const victimServiceStatus: VictimServiceStatusHistory= {\r\n victimServiceStatusHistoryId:0,\r\n victimServiceId: itms.victimServiceId,\r\n victimServiceStatusId: this.editSafetyPlan.victimServiceStatusId ,\r\n startDate: this.editSafetyPlan.startDate,\r\n modifiedBy:this.staffId,\r\n comment:'test add safety Plan'\r\n };\r\n\r\n this._victimServicesComponent.addVictimServiceStatus(victimServiceStatus).subscribe(\r\n resp=>{\r\n this.snackBar.open('Insert status successfully!', '', {\r\n duration: 3000,\r\n });\r\n \r\n }\r\n );\r\n\r\n \r\n this.router.navigate(['saftyPlanDetail', itms.victimServiceId, this.victimId ]); \r\n }\r\n\r\n\r\n );\r\n } else {\r\n // this.editSafetyPlan.modifiedBy=this.loginStaff.staffId;\r\n this.editSafetyPlan.modifiedBy =this.staffId;\r\n this._victimServicesComponent.updateSafetyPlan(this.editSafetyPlan).subscribe(\r\n resp=>{\r\n // this.snackBar.open('update Successfully!', '', {\r\n // duration: 3000,\r\n // });\r\n\r\n\r\n\r\n const victimServiceStatus: VictimServiceStatusHistory= {\r\n victimServiceStatusHistoryId:0,\r\n victimServiceId: this.editSafetyPlan.victimServiceId.toString(),\r\n victimServiceStatusId: this.editSafetyPlan.victimServiceStatusId ,\r\n startDate: this.editSafetyPlan.startDate,\r\n modifiedBy:this.staffId,\r\n comment:'test update safety Plan'\r\n };\r\n\r\n this._victimServicesComponent.addVictimServiceStatus(victimServiceStatus).subscribe();\r\n\r\n \r\n this.router.navigate(['saftyPlanDetail', this.editSafetyPlan.victimServiceId, this.victimId ]); \r\n \r\n }\r\n );\r\n } \r\n }\r\n\r\n back(){\r\n console.log('this.victimId');\r\n console.log(this.victimId);\r\n this.router.navigate(['saftyPlan', this.victimId]); \r\n }\r\n \r\n\r\n}\r\n\r\n","import { MsalGuard } from '@azure/msal-angular';\r\nimport { SmartErrorComponent } from '@csmart/ngc-smart-core';\r\nimport { LoginStaffResolverService, SelectedOffenderResolverService} from '@csmart/ngc-smart-core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\nimport { NgModule } from '@angular/core';\r\nimport { CaseNoteComponent } from './caseNote/caseNote.component';\r\nimport { ContactComponent } from './contact/contact.component';\r\nimport { VictimSafetyPlanComponent } from './safetyPlan/victimSafetyPlan.component';\r\nimport { VictimSafetyPlanDetailComponent } from './safetyPlan/victimSafetyPlanDetail.component';\r\nimport { SmartVictimDetailComponent } from './smart-victim-detail/smart-victim-detail.component';\r\nimport { NgcSmartVictimComponent} from './smart-victim.component'\r\n\r\nconst routes: Routes = [\r\n \r\n {path: 'casenote/:victimId', component: CaseNoteComponent,pathMatch: 'full',canActivate: [MsalGuard],resolve: { loginStaff: LoginStaffResolverService } },\r\n {path: 'saftyPlan/:victimId', component: VictimSafetyPlanComponent,pathMatch: 'full',resolve: { loginStaff: LoginStaffResolverService } },\r\n {path: 'saftyPlanDetail/:victimServiceId/:victimId', component: VictimSafetyPlanDetailComponent,pathMatch: 'full',resolve: { loginStaff: LoginStaffResolverService } },\r\n {path: 'victimList', component: NgcSmartVictimComponent, resolve: { loginStaff: LoginStaffResolverService, selectedOffender: SelectedOffenderResolverService} },\r\n {path: 'victimHome', component: NgcSmartVictimComponent, resolve: { loginStaff: LoginStaffResolverService, selectedOffender: SelectedOffenderResolverService} },\r\n {path: 'victimContact/:victimId', component: ContactComponent, resolve: { loginStaff: LoginStaffResolverService, selectedOffender: SelectedOffenderResolverService} },\r\n {path: 'victimDetail/:victimId', component: SmartVictimDetailComponent, resolve: { loginStaff: LoginStaffResolverService, selectedOffender: SelectedOffenderResolverService} },\r\n {path: 'smart-error', component: SmartErrorComponent }\r\n];\r\n\r\n@NgModule({\r\n imports: [\r\n RouterModule.forChild(routes)\r\n ],\r\n exports: [\r\n RouterModule\r\n ]\r\n})\r\nexport class VictimRoutingModule {\r\n}\r\n","export class VictimListFilter {\r\n \r\n offenderId: number;\r\n lastName: string;\r\n firstName: string;\r\n pdid: string;\r\n birthDate: Date;\r\n \r\n}","import { Component, OnInit, ViewEncapsulation,\r\n Output, EventEmitter } from '@angular/core';\r\n \r\nimport { VictimListFilter } from './VictimSearchFilter';\r\n \r\n @Component({\r\n selector: 'app-victim-search-form',\r\n templateUrl: './victimSearchForm.component.html',\r\n styleUrls: ['../smart-victim.component.css'],\r\n encapsulation: ViewEncapsulation.None\r\n })\r\n export class VictimSearchFormComponent implements OnInit {\r\n \r\n @Output() onSearch:EventEmitter<Object>=new EventEmitter<Object>();\r\n change: EventEmitter<VictimListFilter> = new EventEmitter<VictimListFilter>();\r\n \r\n filter: VictimListFilter = new VictimListFilter();\r\n \r\n constructor() { }\r\n \r\n ngOnInit() {\r\n\r\n }\r\n\r\n ngAfterViewInit() {\r\n\r\n // var element = <HTMLInputElement> document.getElementById(\"victimSearchButton\");\r\n // element.disabled = true;\r\n // setTimeout(function() {\r\n // element.disabled = false;\r\n // }, 10000);\r\n\r\n }\r\n onChange() {\r\n console.log('this.filter in serach form.');\r\n console.log(this.filter);\r\n\r\n this.onSearch.emit(this.filter);\r\n \r\n }\r\n }\r\n","import {\r\n Directive,\r\n ElementRef,\r\n Input,\r\n OnInit,\r\n OnDestroy,\r\n Renderer2,\r\n } from '@angular/core';\r\n import {\r\n FormGroup,\r\n FormBuilder,\r\n AbstractControl,\r\n Validators,\r\n FormControl,\r\n } from '@angular/forms';\r\n // import { Subscription } from 'rxjs/Subscription';\r\n @Directive({\r\n selector: \"[phoneMask]\",\r\n })\r\n export class PhoneMaskDirective implements OnInit, OnDestroy {\r\n private _phoneControl: AbstractControl;\r\n private _preValue: string;\r\n @Input(\"phoneControl\")\r\n public set phoneControl(control: AbstractControl) {\r\n this._phoneControl = control;\r\n }\r\n @Input(\"preValue\")\r\n public set preValue(value: string) {\r\n this._preValue = value;\r\n this.formatPhoneNumber(value);\r\n }\r\n // private sub:ISubscription;\r\n constructor(private el: ElementRef, private renderer: Renderer2) {}\r\n ngOnInit() {}\r\n ngOnDestroy() {\r\n // this.sub.unsubscribe();\r\n }\r\n formatPhoneNumber(data) {\r\n if (!this._preValue) {\r\n this._preValue = \"\";\r\n data = \"\";\r\n }\r\n let preInputValue: string = this._preValue;\r\n var lastChar: string = preInputValue.substr(preInputValue.length - 1);\r\n var newVal = data.replace(/\\D/g, \"\");\r\n let start = this.renderer.selectRootElement(\"#tel\").selectionStart;\r\n let end = this.renderer.selectRootElement(\"#tel\").selectionEnd;\r\n if (data.length < preInputValue.length) {\r\n if (preInputValue.length < start) {\r\n if (lastChar == \")\") {\r\n newVal = newVal.substr(0, newVal.length - 1);\r\n }\r\n }\r\n if (newVal.length == 0) {\r\n newVal = \"\";\r\n } else if (newVal.length <= 3) {\r\n newVal = newVal.replace(/^(\\d{0,3})/, \"($1\");\r\n } else if (newVal.length <= 6) {\r\n newVal = newVal.replace(/^(\\d{0,3})(\\d{0,3})/, \"($1) $2\");\r\n } else {\r\n newVal = newVal.replace(/^(\\d{0,3})(\\d{0,3})(.*)/, \"($1) $2-$3\");\r\n }\r\n this._phoneControl.setValue(newVal, { emitEvent: false });\r\n this.renderer.selectRootElement(\"#tel\").setSelectionRange(start, end);\r\n } else {\r\n var removedD = data.charAt(start);\r\n if (newVal.length == 0) {\r\n newVal = \"\";\r\n } else if (newVal.length <= 3) {\r\n newVal = newVal.replace(/^(\\d{0,3})/, \"($1)\");\r\n } else if (newVal.length <= 6) {\r\n newVal = newVal.replace(/^(\\d{0,3})(\\d{0,3})/, \"($1) $2\");\r\n } else {\r\n newVal = newVal.replace(/^(\\d{0,3})(\\d{0,3})(.*)/, \"($1) $2-$3\");\r\n }\r\n if (preInputValue.length >= start) {\r\n if (removedD == \"(\") {\r\n start = start + 1;\r\n end = end + 1;\r\n }\r\n if (removedD == \")\") {\r\n start = start + 2;\r\n end = end + 2;\r\n }\r\n if (removedD == \"-\") {\r\n start = start + 1;\r\n end = end + 1;\r\n }\r\n if (removedD == \" \") {\r\n start = start + 1;\r\n end = end + 1;\r\n }\r\n if (removedD == \"\") {\r\n start = start + 1;\r\n end = end + 1;\r\n }\r\n this._phoneControl.setValue(newVal, { emitEvent: false });\r\n this.renderer.selectRootElement(\"#tel\").setSelectionRange(start, end);\r\n } else {\r\n this._phoneControl.setValue(newVal, { emitEvent: false });\r\n this.renderer\r\n .selectRootElement(\"#tel\")\r\n .setSelectionRange(start + 2, end + 2); // +2 because of wanting standard typing\r\n }\r\n }\r\n }\r\n }","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ReactiveFormsModule,FormsModule} from '@angular/forms';\r\nimport {\r\n MatButtonModule, MatCheckboxModule, MatRadioModule,\r\n MatCardModule, MatSlideToggleModule,MatSliderModule,\r\n MatListModule, MatIconModule, MatButtonToggleModule,\r\n MatToolbarModule, MatTabsModule,\r\n MatMenuModule, MatInputModule, MatProgressBarModule,\r\n MatDatepickerModule, MatNativeDateModule,\r\n MatDialogModule, MatSidenavModule, MatSelectModule,\r\n MatTableModule, MatPaginatorModule, MatSortModule, MatGridListModule, MatExpansionModule,\r\n} from '@angular/material';\r\nimport { CdkTableModule } from '@angular/cdk/table';\r\nimport { LayoutModule } from '@angular/cdk/layout';\r\nimport { SmartAddressModule } from '@csmart/ngc-smart-address';\r\nimport { NgcSmartVictimComponent } from './smart-victim.component';\r\nimport { NgcSmartVictimService } from './smart-victim.service';\r\nimport { SmartVictimDetailComponent } from './smart-victim-detail/smart-victim-detail.component';\r\nimport { SmartVictimDeleteConfirmComponent } from './smart-victim-delete-confirm.component';\r\nimport { CommonDialogModule } from './common-dialog/common-dialog.module';\r\nimport { VictimRoutingModule } from './victim-routing.module';\r\nimport { CaseNoteComponent } from './caseNote/caseNote.component';\r\nimport { ContactComponent } from './contact/contact.component';\r\nimport { VictimSafetyPlanComponent } from './safetyPlan/victimSafetyPlan.component';\r\nimport { VictimSafetyPlanDetailComponent } from './safetyPlan/victimSafetyPlanDetail.component';\r\nimport { VictimSearchFormComponent } from './victimSearch/victimSearchForm.component';\r\nimport { ApolloModule, APOLLO_OPTIONS } from 'apollo-angular';\r\nimport { HttpLinkModule, HttpLink } from 'apollo-angular-link-http';\r\nimport { InMemoryCache } from 'apollo-cache-inmemory';\r\n//import { SharedModule } from './shared/app.shared.module';\r\n import { PhoneMaskDirective } from './shared/directives/phone-mask.directive';\r\n import { SeriveProviderComponent } from './safetyPlan/serviceProvider.component';\r\nimport { NgcSmartCoreModule } from '@csmart/ngc-smart-core';\r\n\r\n\r\n\r\nconst COMPONENTS = [\r\n NgcSmartVictimComponent,\r\n SmartVictimDetailComponent,\r\n SmartVictimDeleteConfirmComponent,\r\n PhoneMaskDirective\r\n \r\n];\r\n\r\nconst ENTRY_COMPONENTS = [\r\n SmartVictimDeleteConfirmComponent,\r\n \r\n];\r\n\r\nconst BASE_MODULES = [\r\n CommonModule,\r\n ReactiveFormsModule\r\n];\r\n\r\nconst CORE_MODULES = [NgcSmartCoreModule, SmartAddressModule];\r\n\r\nconst MATERIAL_MODULES = [\r\n MatButtonModule, MatCheckboxModule,MatRadioModule,MatSliderModule,\r\n MatCardModule, MatSlideToggleModule,\r\n MatListModule, MatIconModule, MatButtonToggleModule,\r\n MatToolbarModule, MatTabsModule, MatExpansionModule,\r\n MatMenuModule, MatInputModule, MatProgressBarModule,\r\n MatDatepickerModule, MatNativeDateModule,MatPaginatorModule,\r\n MatDialogModule, MatSidenavModule, MatSelectModule,\r\n MatTableModule, MatSortModule, MatGridListModule, CdkTableModule, LayoutModule,\r\n];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENTS,\r\n CaseNoteComponent,\r\n ContactComponent,\r\n VictimSafetyPlanComponent,\r\n VictimSafetyPlanDetailComponent,\r\n VictimSearchFormComponent,\r\n SeriveProviderComponent\r\n ],\r\n imports: [\r\n ...BASE_MODULES,\r\n ...MATERIAL_MODULES,\r\n ...CORE_MODULES,\r\n CommonDialogModule,\r\n FormsModule,\r\n VictimRoutingModule,\r\n ApolloModule,\r\n //SharedModule\r\n \r\n \r\n ],\r\n exports: [...COMPONENTS, ApolloModule],\r\n entryComponents: [...ENTRY_COMPONENTS, SeriveProviderComponent],\r\n providers: [ NgcSmartVictimService ]\r\n})\r\nexport class NgcSmartVictimModule { }\r\n"]}
|