(function(e){function t(t){for(var i,a,l=t[0],s=t[1],c=t[2],d=0,u=[];d0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var t=a[e]||new Set;t.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(function(){n.definitions.forEach((function(e){if(e.name){var t=new Set;i(e,t),a[e.name.value]=t}}))})(),e.exports=n,e.exports["DeleteFacility"]=r(n,"DeleteFacility")},"082b":function(e,t,n){"use strict";n("3d49")},"0932":function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SignIn"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"email"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"password"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"signIn"},arguments:[{kind:"Argument",name:{kind:"Name",value:"email"},value:{kind:"Variable",name:{kind:"Name",value:"email"}}},{kind:"Argument",name:{kind:"Name",value:"password"},value:{kind:"Variable",name:{kind:"Name",value:"password"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"accessToken"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"refreshToken"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:141}};n.loc.source={body:"mutation SignIn($email: String!, $password: String!) {\n signIn(email: $email, password: $password) {\n accessToken\n refreshToken\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,t)})),e.definitions&&e.definitions.forEach((function(e){i(e,t)}))}var a={};function o(e,t){for(var n=0;n0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var t=a[e]||new Set;t.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(function(){n.definitions.forEach((function(e){if(e.name){var t=new Set;i(e,t),a[e.name.value]=t}}))})(),e.exports=n,e.exports["SignIn"]=r(n,"SignIn")},"0af4":function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AddDocument"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NamedType",name:{kind:"Name",value:"DocumentAddInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"addDocument"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"clientId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"documentUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:131}};n.loc.source={body:"mutation AddDocument($input: DocumentAddInput) {\n addDocument(input: $input) {\n id\n clientId\n documentUrl\n name\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,t)})),e.definitions&&e.definitions.forEach((function(e){i(e,t)}))}var a={};function o(e,t){for(var n=0;n0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var t=a[e]||new Set;t.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(function(){n.definitions.forEach((function(e){if(e.name){var t=new Set;i(e,t),a[e.name.value]=t}}))})(),e.exports=n,e.exports["AddDocument"]=r(n,"AddDocument")},"0c10":function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"IcsOffices"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"icsOffices"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:56}};n.loc.source={body:"query IcsOffices {\n icsOffices {\n id\n name\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,t)})),e.definitions&&e.definitions.forEach((function(e){i(e,t)}))}var a={};function o(e,t){for(var n=0;n0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var t=a[e]||new Set;t.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(function(){n.definitions.forEach((function(e){if(e.name){var t=new Set;i(e,t),a[e.name.value]=t}}))})(),e.exports=n,e.exports["IcsOffices"]=r(n,"IcsOffices")},"0c31":function(e,t,n){"use strict";n("9ad2")},"0e21":function(e,t,n){},"0fbf":function(e,t,n){},"10a5":function(e,t,n){},1182:function(e,t,n){"use strict";var i=n("2b0e"),a=new i["a"];t["a"]=a},"134d":function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"PlanTypes"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"planTypes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:54}};n.loc.source={body:"query PlanTypes {\n planTypes {\n id\n name\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,t)})),e.definitions&&e.definitions.forEach((function(e){i(e,t)}))}var a={};function o(e,t){for(var n=0;n0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var t=a[e]||new Set;t.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(function(){n.definitions.forEach((function(e){if(e.name){var t=new Set;i(e,t),a[e.name.value]=t}}))})(),e.exports=n,e.exports["PlanTypes"]=r(n,"PlanTypes")},"15e1":function(e,t,n){"use strict";n("a2f4")},"169a":function(e,t,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdatePlan"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NamedType",name:{kind:"Name",value:"PlanUpdateInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updatePlan"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Plan"},directives:[]}]}}]}}],loc:{start:0,end:127}};i.loc.source={body:'#import "../fragments/plan.gql"\nmutation UpdatePlan($input: PlanUpdateInput) {\n updatePlan(input: $input) {\n ...Plan\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function o(e){return e.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!a[t]&&(a[t]=!0,!0)}))}function r(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,t)})),e.definitions&&e.definitions.forEach((function(e){r(e,t)}))}i.definitions=i.definitions.concat(o(n("89a7").definitions));var l={};function s(e,t){for(var n=0;n0){var r=o;o=new Set,r.forEach((function(e){if(!a.has(e)){a.add(e);var t=l[e]||new Set;t.forEach((function(e){o.add(e)}))}}))}return a.forEach((function(t){var i=s(e,t);i&&n.definitions.push(i)})),n}(function(){i.definitions.forEach((function(e){if(e.name){var t=new Set;r(e,t),l[e.name.value]=t}}))})(),e.exports=i,e.exports["UpdatePlan"]=c(i,"UpdatePlan")},1797:function(e,t,n){},"17a3":function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AddContact"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NamedType",name:{kind:"Name",value:"ContactAddInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"addContact"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"jobTitle"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"phones"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"phone"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"location"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"countYearsTogether"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:234}};n.loc.source={body:"mutation AddContact($input: ContactAddInput) {\n addContact(input: $input) {\n id\n name\n jobTitle\n phones {\n type {\n id\n name\n }\n phone\n }\n email\n location\n countYearsTogether\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,t)})),e.definitions&&e.definitions.forEach((function(e){i(e,t)}))}var a={};function o(e,t){for(var n=0;n0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var t=a[e]||new Set;t.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(function(){n.definitions.forEach((function(e){if(e.name){var t=new Set;i(e,t),a[e.name.value]=t}}))})(),e.exports=n,e.exports["AddContact"]=r(n,"AddContact")},1863:function(e,t,n){"use strict";n("2f70")},1921:function(e,t,n){},"1a80":function(e,t,n){"use strict";n("7db0");var i=function(e,t){return!(!t||!t.permissions.find((function(t){return e===t.key})))};t["a"]=i},"1b03":function(e,t,n){},"1c07":function(e,t,n){},"1e67":function(e,t,n){},"1ea3":function(e,t,n){"use strict";n("715c")},"1fe6":function(e,t,n){},"20fc":function(e,t,n){"use strict";n("a8da")},"222f":function(e,t,n){},2310:function(e,t,n){"use strict";n("adf9")},"24b2":function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return l}));var i,a=n("ade3"),o={VIEW_CLIENTS:"view_clients",VIEW_CLIENT:"view_client_details",ADD_CLIENT:"add_client",EDIT_CLIENT:"edit_client",DELETE_CLIENT:"delete_client",ADD_CONTACT:"add_contact",EDIT_CONTACT:"edit_contact",DELETE_CONTACT:"delete_contact",ADD_FACILITY:"add_facility",EDIT_FACILITY:"edit_facility",DELETE_FACILITY:"delete_facility",VIEW_USERS:"view_users",ADD_USER:"add_user",EDIT_USER:"edit_user",DELETE_USER:"delete_user",CHANGE_USER_PERMISSIONS:"change_user_permissions",VIEW_DATABASE:"view_database",CREATE_SYSTEM:"create_system",EDIT_SYSTEM:"edit_system",DELETE_SYSTEM:"delete_system",CREATE_DATABASE_COMPONENT:"create_database_component",EDIT_DATABASE_COMPONENT:"edit_database_component",DELETE_DATABASE_COMPONENT:"delete_database_component",VIEW_PLANS:"view_plans",VIEW_PLAN:"view_plan_details",CREATE_PLAN:"create_plan",EDIT_PLAN:"edit_plan",DELETE_PLAN:"delete_plan",CLONE_PLAN:"clone_plan",ADD_PLAN_COMPONENT:"add_plan_component",EDIT_PLAN_COMPONENT:"edit_plan_component",DELETE_PLAN_COMPONENT:"delete_plan_component",GENERATE_REPORT:"generate_report",CHANGE_ROLE_PERMISSIONS:"change_role_permissions",ADD_ADMIN:"add_admin"},r=(i={},Object(a["a"])(i,o.VIEW_CLIENTS,"View Clients"),Object(a["a"])(i,o.VIEW_CLIENT,"View Client Details"),Object(a["a"])(i,o.ADD_CLIENT,"Add Client"),Object(a["a"])(i,o.EDIT_CLIENT,"Edit Client"),Object(a["a"])(i,o.DELETE_CLIENT,"Delete Client"),Object(a["a"])(i,o.ADD_CONTACT,"Add Contact"),Object(a["a"])(i,o.EDIT_CONTACT,"Edit Contact"),Object(a["a"])(i,o.DELETE_CONTACT,"Delete Contact"),Object(a["a"])(i,o.ADD_FACILITY,"Add Facility"),Object(a["a"])(i,o.EDIT_FACILITY,"Edit Facility"),Object(a["a"])(i,o.DELETE_FACILITY,"Delete Facility"),Object(a["a"])(i,o.VIEW_USERS,"View Users"),Object(a["a"])(i,o.ADD_USER,"Add New User"),Object(a["a"])(i,o.EDIT_USER,"Edit User"),Object(a["a"])(i,o.DELETE_USER,"Delete User"),Object(a["a"])(i,o.CHANGE_USER_PERMISSIONS,"Change Permissions"),Object(a["a"])(i,o.VIEW_DATABASE,"View Database"),Object(a["a"])(i,o.CREATE_SYSTEM,"Create System"),Object(a["a"])(i,o.EDIT_SYSTEM,"Edit System"),Object(a["a"])(i,o.DELETE_SYSTEM,"Delete System"),Object(a["a"])(i,o.CREATE_DATABASE_COMPONENT,"Create Component"),Object(a["a"])(i,o.EDIT_DATABASE_COMPONENT,"Edit Component"),Object(a["a"])(i,o.DELETE_DATABASE_COMPONENT,"Delete Component"),Object(a["a"])(i,o.VIEW_PLANS,"View Plans"),Object(a["a"])(i,o.VIEW_PLAN,"View Plan"),Object(a["a"])(i,o.CREATE_PLAN,"Create Plan"),Object(a["a"])(i,o.EDIT_PLAN,"Edit Plan"),Object(a["a"])(i,o.DELETE_PLAN,"Delete Plan"),Object(a["a"])(i,o.CLONE_PLAN,"Clone Plan"),Object(a["a"])(i,o.GENERATE_REPORT,"Generate Report"),Object(a["a"])(i,o.ADD_PLAN_COMPONENT,"Add Component"),Object(a["a"])(i,o.EDIT_PLAN_COMPONENT,"Edit Component"),Object(a["a"])(i,o.DELETE_PLAN_COMPONENT,"Delete Component"),Object(a["a"])(i,o.CHANGE_ROLE_PERMISSIONS,"Change Permission for Roles"),Object(a["a"])(i,o.ADD_ADMIN,"Add Admin"),i),l={client:"Client",plan:"Plan",manage_users:"Manage Users",manage_database:"Manage Database",roles:"Settings"};t["c"]=o},"28e7":function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Clients"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"clients"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"icsOffice"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"clientType"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"creator"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:170}};n.loc.source={body:"query Clients {\n clients {\n id\n name\n icsOffice {\n id\n name\n }\n clientType {\n id\n name\n }\n creator {\n username\n }\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,t)})),e.definitions&&e.definitions.forEach((function(e){i(e,t)}))}var a={};function o(e,t){for(var n=0;n0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var t=a[e]||new Set;t.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(function(){n.definitions.forEach((function(e){if(e.name){var t=new Set;i(e,t),a[e.name.value]=t}}))})(),e.exports=n,e.exports["Clients"]=r(n,"Clients")},"2a98":function(e,t,n){"use strict";n("866b")},"2bd3":function(e,t,n){"use strict";n("cd26")},"2d6a":function(e,t,n){"use strict";n("544f")},"2f26":function(e,t,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Client"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"client"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"district"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"address"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"city"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"zip"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"county"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logoUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"icsOffice"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"clientType"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"creator"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"contacts"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"jobTitle"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"phones"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"phone"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"location"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"countYearsTogether"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"facilities"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Facility"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"plans"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isCurrent"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dateOfCreation"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"editedBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"financialInfo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"typeOfPlan"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"documents"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"documentUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:950}};i.loc.source={body:'#import "../fragments/facility.gql"\n\nquery Client($id: ID!) {\n client(id: $id) {\n id\n name\n district\n address\n city\n state\n zip\n county\n description\n logoUrl\n createdAt\n updatedAt\n icsOffice {\n id\n name\n }\n clientType {\n id\n name\n }\n creator {\n username\n }\n contacts {\n id\n name\n jobTitle\n phones {\n id\n type {\n id\n name\n }\n phone\n }\n email\n location\n countYearsTogether\n }\n facilities {\n ...Facility\n }\n plans {\n id\n name\n isCurrent\n dateOfCreation\n createdBy {\n username\n }\n editedBy {\n username\n }\n financialInfo {\n typeOfPlan {\n id\n name\n }\n }\n updatedAt\n }\n documents {\n id\n documentUrl\n name\n createdAt\n updatedAt\n }\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function o(e){return e.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!a[t]&&(a[t]=!0,!0)}))}function r(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,t)})),e.definitions&&e.definitions.forEach((function(e){r(e,t)}))}i.definitions=i.definitions.concat(o(n("c982").definitions));var l={};function s(e,t){for(var n=0;n0){var r=o;o=new Set,r.forEach((function(e){if(!a.has(e)){a.add(e);var t=l[e]||new Set;t.forEach((function(e){o.add(e)}))}}))}return a.forEach((function(t){var i=s(e,t);i&&n.definitions.push(i)})),n}(function(){i.definitions.forEach((function(e){if(e.name){var t=new Set;r(e,t),l[e.name.value]=t}}))})(),e.exports=i,e.exports["Client"]=c(i,"Client")},"2f70":function(e,t,n){},3010:function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateDocument"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NamedType",name:{kind:"Name",value:"DocumentUpdateInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateDocument"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"clientId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"documentUrl"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:140}};n.loc.source={body:"mutation UpdateDocument($input: DocumentUpdateInput) {\n updateDocument(input: $input) {\n id\n clientId\n name\n documentUrl\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,t)})),e.definitions&&e.definitions.forEach((function(e){i(e,t)}))}var a={};function o(e,t){for(var n=0;n0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var t=a[e]||new Set;t.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(function(){n.definitions.forEach((function(e){if(e.name){var t=new Set;i(e,t),a[e.name.value]=t}}))})(),e.exports=n,e.exports["UpdateDocument"]=r(n,"UpdateDocument")},"30f0":function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeletePlan"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deletePlan"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[]}]}}],loc:{start:0,end:56}};n.loc.source={body:"mutation DeletePlan($id: ID!) {\n deletePlan(id: $id)\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,t)})),e.definitions&&e.definitions.forEach((function(e){i(e,t)}))}var a={};function o(e,t){for(var n=0;n0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var t=a[e]||new Set;t.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(function(){n.definitions.forEach((function(e){if(e.name){var t=new Set;i(e,t),a[e.name.value]=t}}))})(),e.exports=n,e.exports["DeletePlan"]=r(n,"DeletePlan")},3552:function(e,t,n){"use strict";n.d(t,"d",(function(){return o})),n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return l})),n.d(t,"a",(function(){return s}));var i="headers",a="filters_v1",o=function(e,t){c(e,t,i)},r=function(e){return d(e,i)},l=function(e,t){c(e,t,a,sessionStorage)},s=function(e){return d(e,a,sessionStorage)},c=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:localStorage;try{var a=i.getItem(n);a=a?JSON.parse(a):{},a[e]=t,i.setItem(n,JSON.stringify(a))}catch(o){console.warn("set ".concat(n," to Storage error"),o)}},d=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:localStorage,i={};try{i=JSON.parse(n.getItem(t))}catch(a){console.warn("get ".concat(t," from Storage error"),a)}return i&&i[e]}},"358f":function(e,t,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreatePlan"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NamedType",name:{kind:"Name",value:"PlanAddInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createPlan"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Plan"},directives:[]}]}}]}}],loc:{start:0,end:124}};i.loc.source={body:'#import "../fragments/plan.gql"\nmutation CreatePlan($input: PlanAddInput) {\n createPlan(input: $input) {\n ...Plan\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function o(e){return e.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!a[t]&&(a[t]=!0,!0)}))}function r(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,t)})),e.definitions&&e.definitions.forEach((function(e){r(e,t)}))}i.definitions=i.definitions.concat(o(n("89a7").definitions));var l={};function s(e,t){for(var n=0;n0){var r=o;o=new Set,r.forEach((function(e){if(!a.has(e)){a.add(e);var t=l[e]||new Set;t.forEach((function(e){o.add(e)}))}}))}return a.forEach((function(t){var i=s(e,t);i&&n.definitions.push(i)})),n}(function(){i.definitions.forEach((function(e){if(e.name){var t=new Set;r(e,t),l[e.name.value]=t}}))})(),e.exports=i,e.exports["CreatePlan"]=c(i,"CreatePlan")},"36f4":function(e,t,n){"use strict";n("bf8d")},"3d11":function(e,t,n){"use strict";n("7a10")},"3d49":function(e,t,n){},"3e74":function(e,t,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateFinancialInfo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NamedType",name:{kind:"Name",value:"FinancialInfoUpdateInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateFinancialInfo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"FinancialInfo"},directives:[]}]}}]}}],loc:{start:0,end:172}};i.loc.source={body:'#import "../fragments/financialInfo.gql"\nmutation UpdateFinancialInfo($input: FinancialInfoUpdateInput) {\n updateFinancialInfo(input: $input) {\n ...FinancialInfo\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function o(e){return e.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!a[t]&&(a[t]=!0,!0)}))}function r(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,t)})),e.definitions&&e.definitions.forEach((function(e){r(e,t)}))}i.definitions=i.definitions.concat(o(n("7672").definitions));var l={};function s(e,t){for(var n=0;n0){var r=o;o=new Set,r.forEach((function(e){if(!a.has(e)){a.add(e);var t=l[e]||new Set;t.forEach((function(e){o.add(e)}))}}))}return a.forEach((function(t){var i=s(e,t);i&&n.definitions.push(i)})),n}(function(){i.definitions.forEach((function(e){if(e.name){var t=new Set;r(e,t),l[e.name.value]=t}}))})(),e.exports=i,e.exports["UpdateFinancialInfo"]=c(i,"UpdateFinancialInfo")},"3e9c":function(e,t,n){},"40a5":function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-menu",{ref:"menu",attrs:{transition:"scale-transition","nudge-bottom":e.nudgeBottom,"min-width":e.minWidth},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on,a=t.attrs;return[n("div",e._g(e._b({staticClass:"picker-text-field"},"div",a,!1),i),[n("v-text-field",{attrs:{placeholder:e.placeholder,"append-icon":"far fa-calendar",outlined:e.outlined,readonly:"",dense:e.dense,"hide-details":e.hideDetails,label:e.label,clearable:e.clearable,rules:e.$attrs.rules,required:e.$attrs.required},model:{value:e.formattedDate,callback:function(t){e.formattedDate=t},expression:"formattedDate"}})],1)]}}]),model:{value:e.menu,callback:function(t){e.menu=t},expression:"menu"}},[n("v-date-picker",{ref:"datepicker",staticClass:"date-picker",attrs:{value:e.value,type:e.$props.type,"no-title":"",reactive:"",scrollable:""},on:{input:e.inputHandler,change:e.changeHandler}})],1)},a=[],o=n("2b0e"),r=n("2e4b"),l=n("54fc"),s=o["a"].extend({mixins:[r["a"]]}),c=s.extend({name:"DatePicker",components:{VDatePicker:r["a"]},props:{value:{type:String},placeholder:{type:String},label:{type:String},closeOnContentClick:{default:!0},noTitle:{default:!0},minWidth:{default:"290"},nudgeBottom:{default:"40"},dense:{type:Boolean,default:!1},hideDetails:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1}},data:function(){return{menu:!1}},computed:{formattedDate:{get:function(){return Object(l["c"])(this.value)},set:function(e){this.$emit("input",e),this.$emit("change",e)}}},methods:{inputHandler:function(e){this.$emit("input",e)},changeHandler:function(e){this.$emit("change",e)}}}),d=c,u=(n("e36a"),n("2877")),m=n("6544"),f=n.n(m),p=n("e449"),v=n("8654"),h=Object(u["a"])(d,i,a,!1,null,null,null);t["a"]=h.exports;f()(h,{VDatePicker:r["a"],VMenu:p["a"],VTextField:v["a"]})},"40be":function(e,t,n){"use strict";n("aefe")},4169:function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-dialog",e._b({attrs:{scrollable:""},scopedSlots:e._u([e._l(e.$scopedSlots,(function(t,i){return{key:i,fn:function(t){return["default"===i?[n("v-card",{key:i},[n("v-card-actions",{staticClass:"modal-header"},[e.modalOpen?e._t("modal-header",null,{close:e.close}):e._e(),e.noClose?e._e():n("btn",{staticClass:"modal-close-btn",attrs:{"color-type":"secondary",icon:""},on:{click:function(t){return e.close(t)}}},[n("v-icon",{attrs:{small:""}},[e._v("fa-times")])],1)],2),n("v-card-text",{staticClass:"modal-content"},[e.title?n("h3",{staticClass:"modal-title mb-8"},[e._v(e._s(e.title))]):e._e(),e.modalOpen?e._t("default",null,{close:e.close}):e._e()],2)],1)]:e._t(i,null,null,t)]}}}))],null,!0),model:{value:e.modalOpen,callback:function(t){e.modalOpen=t},expression:"modalOpen"}},"v-dialog",Object.assign({},e.$props,e.$attrs),!1))},a=[],o=n("2b0e"),r=n("169a9"),l=n("96f1"),s=o["a"].extend({mixins:[r["a"]]}),c=s.extend({name:"Modal",components:{VDialog:r["a"],Btn:l["a"]},props:{title:{type:String},overlayColor:{type:String,default:"black"},overlayOpacity:{type:String,default:".8"},noClose:!1,closeFunction:Function},data:function(){return{modalOpen:!1}},watch:{modalOpen:function(e){document.activeElement.blur(),e||this.$emit("close")}},methods:{close:function(e){"function"===typeof this.closeFunction?this.closeFunction(e):this.modalOpen=!1}}}),d=c,u=(n("20fc"),n("2877")),m=n("6544"),f=n.n(m),p=n("b0af"),v=n("99d9"),h=n("132d"),y=Object(u["a"])(d,i,a,!1,null,null,null);t["a"]=y.exports;f()(y,{VCard:p["a"],VCardActions:v["a"],VCardText:v["b"],VDialog:r["a"],VIcon:h["a"]})},4230:function(e,t,n){"use strict";n("1e67")},"43e2":function(e,t,n){},4447:function(e,t,n){"use strict";n("fdca")},"45ae":function(e,t,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CompletedComponentOfNeed"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NamedType",name:{kind:"Name",value:"CompletedComponentOfNeedInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"completedComponentOfNeed"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Component"},directives:[]}]}}]}}],loc:{start:0,end:179}};i.loc.source={body:'#import "../fragments/component.gql"\nmutation CompletedComponentOfNeed($input: CompletedComponentOfNeedInput) {\n completedComponentOfNeed(input: $input) {\n ...Component\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function o(e){return e.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!a[t]&&(a[t]=!0,!0)}))}function r(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,t)})),e.definitions&&e.definitions.forEach((function(e){r(e,t)}))}i.definitions=i.definitions.concat(o(n("77e6").definitions));var l={};function s(e,t){for(var n=0;n0){var r=o;o=new Set,r.forEach((function(e){if(!a.has(e)){a.add(e);var t=l[e]||new Set;t.forEach((function(e){o.add(e)}))}}))}return a.forEach((function(t){var i=s(e,t);i&&n.definitions.push(i)})),n}(function(){i.definitions.forEach((function(e){if(e.name){var t=new Set;r(e,t),l[e.name.value]=t}}))})(),e.exports=i,e.exports["CompletedComponentOfNeed"]=c(i,"CompletedComponentOfNeed")},4910:function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AddFundingSource"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NamedType",name:{kind:"Name",value:"FundingSourceInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"addFundingSource"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:115}};n.loc.source={body:"mutation AddFundingSource($input: FundingSourceInput) {\n addFundingSource(input: $input) {\n id,\n name\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,t)})),e.definitions&&e.definitions.forEach((function(e){i(e,t)}))}var a={};function o(e,t){for(var n=0;n0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var t=a[e]||new Set;t.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(function(){n.definitions.forEach((function(e){if(e.name){var t=new Set;i(e,t),a[e.name.value]=t}}))})(),e.exports=n,e.exports["AddFundingSource"]=r(n,"AddFundingSource")},"4c3e":function(e,t,n){},"4c95":function(e,t,n){"use strict";n("e845")},"4ced":function(e,t,n){},"4eed":function(e,t,n){},"502f":function(e,t,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateFacility"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NamedType",name:{kind:"Name",value:"FacilityUpdateInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateFacility"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Facility"},directives:[]}]}}]}}],loc:{start:0,end:147}};i.loc.source={body:'#import "../fragments/facility.gql"\nmutation UpdateFacility($input: FacilityUpdateInput) {\n updateFacility(input: $input) {\n ...Facility\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function o(e){return e.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!a[t]&&(a[t]=!0,!0)}))}function r(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,t)})),e.definitions&&e.definitions.forEach((function(e){r(e,t)}))}i.definitions=i.definitions.concat(o(n("c982").definitions));var l={};function s(e,t){for(var n=0;n0){var r=o;o=new Set,r.forEach((function(e){if(!a.has(e)){a.add(e);var t=l[e]||new Set;t.forEach((function(e){o.add(e)}))}}))}return a.forEach((function(t){var i=s(e,t);i&&n.definitions.push(i)})),n}(function(){i.definitions.forEach((function(e){if(e.name){var t=new Set;r(e,t),l[e.name.value]=t}}))})(),e.exports=i,e.exports["UpdateFacility"]=c(i,"UpdateFacility")},"510e":function(e,t,n){"use strict";n("4eed")},"51e6":function(e,t,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AddClient"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NamedType",name:{kind:"Name",value:"ClientAddInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"addClient"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"district"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"address"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"city"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"zip"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"county"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logoUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"creator"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"icsOffice"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"clientType"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"contacts"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"jobTitle"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"phones"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"phone"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"location"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"countYearsTogether"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"clientId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"facilities"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Facility"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"documents"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"documentUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:732}};i.loc.source={body:'#import "../fragments/facility.gql"\nmutation AddClient($input: ClientAddInput) {\n addClient(input: $input) {\n id\n name\n district\n address\n city\n state\n zip\n county\n description\n logoUrl\n creator {\n username\n }\n icsOffice {\n id\n name\n }\n clientType {\n id\n name\n }\n contacts {\n id\n name\n jobTitle\n phones {\n id\n type {\n id\n name\n }\n phone\n }\n email\n location\n countYearsTogether\n clientId\n createdAt\n updatedAt\n }\n facilities {\n ...Facility\n }\n documents {\n id\n documentUrl\n name\n createdAt\n updatedAt\n }\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function o(e){return e.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!a[t]&&(a[t]=!0,!0)}))}function r(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,t)})),e.definitions&&e.definitions.forEach((function(e){r(e,t)}))}i.definitions=i.definitions.concat(o(n("c982").definitions));var l={};function s(e,t){for(var n=0;n0){var r=o;o=new Set,r.forEach((function(e){if(!a.has(e)){a.add(e);var t=l[e]||new Set;t.forEach((function(e){o.add(e)}))}}))}return a.forEach((function(t){var i=s(e,t);i&&n.definitions.push(i)})),n}(function(){i.definitions.forEach((function(e){if(e.name){var t=new Set;r(e,t),l[e.name.value]=t}}))})(),e.exports=i,e.exports["AddClient"]=c(i,"AddClient")},5388:function(e,t,n){"use strict";n("a407")},"544f":function(e,t,n){},"54fc":function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return o}));var i=function(e){var t=e&&new Date(e);return t?t.toLocaleDateString("en-US"):""},a=function(e){var t=e&&new Date(e),n={timeZone:"UTC"},i=new Intl.DateTimeFormat("en-US",n);return t?i.format(t):""},o=function(e){var t=e&&new Date(e);return t?t.toISOString():""}},"56d7":function(e,t,n){"use strict";n.r(t);n("e260"),n("e6cf"),n("cca6"),n("a79d");var i=n("2b0e"),a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-app",[n("app-layout",[n("app-notification"),n("router-view")],1)],1)},o=[],r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.$route.meta&&(void 0===e.$route.meta.requiresAuth||e.$route.meta.requiresAuth)?[n("v-app-bar",{staticClass:"app-bar",attrs:{app:"",flat:""}},[n("app-header")],1),n("app-navigation-drawer"),n("v-main",[n("section",{staticClass:"main-content"},[e._t("default")],2)])]:[e._t("default")]],2)},l=[],s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-navigation-drawer",{staticClass:"app-navigation-drawer",class:{mini:e.mini},attrs:{"mini-variant":e.mini,permanent:"",app:"",color:"menu",dark:e.$vuetify.theme.dark},model:{value:e.drawer,callback:function(t){e.drawer=t},expression:"drawer"}},[i("div",{staticClass:"d-flex logo"},[i("v-btn",{staticClass:"menu-logo",attrs:{to:"/",icon:"",width:e.mini?56:100,height:e.mini?56:100}},[i("v-img",{staticClass:"shrink",attrs:{alt:"ICS logo",contain:"",src:n("af7a"),transition:"scale-transition",width:e.mini?40:80}})],1)],1),i("div",{staticClass:"app-navigation-list"},[i("primary-nav")],1),i("div",{staticClass:"toggle-btn-wrapper"},[i("v-btn",{staticClass:"toggle-btn",attrs:{icon:""},on:{click:function(t){t.stopPropagation(),e.mini=!e.mini}}},[i("v-icon",[e._v(e._s(e.mini?"fa-chevron-right":"fa-chevron-left"))])],1)],1)])},c=[],d=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-list",{staticClass:"primary-nav"},e._l(e.displayedItems,(function(t){return n("v-list-item",{key:t.title,attrs:{link:"",to:t.to}},[n("v-list-item-icon",[n("v-icon",[e._v(e._s(t.icon))])],1),n("v-list-item-content",[n("v-list-item-title",[e._v(e._s(t.title))])],1)],1)})),1)},u=[],m=n("5530"),f=(n("4de4"),n("7db0"),n("b0c0"),n("13d5"),n("24b2")),p=[{title:"Clients",icon:"far fa-address-card",to:{name:"clients"},permission:f["c"].VIEW_CLIENTS},{title:"Client Information",icon:"far fa-address-card",to:{name:"client-details"},params:["clientId"],permission:f["c"].VIEW_CLIENT,roles:["user","viewer"]},{title:"Plans",icon:"fa-list-ul",to:{name:"plans"},permission:f["c"].VIEW_PLANS},{title:"Manage Users",icon:"fa-user-cog",to:{name:"manage-users"},permission:f["c"].VIEW_USERS},{title:"Manage Database",icon:"fa-database",to:{name:"manage-database"},permission:f["c"].VIEW_DATABASE},{title:"Settings",icon:"fa-cog",to:{name:"settings"},permission:f["c"].CHANGE_ROLE_PERMISSIONS}],v=p,h=n("e78c"),y=n.n(h),b=n("1a80"),g={name:"PrimaryNav",apollo:{currentUser:{query:y.a,fetchPolicy:"cache-first"}},data:function(){return{items:v,displayedItems:[],currentUser:null}},watch:{currentUser:function(e){e&&(this.displayedItems=this.items.filter((function(t){var n=!t.permission||Object(b["a"])(t.permission,e),i=!t.roles||t.roles.find((function(t){return e.role.name===t}));if(t.params){var a=t.params.reduce((function(t,n){var i=e[n];return"clientId"===n&&(i=e.client?e.client.id:""),t[n]=i,t}),{});t.to=Object(m["a"])(Object(m["a"])({},t.to),{},{params:a})}return n&&i})))}}},k=g,S=(n("8ab8"),n("2877")),C=n("6544"),N=n.n(C),_=n("132d"),w=n("8860"),x=n("da13"),E=n("5d23"),F=n("34c3"),O=Object(S["a"])(k,d,u,!1,null,null,null),I=O.exports;N()(O,{VIcon:_["a"],VList:w["a"],VListItem:x["a"],VListItemContent:E["a"],VListItemIcon:F["a"],VListItemTitle:E["b"]});var T={name:"AppNavigationDrawer",components:{PrimaryNav:I},data:function(){return{drawer:!0,mini:!0}}},D=T,A=(n("510e"),n("8336")),P=n("adda"),$=n("f774"),V=Object(S["a"])(D,s,c,!1,null,null,null),j=V.exports;N()(V,{VBtn:A["a"],VIcon:_["a"],VImg:P["a"],VNavigationDrawer:$["a"]});var L=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-toolbar-items",{staticClass:"app-bar-items"},[n("ApolloQuery",{staticClass:"profile",attrs:{query:e.CURRENT_USER_QUERY,"fetch-policy":"cache-only"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.result,a=i.loading,o=(i.error,i.data);return[n("div",{staticClass:"d-flex align-center mr-1"},[n("v-switch",{attrs:{label:"Dark Mode","hide-details":""},on:{change:e.setToStorage},model:{value:e.$vuetify.theme.dark,callback:function(t){e.$set(e.$vuetify.theme,"dark",t)},expression:"$vuetify.theme.dark"}})],1),n("user-profile",e._b({staticClass:"profile"},"user-profile",Object.assign({},a,{username:o&&o.currentUser&&o.currentUser.username||""}),!1))]}}])})],1)},R=[],U=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-menu",{attrs:{bottom:"","min-width":"150px",rounded:"","offset-y":""},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[n("v-btn",e._g({staticClass:"profile-btn",attrs:{text:""}},i),[n("v-avatar",{attrs:{size:"44",color:"primary"}},[n("span",{staticClass:"white--text headline"},[e._v(e._s(e.userInitials))])]),n("v-icon",{staticClass:"ml-2"},[e._v("fa-sort-down")])],1)]}}])},[n("v-card",{staticClass:"user-actions-container"},[n("v-list",{staticClass:"user-actions",attrs:{dense:"",nav:""}},[n("v-subheader",{staticClass:"username"},[e._v(e._s(e.username))]),n("v-divider",{staticClass:"divider"}),n("v-list-item",{staticClass:"user-action",on:{click:e.logout}},[n("v-list-item-content",[n("v-list-item-title",[e._v(" Logout ")])],1)],1)],1)],1)],1)},q=[],B=(n("a15b"),n("d81d"),n("1276"),n("ac1f"),n("53ca")),M=n("1da1"),Y=n("b85c"),G=(n("96cf"),n("522d")),z=n("1ee4"),H=n("0225"),Q=n("efe7"),W=n("b805"),J=n.n(W),X=n("8c4f"),Z=(n("d3b7"),n("3ca3"),n("ddb0"),function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("unauth-app-layout",[n("login")],1)}),K=[],ee=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ApolloMutation",{attrs:{mutation:e.SIGNIN_MUTATION,variables:{email:e.email,password:e.password}},on:{done:e.onDone},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.mutate,a=t.loading,o=t.error;return[a?e._e():n("alert",{attrs:{align:"center",error:o}}),n("v-form",{ref:"form",attrs:{"lazy-validation":"",autocomplete:"off","aria-busy":a,disabled:a},on:{submit:function(t){t.preventDefault(),e.validate()&&i()}}},[n("v-text-field",{attrs:{rules:e.emailRules,label:"Email",required:"",name:"username",autocomplete:"username","validate-on-blur":""},model:{value:e.email,callback:function(t){e.email=t},expression:"email"}}),n("v-text-field",{staticClass:"mt-5",attrs:{name:"password",rules:e.passwordRules,type:"password",label:"Password","validate-on-blur":"",autocomplete:"current-password",required:""},model:{value:e.password,callback:function(t){e.password=t},expression:"password"}}),n("v-row",{attrs:{"no-gutters":"",justify:"end"}},[n("router-link",{attrs:{to:{name:"forgot-password"}}},[n("span",{staticStyle:{"font-size":"14px"}},[e._v("Forgot password")])])],1),n("div",{staticClass:"mt-16"},[n("v-btn",{staticClass:"login-btn",attrs:{type:"submit",color:e.btnColor,height:"62px",rounded:"","x-large":"","full-width":"",disabled:a}},[e._v("Login")])],1)],1)]}}])})},te=[],ne=(n("159b"),n("0932")),ie=n.n(ne),ae=n("a483"),oe={name:"Login",components:{VBtn:A["a"]},data:function(){return{SIGNIN_MUTATION:ie.a,password:"",passwordRules:[function(e){return!!e||"Password is Required"}],email:null,emailRules:[function(e){return!!e||"Email is Required"},ae["a"].email],timer:null,counter:0}},mounted:function(){var e=this;this.timer=setInterval((function(){e.counter++,e.$refs.form.$el.querySelectorAll("input:-webkit-autofill").length>0&&(e.$refs.form.$el.querySelectorAll("input").forEach((function(e){return e.classList.add("v-input--is-label-active")})),e.$refs.form.$el.querySelectorAll("label").forEach((function(e){return e.classList.add("v-label--active")})),clearInterval(e.timer)),e.counter>20&&clearInterval(e.timer)}),100)},computed:{btnColor:function(){return console.log("theme",this.$vuetify.theme),this.$vuetify.theme.isDark?"accent":"primary"}},methods:{validate:function(){return this.$refs.form.validate()},reset:function(){this.$refs.form.reset()},resetValidation:function(){this.$refs.form.resetValidation()},onDone:function(){var e=Object(M["a"])(regeneratorRuntime.mark((function e(t){var n,i,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.data.signIn,i=n.accessToken,a=n.refreshToken,e.next=3,Du(this.$apolloProvider.defaultClient,i,a);case 3:return e.next=5,this.$router.push("/",(function(){}));case 5:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()}},re=oe,le=(n("95f2"),n("4bd4")),se=n("0fd9"),ce=n("8654"),de=Object(S["a"])(re,ee,te,!1,null,"5ae585ff",null),ue=de.exports;N()(de,{VBtn:A["a"],VForm:le["a"],VRow:se["a"],VTextField:ce["a"]});var me=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"unauthorized-app-layout"},[i("v-navigation-drawer",{staticClass:"welcome-wrapper",attrs:{color:"menu",permanent:"",dark:"",app:"",tag:"div",width:e.width,floating:""}},[i("v-container",{staticClass:"welcome-container"},[i("div",{staticClass:"welcome-text"},[i("h1",[e._v("Bring efficiency to facility planning.")])]),i("div",{staticClass:"welcome-footer"},[e._v(" Operated by "),i("img",{staticClass:"welcome-logo",attrs:{src:n("9b19")}})])])],1),i("v-main",{staticClass:"page-layout"},[i("img",{staticClass:"login-logo",attrs:{src:n("b410")}}),i("v-container",[i("v-card",{staticClass:"page-content-container",attrs:{flat:""}},[e._t("default")],2)],1)],1)],1)},fe=[],pe={name:"UnAuthAppLayout",components:{Login:ue},computed:{width:function(){switch(this.$vuetify.breakpoint.name){case"xs":return 220;case"sm":return 320;case"md":return 420;case"lg":return 520;case"xl":return 620;default:return 620}}}},ve=pe,he=(n("b583"),n("b0af")),ye=n("a523"),be=n("f6c4"),ge=Object(S["a"])(ve,me,fe,!1,null,"511f086c",null),ke=ge.exports;N()(ge,{VCard:he["a"],VContainer:ye["a"],VMain:be["a"],VNavigationDrawer:$["a"]});var Se={components:{Login:ue,UnauthAppLayout:ke}},Ce=Se,Ne=Object(S["a"])(Ce,Z,K,!1,null,null,null),_e=Ne.exports,we=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"plan-list"},[n("v-row",{staticClass:"mb-6"},[n("v-col",[n("h1",[e._v("Plans")])])],1),n("v-row",[n("plans")],1)],1)},xe=[],Ee=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ApolloQuery",{staticClass:"plans-container",attrs:{query:e.PLANS_QUERY},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.result,a=i.loading,o=i.error,r=i.data;return[n("alert",{attrs:{error:o}}),n("plan-list",{attrs:{plans:e.getPlans(r)||[],loading:a,selected:e.selected,"show-select":e.showGenerateReportBtn},on:{select:e.onSelect}}),n("v-row",{staticClass:"mt-6",attrs:{"no-gutters":"",justify:"end"}},[n("btn",{directives:[{name:"show",rawName:"v-show",value:!e.disableReportBtn,expression:"!disableReportBtn"}],attrs:{width:"150","color-type":"accent",text:"",disabled:a},on:{click:e.onReset}},[e._v("Reset Included")]),e.showGenerateReportBtn?n("modal",{attrs:{title:"Generate Report",width:"440px"},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on,o=t.attrs;return[n("btn",e._g(e._b({staticClass:"ml-6",attrs:{width:"200","color-type":"accent",disabled:a||e.disableReportBtn}},"btn",o,!1),i),[e._v("Generate Report")])]}},{key:"default",fn:function(t){var i=t.close;return[n("plans-report",{attrs:{plans:e.selected},on:{done:i}})]}}],null,!0)}):e._e()],1)]}}])})},Fe=[],Oe=n("96f1"),Ie=n("4169"),Te=n("8a75"),De=n.n(Te),Ae=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("alert",{attrs:{error:e.error}}),n("data-table",{attrs:{items:e.displayedItems,headers:e.displayedHeaders,height:"611px","item-key":"id",loading:e.loading,"show-select":e.showSelect,"select-label":"Include"},scopedSlots:e._u([{key:"item.name",fn:function(t){var i=t.item;return[i.canViewDetails?n("router-link",{staticClass:"date-cell",attrs:{to:{name:"plan-details",params:{planId:i.id}}}},[e._v(" "+e._s(i.name)+" ")]):e._e()]}},{key:"item.dateOfCreation",fn:function(t){var i=t.item;return[n("span",{staticClass:"date-cell"},[n("span",{staticClass:"date"},[e._v(e._s(e._f("utcDate")(i.dateOfCreation)))])])]}},{key:"item.updatedAt",fn:function(t){var i=t.item;return[n("span",{staticClass:"date-cell"},[n("span",{staticClass:"date"},[e._v(e._s(e._f("date")(i.updatedAt)))]),e._v(" "),n("span",{staticClass:"time"},[e._v(e._s(e._f("time")(i.updatedAt)))])])]}},{key:"item.actions",fn:function(e){var t=e.item;return[n("actions-menu",{attrs:{actions:t.actions}})]}}]),model:{value:e.selectedState,callback:function(t){e.selectedState=t},expression:"selectedState"}})],1)},Pe=[],$e=n("a9b0"),Ve=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-menu",{attrs:{bottom:"","min-width":"150px",rounded:"","offset-y":""},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[n("v-btn",e._g({attrs:{icon:"",text:""}},i),[n("v-icon",[e._v("fa-ellipsis-v")])],1)]}}]),model:{value:e.menuOpen,callback:function(t){e.menuOpen=t},expression:"menuOpen"}},[n("v-card",{staticClass:"actions-container"},[n("v-list",{staticClass:"actions",attrs:{dense:"",nav:""}},[e._l(e.actions,(function(t,i){return[t?[t.modal?"common"===t.modal.type?n("modal",e._b({key:i,on:{close:e.onModalClose},scopedSlots:e._u([{key:"activator",fn:function(i){var a=i.on,o=i.attrs;return[n("v-list-item",e._g(e._b({staticClass:"action",attrs:{"active-class":"action-active"}},"v-list-item",o,!1),a),[n("v-list-item-content",[n("v-list-item-title",[e._v(e._s(t.name))])],1)],1)]}},{key:"default",fn:function(i){var a=i.close;return[n(t.modal.content.componentName,e._b({tag:"component",on:{done:a}},"component",Object.assign({},t.modal.content.props),!1))]}}],null,!0)},"modal",Object.assign({},t.modal.props),!1)):n("confirmation-modal",e._b({key:i,on:{close:e.onModalClose},scopedSlots:e._u([{key:"default",fn:function(i){var a=i.on,o=i.attrs;return[n("v-list-item",e._g(e._b({staticClass:"action",attrs:{"active-class":"action-active"}},"v-list-item",o,!1),a),[n("v-list-item-content",[n("v-list-item-title",[e._v(e._s(t.name))])],1)],1)]}}],null,!0)},"confirmation-modal",Object.assign({},t.modal.props),!1)):n("v-list-item",{key:i,staticClass:"action",attrs:{link:!!t.to,to:t.to,"active-class":"action-active"},on:{click:function(n){return e.onItemClick(t)}}},[n("v-list-item-content",[n("v-list-item-title",[e._v(" "+e._s(t.name)+" ")])],1)],1)]:e._e()]}))],2)],1)],1)},je=[],Le=n("d739"),Re={name:"ActionsMenu",components:{ConfirmationModal:Le["a"],Modal:Ie["a"]},props:{actions:{type:Array}},data:function(){return{menuOpen:!1}},methods:{onItemClick:function(e){this.menuOpen=!1,e.onClick&&e.onClick()},onModalClose:function(){this.menuOpen=!1}}},Ue=Re,qe=(n("ce1e"),n("e449")),Be=Object(S["a"])(Ue,Ve,je,!1,null,null,null),Me=Be.exports;N()(Be,{VBtn:A["a"],VCard:he["a"],VIcon:_["a"],VList:w["a"],VListItem:x["a"],VListItemContent:E["a"],VListItemTitle:E["b"],VMenu:qe["a"]});var Ye,Ge=n("30f0"),ze=n.n(Ge),He=n("1182"),Qe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ApolloMutation",e._g({staticClass:"components-report",attrs:{mutation:e.GENERATE_REPORTS,variables:{input:{planId:e.plan?e.plan.id:null,name:e.reportInfo.name,startYear:e.reportInfo.startYear,endYear:e.reportInfo.endYear,reports:e.reportInfo.reports&&e.reportInfo.reports.reduce((function(e,t){return e[t]=!0,e}),{}),data:e.inputComponents&&e.inputComponents.length?e.inputComponents:null}},update:e.downloadFile},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.mutate,a=t.loading,o=t.error;return[a?e._e():n("alert",{attrs:{align:"center",error:o}}),n("v-overlay",{attrs:{"z-index":1e4,value:a}},[n("v-row",{attrs:{align:"center",justify:"center"}},[n("p",[e._v("Generating report... Please do not refresh or close the tab.")])]),n("v-row",{attrs:{align:"center",justify:"center"}},[n("v-progress-circular",{attrs:{indeterminate:"",size:"50"}})],1)],1),n("components-report-form",e._b({on:{submit:function(e){return i()}}},"components-report-form",{loading:a,reportInfo:e.reportInfo,reportStartYear:e.reportStartYear,disableYearSlider:e.disableYearSlider},!1))]}}])},e.$listeners))},We=[],Je=(n("a4d3"),n("e01a"),n("a20f")),Xe=n.n(Je),Ze=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-form",{ref:"form",staticClass:"components-report-form",attrs:{"lazy-validation":"","aria-busy":e.loading,disabled:e.loading,autocomplete:"off"},on:{submit:function(t){return t.preventDefault(),e.onSubmit(t)}}},[n("v-row",{attrs:{"no-gutters":"",justify:"center"}},[n("v-col",[n("v-subheader",{staticStyle:{padding:"0"}},[e._v("Report years")]),e.disableYearSlider?n("div",{staticClass:"report-slider-warning"},[e._v(" Reporting date range disabled due to filtered\\selected data ")]):e._e(),e.disableYearSlider?e._e():n("v-range-slider",{staticClass:"align-center",attrs:{max:e.maxReportYear,min:e.minReportYear,"hide-details":""},on:{change:e.onRangeChange},scopedSlots:e._u([{key:"prepend",fn:function(){return[n("v-text-field",{staticClass:"mt-0 pt-0",staticStyle:{width:"34px"},attrs:{value:e.reportYearRange[0],"hide-details":"","single-line":"",type:"number"},on:{change:function(t){return e.$set(e.reportYearRange,0,t)}}})]},proxy:!0},{key:"append",fn:function(){return[n("v-text-field",{staticClass:"mt-0 pt-0",staticStyle:{width:"34px"},attrs:{value:e.reportYearRange[1],"hide-details":"","single-line":"",type:"number"},on:{change:function(t){return e.$set(e.reportYearRange,1,t)}}})]},proxy:!0}],null,!1,4055356671),model:{value:e.reportYearRange,callback:function(t){e.reportYearRange=t},expression:"reportYearRange"}}),n("v-text-field",{attrs:{rules:e.nameRules,label:"Report Name",autocomplete:"off",required:"","validate-on-blur":""},model:{value:e.reportInfo.name,callback:function(t){e.$set(e.reportInfo,"name",t)},expression:"reportInfo.name"}}),n("v-list",[n("v-list-item-group",{attrs:{multiple:""},model:{value:e.reportInfo.reports,callback:function(t){e.$set(e.reportInfo,"reports",t)},expression:"reportInfo.reports"}},[e._l(e.reportTypes,(function(t){return[n("v-list-item",{key:t.value,attrs:{value:t.value},scopedSlots:e._u([{key:"default",fn:function(i){var a=i.active;return[n("v-list-item-action",[n("v-checkbox",{attrs:{"input-value":a}})],1),n("v-list-item-content",[n("v-list-item-title",{domProps:{textContent:e._s(t.name)}})],1)]}}],null,!0)})]}))],2)],1)],1)],1),n("div",{staticClass:"mt-8 btns-bar"},[n("btn",{attrs:{type:"submit",width:"300",disabled:e.isGenerateDisable}},[e._v("Generate")])],1)],1)},Ke=[],et=(n("a9e3"),n("25f0"),n("ade3")),tt={ITEMIZED_LIST_OF_FACILITY_COSTS:"itemizedListOfFacilityCosts",SUMMARY_BY_FISCAL_YEAR:"summaryByFiscalYear",DETAILED_SUMMARY_OF_FACILITY_COSTS:"detailedSummaryOfFacilityCosts",SUMMARY_BY_FACILITY:"summaryByFacility",EXPENDITURE_SPREADSHEET:"expenditureSpreadsheet",GAPS_ANALYSIS:"gapsAnalysis",SUMMARY_BY_FUNDING_SOURCE:"summaryByFundingSource"},nt=(Ye={},Object(et["a"])(Ye,tt.ITEMIZED_LIST_OF_FACILITY_COSTS,"Itemized List of Facility Costs"),Object(et["a"])(Ye,tt.SUMMARY_BY_FISCAL_YEAR,"Summary by Fiscal Year"),Object(et["a"])(Ye,tt.DETAILED_SUMMARY_OF_FACILITY_COSTS,"Detailed Summary of Facility Costs"),Object(et["a"])(Ye,tt.SUMMARY_BY_FACILITY,"Summary by Facility"),Object(et["a"])(Ye,tt.EXPENDITURE_SPREADSHEET,"Expenditure Spreadsheet"),Object(et["a"])(Ye,tt.GAPS_ANALYSIS,"Graphs - Gaps Analysis (Funding vs. needs)"),Object(et["a"])(Ye,tt.SUMMARY_BY_FUNDING_SOURCE,"Summary by Funding source"),Ye),it=n("d907"),at={name:"ComponentsReportForm",components:{Btn:Oe["a"]},props:{loading:{type:Boolean,default:!1},reportInfo:{type:Object,default:{name:null,reports:null,startYear:"",endYear:""}},reportStartYear:{type:Number,default:1970},disableYearSlider:{type:Boolean,default:!1}},data:function(){return{reportTypes:[{name:nt[tt.EXPENDITURE_SPREADSHEET],value:tt.EXPENDITURE_SPREADSHEET},{name:nt[tt.SUMMARY_BY_FACILITY],value:tt.SUMMARY_BY_FACILITY},{name:nt[tt.SUMMARY_BY_FISCAL_YEAR],value:tt.SUMMARY_BY_FISCAL_YEAR},{name:nt[tt.DETAILED_SUMMARY_OF_FACILITY_COSTS],value:tt.DETAILED_SUMMARY_OF_FACILITY_COSTS},{name:nt[tt.ITEMIZED_LIST_OF_FACILITY_COSTS],value:tt.ITEMIZED_LIST_OF_FACILITY_COSTS},{name:nt[tt.GAPS_ANALYSIS],value:tt.GAPS_ANALYSIS},{name:nt[tt.SUMMARY_BY_FUNDING_SOURCE],value:tt.SUMMARY_BY_FUNDING_SOURCE}].sort(it["a"]),nameRules:[function(e){return!!e||"Report Name is Required"}],reportsRules:[function(e){return!!e||"Report Type is Required"}],reportYearRange:[0,0]}},methods:{validate:function(){return this.$refs.form.validate()},onRangeChange:function(){this.reportInfo.startYear=this.reportYearRange[0].toString(),this.reportInfo.endYear=this.reportYearRange[1].toString()},onSubmit:function(){this.validate()&&this.$emit("submit")}},computed:{minReportYear:function(){return this.reportStartYear},maxReportYear:function(){return this.reportStartYear+20},isGenerateDisable:function(){return!this.reportInfo.reports.length||this.loading}},watch:{reportStartYear:{handler:function(e){this.reportYearRange=[e,e+9],this.reportInfo.startYear=this.reportYearRange[0].toString(),this.reportInfo.endYear=this.reportYearRange[1].toString()},immediate:!0}}},ot=at,rt=(n("0730"),n("ac7c")),lt=n("62ad"),st=n("1800"),ct=n("1baa"),dt=n("5963"),ut=n("e0c7"),mt=Object(S["a"])(ot,Ze,Ke,!1,null,null,null),ft=mt.exports;N()(mt,{VCheckbox:rt["a"],VCol:lt["a"],VForm:le["a"],VList:w["a"],VListItem:x["a"],VListItemAction:st["a"],VListItemContent:E["a"],VListItemGroup:ct["a"],VListItemTitle:E["b"],VRangeSlider:dt["a"],VRow:se["a"],VSubheader:ut["a"],VTextField:ce["a"]});var pt=function(e,t,n){return null!==e&&null!==t&&null!==n?Math.round(e*t*n/100):0},vt=function(e,t,n,i){if(null!==e&&null!==t&&null!==n&&null!==i){var a=Math.pow(1+i/100,parseInt(n)-parseInt(t));return Math.round(e*a)}return 0},ht=function(e,t,n){return null!==e&&null!==t?n?Math.round(e*(1+t/100)):e:0},yt=function(e,t,n,i){var a=Math.pow(1+t/100,parseInt(n)-parseInt(i));return Math.round(e*a)},bt=function(e,t){var n=e.quantityOfComponents,i=e.costPerUnit,a=e.yearForImprovement,o=e.softCost,r=t&&t.financialInfo||{},l=r.regionalCost,s=void 0===l?null:l,c=r.planStartYear,d=void 0===c?null:c,u=r.inflationCostEscalation,m=void 0===u?null:u,f=r.softCostPercentage,p=void 0===f?null:f,v=pt(n,i,s),h=vt(v,d,a,m),y=ht(h,p,o);return{baseAmount:v,componentSubtotal:h,budgetAmount:y}};function gt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=document.createElement("a");n.href=e,n.setAttribute("download",t),n.click()}var kt={name:"ComponentsReport",components:{ComponentsReportForm:ft},props:{plan:{type:Object},components:{type:Array,default:null},disableYearSlider:{type:Boolean,default:!1}},data:function(e){return{GENERATE_REPORTS:Xe.a,inputComponents:e.getInputComponents(e.components),reportInfo:{name:null,reports:[],startYear:"",endYear:""}}},watch:{components:{immediate:!0,handler:function(e){null!==e&&(this.inputComponents=this.getInputComponents(e))},deep:!0}},methods:{downloadFile:function(e,t){var n=t.data.generateReports;n?(gt(n.url,this.name),He["a"].$emit("show-snackbar",{color:"success",text:"Reports were generated successfully!"}),this.$emit("done")):He["a"].$emit("show-snackbar",{color:"error",text:"Error! Something went wrong... Please try later!"})},getInputComponents:function(e){var t=this;return e?e.map((function(e){var n=bt(e,t.plan);return Object(m["a"])(Object(m["a"])({id:e.id,planId:t.plan&&t.plan.id,facility:e.facility&&e.facility.name||null,system:e.system&&e.system.name||null,categoryId:e.system&&e.system.category&&e.system.category.id||null,component:e.component&&e.component.name||null,yearForImprovement:e.yearForImprovement,costPerUnit:e.costPerUnit,unit:e.unit&&e.unit.name,quantityOfComponents:e.quantityOfComponents},n),{},{softCost:e.softCost,budgetaryNotes:e.budgetaryNotes,description:e.description,locationOfComponent:e.locationOfComponent,fundingSource:e.fundingSource&&e.fundingSource.name||null,internalNotes:e.internalNotes,finCode:e.system&&e.system.finCode&&parseInt(e.system.finCode)||null})})):void 0}},computed:{reportStartYear:function(){return this.plan?parseInt(this.plan.financialInfo.planStartYear):1970}}},St=kt,Ct=n("a797"),Nt=n("490a"),_t=Object(S["a"])(St,Qe,We,!1,null,null,null),wt=_t.exports;N()(_t,{VOverlay:Ct["a"],VProgressCircular:Nt["a"],VRow:se["a"]});var xt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ApolloMutation",e._g({staticClass:"components-report",attrs:{mutation:e.CLONE_PLAN_MUTATION,variables:{id:e.plan?e.plan.id:null,name:e.name},update:e.onClonePlan},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.mutate,a=t.loading,o=t.error;return[a?e._e():n("alert",{attrs:{align:"center",error:o}}),n("v-text-field",{attrs:{label:"Plan Name",rules:e.nameRules,autofocus:"",autocomplete:"off","validate-on-blur":"",required:""},model:{value:e.name,callback:function(t){e.name=t},expression:"name"}}),n("btn",{attrs:{width:"200",disabled:e.isNameValid},on:{click:function(e){return i()}}},[e._v("Clone")])]}}])},e.$listeners))},Et=[],Ft=n("8810"),Ot=n.n(Ft),It={name:"ClonePlanModal",components:{Btn:Oe["a"]},props:{plan:{type:Object}},data:function(){return{CLONE_PLAN_MUTATION:Ot.a,name:null,nameRules:[function(e){return!!e||"Name is Required"}]}},computed:{isNameValid:function(){return null===this.name||""===this.name}},methods:{onClonePlan:function(e,t){var n=t.data.clonePlan;if(n){var i=e.readQuery({query:De.a});i.plans.unshift(n),e.writeQuery({query:De.a,data:i}),He["a"].$emit("show-snackbar",{color:"success",text:"Plan was cloned successfully!"})}}}},Tt=It,Dt=Object(S["a"])(Tt,xt,Et,!1,null,null,null),At=Dt.exports;N()(Dt,{VTextField:ce["a"]});var Pt={name:"PlanList",components:{Btn:Oe["a"],DataTable:$e["a"],ConfirmationModal:Le["a"],ActionsMenu:Me},props:{plans:{type:Array,default:[]},loading:{type:Boolean},selected:{type:Array},showSelect:{type:Boolean,default:!1}},apollo:{currentUser:{query:y.a,fetchPolicy:"cache-only"}},data:function(){return{DELETE_PLAN_MUTATION:ze.a,currentUser:null,error:null,deleteConfirmationModal:!1,headers:[{text:"Name",value:"name",type:"text",dataType:"string",width:"150px",fixed:!0},{text:"Current Plan",value:"isCurrent",type:"select",dataType:"string",width:"100px",options:["Yes","No"]},{text:"Date of Creation",value:"dateOfCreation",type:"date",dataType:"date",width:"150px"},{text:"Client",value:"clientName",type:"select",dataType:"string",width:"150px"},{text:"ICS Responsible Office",value:"icsOfficeName",type:"select",dataType:"string",width:"150px"},{text:"Client Type",value:"clientTypeName",type:"select",dataType:"string",width:"150px"},{text:"Plan Type",value:"planType",type:"select",dataType:"string",width:"100px"},{text:"Creator",value:"creatorName",type:"select",dataType:"string",width:"120px"},{text:"Editor",value:"editorName",type:"select",dataType:"string",width:"150px"},{text:"Last Updated",value:"updatedAt",type:"date",dataType:"date",width:"180px"},{text:"Actions",value:"actions",sortable:!1,width:"40px",fixed:!0,permissions:[f["c"].EDIT_PLAN,f["c"].CLONE_PLAN,f["c"].GENERATE_REPORT,f["c"].DELETE_PLAN]}]}},computed:{displayedItems:function(){var e=this;return this.plans?this.plans.map((function(t){return Object(m["a"])(Object(m["a"])({},t),{},{clientName:t.client&&t.client.name||"",creatorName:t.createdBy&&t.createdBy.username||"",icsOfficeName:t.client&&t.client.icsOffice&&t.client.icsOffice.name||"",clientTypeName:t.client&&t.client.clientType&&t.client.clientType.name||"",planType:t.financialInfo&&t.financialInfo.typeOfPlan&&t.financialInfo.typeOfPlan.name||"",editorName:t.editedBy&&t.editedBy.username||"",canViewDetails:Object(b["a"])(f["c"].VIEW_PLAN,e.currentUser),actions:[Object(b["a"])(f["c"].GENERATE_REPORT,e.currentUser)&&{name:"Generate Report",modal:{type:"common",props:{title:"Generate Report",width:"380px"},content:{componentName:wt,props:{plan:t}}}},Object(b["a"])(f["c"].EDIT_PLAN,e.currentUser)&&{name:"Edit",to:{name:"plan",params:{planId:t.id}}},Object(b["a"])(f["c"].CLONE_PLAN,e.currentUser)&&{name:"Clone",modal:{type:"common",props:{title:"Clone Plan",width:"380px"},content:{componentName:At,props:{plan:t}}}},Object(b["a"])(f["c"].DELETE_PLAN,e.currentUser)&&{name:"Delete",modal:{props:{mutation:ze.a,variables:{id:t.id},title:"Delete Plan",message:"Are you sure you want to delete plan?",okBtn:{label:"Delete"},update:e.onDelete(t)}}}]})})):[]},displayedHeaders:function(){var e=this;return this.headers.filter((function(t){return!t.permissions||t.permissions.some((function(t){return Object(b["a"])(t,e.currentUser)}))}))},selectedState:{get:function(){return this.selected},set:function(e){this.$emit("select",e)}}},methods:{onDelete:function(e){return function(t,n){var i=n.data.deletePlan;if(i){var a=t.readQuery({query:De.a});a.plans=a.plans.filter((function(t){return t.id!==e.id})),t.writeQuery({query:De.a,data:a}),He["a"].$emit("show-snackbar",{color:"success",text:"Plan was deleted from the system successfully!"})}}}}},$t=Pt,Vt=Object(S["a"])($t,Ae,Pe,!1,null,null,null),jt=Vt.exports,Lt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ApolloMutation",e._g({staticClass:"components-report",attrs:{mutation:e.GENERATE_REPORT,variables:{input:{name:e.reportInfo.name,startYear:e.reportInfo.startYear,endYear:e.reportInfo.endYear,planIds:e.inputPlans}},update:e.downloadFile},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.mutate,a=t.loading,o=t.error;return[a?e._e():n("alert",{attrs:{align:"center",error:o}}),n("v-overlay",{attrs:{"z-index":1e4,value:a}},[n("v-row",{attrs:{align:"center",justify:"center"}},[n("p",[e._v("Generating report... Please do not refresh or close the tab.")])]),n("v-row",{attrs:{align:"center",justify:"center"}},[n("v-progress-circular",{attrs:{indeterminate:"",size:"50"}})],1)],1),n("plans-report-form",e._b({on:{submit:function(e){return i()}}},"plans-report-form",{loading:a,reportInfo:e.reportInfo},!1))]}}])},e.$listeners))},Rt=[],Ut=n("87bb"),qt=n.n(Ut),Bt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-form",{ref:"form",staticClass:"plans-report-form",attrs:{"lazy-validation":"","aria-busy":e.loading,disabled:e.loading,autocomplete:"off"},on:{submit:function(t){return t.preventDefault(),e.onSubmit(t)}}},[n("v-row",{attrs:{"no-gutters":"",justify:"center"}},[n("v-col",[n("v-subheader",{staticStyle:{padding:"0"}},[e._v("Report years")]),n("v-range-slider",{staticClass:"align-center",attrs:{max:e.maxReportYear,min:e.minReportYear,"hide-details":""},on:{change:e.onRangeChange},scopedSlots:e._u([{key:"prepend",fn:function(){return[n("v-text-field",{staticClass:"mt-0 pt-0",staticStyle:{width:"34px"},attrs:{value:e.reportYearRange[0],"hide-details":"","single-line":"",type:"number"},on:{change:function(t){return e.$set(e.reportYearRange,0,t)}}})]},proxy:!0},{key:"append",fn:function(){return[n("v-text-field",{staticClass:"mt-0 pt-0",staticStyle:{width:"34px"},attrs:{value:e.reportYearRange[1],"hide-details":"","single-line":"",type:"number"},on:{change:function(t){return e.$set(e.reportYearRange,1,t)}}})]},proxy:!0}]),model:{value:e.reportYearRange,callback:function(t){e.reportYearRange=t},expression:"reportYearRange"}}),n("v-text-field",{attrs:{rules:e.nameRules,label:"Report Name",autofocus:"",autocomplete:"off",required:"","validate-on-blur":""},model:{value:e.reportInfo.name,callback:function(t){e.$set(e.reportInfo,"name",t)},expression:"reportInfo.name"}}),n("h3",{staticClass:"mt-1"},[e._v("Selected Plans ("+e._s(e.reportInfo.plans.length)+"):")]),n("ul",{staticClass:"plans"},e._l(e.reportInfo.plans,(function(t){return n("li",{key:t.id,staticClass:"plan"},[n("span",{staticClass:"plan-name"},[e._v(e._s(t.name))]),n("span",{staticClass:"plan-client-name"},[e._v(e._s(t.client&&t.client.name))])])})),0)],1)],1),n("div",{staticClass:"mt-8 btns-bar"},[n("btn",{attrs:{type:"submit","full-width":"",disabled:e.loading}},[e._v("Generate")])],1)],1)},Mt=[],Yt=(n("fb6a"),{name:"PlansReportForm",components:{Btn:Oe["a"]},props:{loading:{type:Boolean,default:!1},reportInfo:{type:Object,default:{name:null,plans:null}}},data:function(){return{nameRules:[function(e){return!!e||"Report Name is Required"}],reportYearRange:[0,0]}},methods:{validate:function(){return this.$refs.form.validate()},onRangeChange:function(){this.reportInfo.startYear=this.reportYearRange[0].toString(),this.reportInfo.endYear=this.reportYearRange[1].toString()},onSubmit:function(){this.validate()&&this.reportInfo.plans&&this.reportInfo.plans.length>0&&this.$emit("submit")}},computed:{minReportYear:function(){var e=this.reportStartYears.slice().sort((function(e,t){return e-t}))[0];return e||1970},maxReportYear:function(){var e=this.reportStartYears.slice().sort((function(e,t){return t-e}))[0];return e?e+20:1990},reportStartYears:function(){var e;try{e=this.reportInfo.plans.map((function(e){return parseInt(e.financialInfo.planStartYear)}))}catch(t){e=[]}return e}},watch:{minReportYear:{handler:function(e){this.reportYearRange=[e,e+9],this.reportInfo.startYear=this.reportYearRange[0].toString(),this.reportInfo.endYear=this.reportYearRange[1].toString()},immediate:!0}}}),Gt=Yt,zt=(n("15e1"),Object(S["a"])(Gt,Bt,Mt,!1,null,null,null)),Ht=zt.exports;N()(zt,{VCol:lt["a"],VForm:le["a"],VRangeSlider:dt["a"],VRow:se["a"],VSubheader:ut["a"],VTextField:ce["a"]});var Qt={name:"PlansReport",components:{PlansReportForm:Ht},props:{plans:{type:Array,default:null}},data:function(e){return{GENERATE_REPORT:qt.a,reportInfo:{startYear:null,endYear:null,name:null,plans:e.plans},inputPlans:e.getInputPlans(e.plans)}},watch:{plans:{immediate:!0,handler:function(e){null!==e&&(this.inputPlans=this.getInputPlans(e))},deep:!0}},methods:{downloadFile:function(e,t){var n=t.data.generateAllClientsReport;n?(gt(n.url,this.name),He["a"].$emit("show-snackbar",{color:"success",text:"Report was generated successfully!"}),this.$emit("done")):He["a"].$emit("show-snackbar",{color:"error",text:"Error! Something went wrong... Please try later!"})},getInputPlans:function(e){return e?e.map((function(e){return e.id})):void 0}}},Wt=Qt,Jt=Object(S["a"])(Wt,Lt,Rt,!1,null,null,null),Xt=Jt.exports;N()(Jt,{VOverlay:Ct["a"],VProgressCircular:Nt["a"],VRow:se["a"]});var Zt={name:"Plans",components:{Btn:Oe["a"],PlanList:jt,Modal:Ie["a"],PlansReport:Xt},apollo:{currentUser:{query:y.a,fetchPolicy:"cache-first"}},data:function(){return{PLANS_QUERY:De.a,selected:[],currentUser:null}},computed:{showGenerateReportBtn:function(){return Object(b["a"])(f["c"].GENERATE_REPORT,this.currentUser)},disableReportBtn:function(){return 0===this.selected.length}},methods:{onSelect:function(e){this.selected=e},onReset:function(){this.selected=[]},getPlans:function(e){return e&&e.plans?e.plans.map((function(e){return Object(m["a"])(Object(m["a"])({},e),{},{isCurrent:e.isCurrent?"Yes":"No"})})):[]}}},Kt=Zt,en=(n("f2c1"),Object(S["a"])(Kt,Ee,Fe,!1,null,null,null)),tn=en.exports;N()(en,{VRow:se["a"]});var nn={components:{Plans:tn,Btn:Oe["a"]}},an=nn,on=Object(S["a"])(an,we,xe,!1,null,null,null),rn=on.exports;N()(on,{VCol:lt["a"],VRow:se["a"]});var ln=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"client-list"},[n("v-row",{staticClass:"mb-6"},[n("v-col",[n("h1",[e._v("Clients")])]),n("v-col",{attrs:{cols:"auto"}},[e.showAddClient?n("btn",{attrs:{link:"",to:{name:"add-client"},width:"180"}},[e._v("Add Client")]):e._e()],1)],1),n("v-row",[n("clients")],1)],1)},sn=[],cn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ApolloQuery",{staticClass:"clients-container",attrs:{query:e.CLIENTS_QUERY},scopedSlots:e._u([{key:"default",fn:function(e){var t=e.result,i=t.loading,a=t.error,o=t.data;return[n("alert",{attrs:{error:a}}),n("client-list",{attrs:{clients:o&&o.clients||[],loading:i}})]}}])})},dn=[],un=n("28e7"),mn=n.n(un),fn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("data-table",{attrs:{items:e.displayedItems,headers:e.displayedHeaders,height:"611px","item-key":"id",loading:e.loading},scopedSlots:e._u([{key:"item.name",fn:function(t){var i=t.item;return[i.canViewDetails?n("router-link",{attrs:{to:{name:"client-details",params:{clientId:i.id}}}},[e._v(e._s(i.name))]):[e._v(e._s(i.name))]]}},{key:"item.actions",fn:function(t){var i=t.item;return[n("div",{staticClass:"table-actions-bar"},[e.showEditBtn?n("btn",{staticClass:"action edit mr-2",attrs:{icon:"",link:"",to:{name:"client",params:{clientId:i.id}},"color-type":null}},[n("v-icon",{attrs:{small:""}},[e._v(" far fa-edit ")])],1):e._e(),e.showDeleteBtn?n("confirmation-modal",{attrs:{mutation:e.DELETE_CLIENT_MUTATION,variables:{id:i.id},title:"Delete Client",message:"Are you sure you want to delete client?","ok-btn":{label:"Delete"},update:e.onDelete(i)},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.on,o=t.attrs;return[n("v-tooltip",{attrs:{"max-width":"300",top:"","nudge-top":"-10",disabled:i.canDelete,"open-delay":"700"},scopedSlots:e._u([{key:"activator",fn:function(t){var r=t.on,l=t.attrs;return[n("span",e._g(e._b({},"span",l,!1),r),[n("v-icon",e._g(e._b({staticClass:"action",attrs:{small:"",disabled:!i.canDelete}},"v-icon",o,!1),a),[e._v(" far fa-trash-alt ")])],1)]}}],null,!0)},[e._v(" The client has a plan(s). First, you need to delete plan(s) ")])]}}],null,!0)}):e._e()],1)]}}])})},pn=[],vn=n("7fff"),hn=n.n(vn),yn={name:"ClientList",components:{Btn:Oe["a"],DataTable:$e["a"],ConfirmationModal:Le["a"]},props:{clients:{type:Array,default:[]},loading:{type:Boolean}},apollo:{currentUser:{query:y.a,fetchPolicy:"cache-only"}},data:function(){return{DELETE_CLIENT_MUTATION:hn.a,headers:[{text:"Client Name",value:"name",type:"text",dataType:"string",width:"100px"},{text:"Creator",value:"creatorUsername",type:"text",dataType:"string",width:"100px"},{text:"ICS Responsible Office",value:"icsOfficeName",type:"select",dataType:"string",width:"100px"},{text:"Client Type",value:"clientTypeName",type:"select",dataType:"string",width:"100px"},{text:"Actions",value:"actions",sortable:!1,width:"40px",fixed:!0,permissions:[f["c"].EDIT_CLIENT,f["c"].DELETE_CLIENT]}]}},computed:{displayedItems:function(){var e=this;return this.clients?this.clients.map((function(t){return Object(m["a"])(Object(m["a"])({},t),{},{icsOfficeName:t.icsOffice&&t.icsOffice.name||"",clientTypeName:t.clientType&&t.clientType.name||"",creatorUsername:t.creator&&t.creator.username||"",canViewDetails:Object(b["a"])(f["c"].VIEW_CLIENT,e.currentUser),canDelete:!t.plans||0===t.plans.length})})):[]},displayedHeaders:function(){var e=this;return this.headers.filter((function(t){return!t.permissions||t.permissions.some((function(t){return Object(b["a"])(t,e.currentUser)}))}))},showEditBtn:function(){return Object(b["a"])(f["c"].EDIT_CLIENT,this.currentUser)},showDeleteBtn:function(){return Object(b["a"])(f["c"].DELETE_CLIENT,this.currentUser)}},methods:{onDelete:function(e){return function(t,n){var i=n.data.deleteClient;if(i){var a=t.readQuery({query:mn.a});a.clients=a.clients.filter((function(t){return t.id!==e.id})),t.writeQuery({query:mn.a,data:a}),He["a"].$emit("show-snackbar",{color:"success",text:"Client was deleted from the system successfully!"})}}}}},bn=yn,gn=n("3a2f"),kn=Object(S["a"])(bn,fn,pn,!1,null,null,null),Sn=kn.exports;N()(kn,{VIcon:_["a"],VTooltip:gn["a"]});var Cn={name:"Clients",components:{Btn:Oe["a"],ClientList:Sn},data:function(){return{CLIENTS_QUERY:mn.a}}},Nn=Cn,_n=(n("ec0b"),Object(S["a"])(Nn,cn,dn,!1,null,null,null)),wn=_n.exports,xn={components:{Clients:wn,Btn:Oe["a"]},apollo:{currentUser:{query:y.a,fetchPolicy:"cache-first"}},data:function(){return{currentUser:null}},computed:{showAddClient:function(){return Object(b["a"])(f["c"].ADD_CLIENT,this.currentUser)}}},En=xn,Fn=Object(S["a"])(En,ln,sn,!1,null,null,null),On=Fn.exports;N()(Fn,{VCol:lt["a"],VRow:se["a"]});var In=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"add-client"},[n("client")],1)},Tn=[],Dn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("v-row",{staticClass:"mb-1"},[n("v-col",[n("breadcrumbs",{attrs:{items:e.breadcrumbs}})],1)],1),n("client-form",{attrs:{client:e.client},on:{submit:e.onSubmit}})],1)},An=[],Pn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("stepper",{model:{value:e.step,callback:function(t){e.step=t},expression:"step"}},[n("v-stepper-header",[n("stepper-step",{attrs:{step:"1"}},[e._v(" General Information ")]),n("v-divider"),n("stepper-step",{attrs:{editable:e.lastCompleted>=1&&!e.lock,step:"2"}},[e._v(" Contacts ")]),n("v-divider"),n("stepper-step",{attrs:{editable:e.lastCompleted>=2&&!e.lock,step:"3"}},[e._v(" Facilities ")]),n("v-divider"),n("stepper-step",{attrs:{editable:e.lastCompleted>=3&&!e.lock,step:"4"}},[e._v(" Documents ")]),n("v-divider"),n("stepper-step",{attrs:{editable:e.lastCompleted>=4&&!e.lock,step:"5"}},[e._v(" Done ")])],1),n("v-stepper-items",{attrs:{flat:""}},[n("v-stepper-content",{attrs:{step:"1"}},[n("client-general-info-form",{attrs:{disabled:e.disabled,loading:e.loading,client:e.client},on:{submit:e.onUpdateClientInfo,change:e.onChangeClientInfo,reset:e.onResetChangesClientInfo}})],1),n("v-stepper-content",{attrs:{step:"2"}},[n("contacts",{attrs:{client:e.client,loading:e.loading},on:{back:function(t){e.step=1},done:e.onUpdateContacts}})],1),n("v-stepper-content",{attrs:{step:"3"}},[n("facilities",{attrs:{client:e.client,loading:e.loading},on:{back:function(t){e.step=2},done:e.onUpdateFacilities}})],1),n("v-stepper-content",{attrs:{step:"4"}},[n("documents",{attrs:{client:e.client,loading:e.loading},on:{back:function(t){e.step=3},done:e.onUpdateDocuments}})],1),n("v-stepper-content",{attrs:{step:"5"}},[n("client-summary",{attrs:{client:e.client},on:{back:function(t){e.step=4}}})],1)],1)],1)},$n=[],Vn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-stepper",e._g(e._b({staticClass:"stepper",attrs:{"non-linear":"","alt-labels":""}},"v-stepper",Object.assign({},e.$props,e.$attrs),!1),e.$listeners),[e._t("default")],2)},jn=[],Ln=n("7e85"),Rn=i["a"].extend({mixins:[Ln["a"]]}),Un=Rn.extend({name:"Stepper",components:{VStepper:Ln["a"]},props:{nonLinear:{type:Boolean,default:!0}}}),qn=Un,Bn=(n("3d11"),Object(S["a"])(qn,Vn,jn,!1,null,null,null)),Mn=Bn.exports;N()(Bn,{VStepper:Ln["a"]});var Yn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-stepper-step",e._g(e._b({staticClass:"stepper-step",attrs:{color:"accent"}},"v-stepper-step",Object.assign({},e.$props,e.$attrs),!1),e.$listeners),[e._t("default")],2)},Gn=[],zn=n("56a4"),Hn=i["a"].extend({mixins:[zn["a"]]}),Qn=Hn.extend({name:"StepperStep",components:{VStepperStep:zn["a"]},props:{editable:{type:Boolean,default:!0}}}),Wn=Qn,Jn=(n("2310"),Object(S["a"])(Wn,Yn,Gn,!1,null,null,null)),Xn=Jn.exports;N()(Jn,{VStepperStep:zn["a"]});var Zn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-form",{ref:"form",staticClass:"client-general-info-form",attrs:{"lazy-validation":"","aria-busy":e.loading||e.internalLoading,disabled:e.loading||e.internalLoading||e.disabled,autocomplete:"off"},on:{submit:function(t){return t.preventDefault(),e.onSubmit(t)}}},[e.loading?e._e():n("alert",{attrs:{error:e.error}}),e.loading?n("v-row",{attrs:{"no-gutters":"",justify:"center"}},[n("v-progress-circular",{attrs:{indeterminate:"",color:"primary"}})],1):e._e(),e.form?n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"col"},[n("v-text-field",{attrs:{rules:e.nameRules,label:"Name",required:"","validate-on-blur":"",autofocus:"",autocomplete:"off"},on:{input:function(t){return e.onChange("name",e.form.name)}},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}}),n("v-text-field",{staticClass:"mt-1",attrs:{label:"District/Department Number",autocomplete:"off","validate-on-blur":""},on:{input:function(t){return e.onChange("district",e.form.district)}},model:{value:e.form.district,callback:function(t){e.$set(e.form,"district",t)},expression:"form.district"}}),n("v-text-field",{staticClass:"mt-1",attrs:{label:"Address Line",rules:e.addressRules,required:"",autocomplete:"off","validate-on-blur":""},on:{input:function(t){return e.onChange("address",e.form.address)}},model:{value:e.form.address,callback:function(t){e.$set(e.form,"address",t)},expression:"form.address"}}),n("v-text-field",{staticClass:"mt-1",attrs:{label:"City",rules:e.cityRules,required:"",autocomplete:"off","validate-on-blur":""},on:{input:function(t){return e.onChange("city",e.form.city)}},model:{value:e.form.city,callback:function(t){e.$set(e.form,"city",t)},expression:"form.city"}}),n("v-text-field",{staticClass:"mt-1",attrs:{label:"State",rules:e.stateRules,required:"",autocomplete:"off","validate-on-blur":""},on:{input:function(t){return e.onChange("state",e.form.state)}},model:{value:e.form.state,callback:function(t){e.$set(e.form,"state",t)},expression:"form.state"}}),n("number-text-field",{staticClass:"mt-1",attrs:{label:"Zip Code",rules:e.zipRules,required:"",autocomplete:"off","validate-on-blur":""},on:{input:function(t){return e.onChange("zip",e.form.zip)}},model:{value:e.form.zip,callback:function(t){e.$set(e.form,"zip",e._n(t))},expression:"form.zip"}}),n("v-text-field",{staticClass:"mt-1",attrs:{label:"County",autocomplete:"off","validate-on-blur":""},on:{input:function(t){return e.onChange("county",e.form.county)}},model:{value:e.form.county,callback:function(t){e.$set(e.form,"county",t)},expression:"form.county"}}),n("v-textarea",{staticClass:"mt-1",attrs:{rows:"1","auto-grow":"",label:"Client Summary",autocomplete:"off","validate-on-blur":""},on:{input:function(t){return e.onChange("description",e.form.description)}},model:{value:e.form.description,callback:function(t){e.$set(e.form,"description",t)},expression:"form.description"}})],1),n("v-col",{staticClass:"col",attrs:{offset:"1"}},[n("v-select",{staticClass:"mt-1",attrs:{"item-text":"name",rules:e.icsOfficeRules,items:e.icsOffices,label:"ICS Responsible Office",required:""},on:{input:function(t){return e.form.icsOffice=e.icsOffices.find((function(e){return e.name===t}))},change:function(t){return e.onChange("icsOffice",e.form.icsOffice)}},model:{value:e.form.icsOffice,callback:function(t){e.$set(e.form,"icsOffice",t)},expression:"form.icsOffice"}}),n("v-select",{staticClass:"mt-1",attrs:{"item-text":"name",items:e.clientTypes,rules:e.clientTypeRules,label:"Client Type",required:""},on:{input:function(t){return e.form.clientType=e.clientTypes.find((function(e){return e.name===t}))},change:function(t){return e.onChange("clientType",e.form.clientType)}},model:{value:e.form.clientType,callback:function(t){e.$set(e.form,"clientType",t)},expression:"form.clientType"}}),n("upload",{staticClass:"mt-4",attrs:{placeholder:"Upload Client Logo",accept:"image/*"},on:{change:function(t){return e.onChange("upload",e.form.upload)}},model:{value:e.form.upload,callback:function(t){e.$set(e.form,"upload",t)},expression:"form.upload"}})],1)],1):e._e(),n("div",{staticClass:"mt-8 btns-bar"},[n("btn",{directives:[{name:"show",rawName:"v-show",value:e.changes.size>0,expression:"changes.size > 0"}],staticClass:"mr-2",attrs:{width:"100","color-type":"secondary",text:"",disabled:e.loading||e.internalLoading},on:{click:e.onReset}},[e._v("Reset")]),n("btn",{attrs:{type:"submit",width:"150","color-type":"accent",disabled:e.internalLoading||e.loading||e.disabled}},[e._v(e._s(e.changes.size>0?"Save & Next":"Next"))])],1)],1)},Kn=[],ei=(n("b64b"),n("6062"),n("6fda")),ti=n.n(ei),ni=n("0c10"),ii=n.n(ni),ai=n("51e6"),oi=n.n(ai),ri=n("ef63"),li=n.n(ri),si=n("2ef0"),ci=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-file-input",e._g(e._b({attrs:{outlined:"",color:"accent","prepend-icon":"","prepend-inner-icon":"fa-camera",value:e.value},scopedSlots:e._u([e._l(e.$scopedSlots,(function(t,n){return{key:n,fn:function(t){return[e._t(n,null,null,t)]}}}))],null,!0)},"v-file-input",Object.assign({},e.$props,e.$attrs),!1),e.$listeners))},di=[],ui=n("23a7"),mi={name:"Upload",components:{VFileInput:ui["a"]},model:{prop:"value",event:"change"},props:{value:File|Array|null}},fi=mi,pi=Object(S["a"])(fi,ci,di,!1,null,null,null),vi=pi.exports;N()(pi,{VFileInput:ui["a"]});var hi=n("b891"),yi=function(e,t){return Object.keys(e).reduce((function(e,n){return Object(m["a"])(Object(m["a"])({},e),{},Object(et["a"])({},n,void 0!==t[n]?t[n]:null))}),{})},bi={name:"ClientGeneralInfoForm",components:{Btn:Oe["a"],Upload:vi,NumberTextField:hi["a"]},props:{loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},client:{type:Object}},apollo:{clientTypes:{query:ti.a,fetchPolicy:"cache-first",error:function(e){this.error=e.networkError?Object(m["a"])(Object(m["a"])({},e),{},{message:"Something went wrong! Could not load client type list."}):e}},icsOffices:{query:ii.a,fetchPolicy:"cache-first",error:function(e){this.error=e.networkError?Object(m["a"])(Object(m["a"])({},e),{},{message:"Something went wrong! Could not load ics office list."}):e}}},data:function(){return{form:{name:null,district:null,address:null,city:null,state:null,zip:null,county:null,description:null,icsOffice:null,clientType:null,logoUrl:null,upload:null},nameRules:[function(e){return!!e||"Name is Required"}],addressRules:[function(e){return!!e||"Address is Required"}],cityRules:[function(e){return!!e||"City is Required"}],stateRules:[function(e){return!!e||"State is Required"}],zipRules:[function(e){return!!e||"Zip Code is Required"},function(e){return e&&5===e.toString().length||"Zip Code Must Contain 5 Characters"}],icsOfficeRules:[function(e){return!!e||"ICS Office is Required"}],icsOffices:[],clientTypeRules:[function(e){return!!e||"Client Type is Required"}],clientTypes:[],internalLoading:!1,error:null,changes:new Set}},watch:{client:{immediate:!0,handler:function(e){null!==e&&(this.error=null,this.form=Object(m["a"])(Object(m["a"])({},yi(this.form,e)),e.logoUrl?{upload:new File([""],e.logoUrl,{type:"image/plain"})}:{}),this.changes.clear())}}},methods:{validate:function(){return this.$refs.form.validate()},onChange:function(e,t){this.client?!Object(si["isEqual"])(this.client[e],t)||this.form.upload?this.changes.add(e):this.changes.has(e)&&this.changes.delete(e):this.changes.add(e),this.$emit("change")},onSubmit:function(){if(this.error=null,this.validate()&&this.changes.size>0){var e=this.form,t=e.name,n=e.district,i=e.address,a=e.city,o=e.state,r=e.zip,l=e.county,s=e.description,c=e.icsOffice,d=e.clientType,u=e.logoUrl,f=e.upload,p={name:t,district:n,address:i,city:a,state:o,zip:r,county:l,description:s,logoFile:f&&f.name===u?null:f,icsOfficeId:c.id,clientTypeId:d.id};this.client.id?this.updateClient(Object(m["a"])(Object(m["a"])({},p),{},{id:this.client.id,logoUrl:u&&!f?null:u})):this.addClient(p)}else this.validate()&&0===this.changes.size&&this.$emit("submit",this.client)},onReset:function(){this.form=Object(m["a"])(Object(m["a"])({},yi(this.form,this.client)),this.client.logoUrl?{upload:new File([""],this.client.logoUrl,{type:"image/plain"})}:{}),this.error=null,this.$refs.form.resetValidation(),this.changes.clear(),this.$emit("reset")},addClient:function(e){var t=this;this.internalLoading=!0,this.$apollo.mutate({mutation:oi.a,variables:{input:e}}).then((function(e){var n=e.data.addClient;He["a"].$emit("show-snackbar",{color:"success",text:"Client ".concat(n.name," was added successfully!")}),t.$emit("submit",n)})).catch((function(e){t.error=e})).finally((function(){t.internalLoading=!1}))},updateClient:function(e){var t=this;this.internalLoading=!0,this.$apollo.mutate({mutation:li.a,variables:{input:e}}).then((function(e){var n=e.data.updateClient;He["a"].$emit("show-snackbar",{color:"success",text:"Client was updated successfully!"}),t.$emit("submit",n)})).catch((function(e){t.error=e})).finally((function(){t.internalLoading=!1}))}}},gi=bi,ki=(n("4447"),n("b974")),Si=n("a844"),Ci=Object(S["a"])(gi,Zn,Kn,!1,null,"737dad3a",null),Ni=Ci.exports;N()(Ci,{VCol:lt["a"],VForm:le["a"],VProgressCircular:Nt["a"],VRow:se["a"],VSelect:ki["a"],VTextField:ce["a"],VTextarea:Si["a"]});var _i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("v-row",{staticClass:"mb-6",attrs:{"no-gutters":"",justify:"end"}},[n("modal",{attrs:{title:"Add Contact",width:"840px"},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on,a=t.attrs;return[n("btn",e._g(e._b({directives:[{name:"show",rawName:"v-show",value:e.showAddContactBtn,expression:"showAddContactBtn"}],attrs:{width:"180"}},"btn",a,!1),i),[e._v("Add Contact")])]}},{key:"default",fn:function(t){var i=t.close;return[n("add-contact",{attrs:{client:e.client},on:{done:i}})]}}])})],1),n("v-row",{attrs:{"no-gutters":""}},[n("contact-list",{attrs:{client:e.client,contacts:e.client&&e.client.contacts||[],loadiing:e.loading}})],1),n("v-row",{staticClass:"mt-12",attrs:{"no-gutters":"",justify:"end"}},[n("v-col",{attrs:{"justify-self":"start"}},[n("btn",{attrs:{width:"100","color-type":"accent"},on:{click:e.onBackClick}},[e._v("Back")])],1),n("v-col",{attrs:{cols:"auto"}},[n("btn",{attrs:{width:"100","color-type":"accent"},on:{click:e.onNextClick}},[e._v("Next")])],1)],1)],1)},wi=[],xi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ApolloMutation",e._g({staticClass:"add-contact-form",attrs:{mutation:e.ADD_CONTACT_MUTATION,variables:{input:Object.assign({},e.contact,{phones:e.contact.phones.filter((function(e){return e.type})).map((function(e){return{typeId:e.type.id,phone:e.phone}})),countYearsTogether:Number(e.contact.countYearsTogether)||null,clientId:e.client&&e.client.id||null})},update:e.updateContacts},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.mutate,a=t.loading,o=t.error;return[a?e._e():n("alert",{attrs:{align:"center",error:o}}),n("contact-form",e._b({on:{submit:function(e){return i()}}},"contact-form",{btnLabel:"Add",loading:a,contact:e.contact},!1))]}}])},e.$listeners))},Ei=[],Fi=n("2909"),Oi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-form",{ref:"form",staticClass:"contact-form",attrs:{"lazy-validation":"","aria-busy":e.loading,disabled:e.loading,autocomplete:"off"},on:{submit:function(t){return t.preventDefault(),e.onSubmit(t)}}},[n("alert",{attrs:{error:e.error}}),n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"contact-general-form"},[n("h3",[e._v("GENERAL INFO")]),n("v-text-field",{attrs:{rules:e.nameRules,label:"Name",required:"","validate-on-blur":"",autofocus:"",autocomplete:"off"},model:{value:e.contact.name,callback:function(t){e.$set(e.contact,"name",t)},expression:"contact.name"}}),n("v-text-field",{staticClass:"mt-1",attrs:{rules:e.jobTitleRules,label:"Job Title",required:"",autocomplete:"off","validate-on-blur":""},model:{value:e.contact.jobTitle,callback:function(t){e.$set(e.contact,"jobTitle",t)},expression:"contact.jobTitle"}}),n("v-text-field",{staticClass:"mt-1",attrs:{rules:e.emailRules,label:"Email",autocomplete:"off","validate-on-blur":""},model:{value:e.contact.email,callback:function(t){e.$set(e.contact,"email",t)},expression:"contact.email"}}),n("v-textarea",{staticClass:"mt-1",attrs:{rows:"1","auto-grow":"",label:"Facility/Location of Contacts",autocomplete:"off","validate-on-blur":""},model:{value:e.contact.location,callback:function(t){e.$set(e.contact,"location",t)},expression:"contact.location"}}),n("number-text-field",{staticClass:"mt-1",attrs:{label:"Number of Years With Employer",autocomplete:"off","validate-on-blur":""},model:{value:e.contact.countYearsTogether,callback:function(t){e.$set(e.contact,"countYearsTogether",t)},expression:"contact.countYearsTogether"}})],1),n("v-col",{staticClass:"contact-phones-container",attrs:{offset:"2"}},[n("h3",[e._v("Phone Numbers")]),n("div",{staticClass:"contact-phones"},[e._l(e.contact.phones,(function(t,i){return[n("v-row",{key:i,attrs:{"no-gutters":""}},[n("v-col",[n("v-select",{attrs:{clearable:"","item-text":"name",items:e.phoneTypes,rules:e.phoneTypeRules(t),label:"Phone Number Type"},on:{input:function(n){return t.type=e.phoneTypes.find((function(e){return e.name===n}))||null}},model:{value:t.type,callback:function(n){e.$set(t,"type",n)},expression:"item.type"}}),n("v-text-field",{attrs:{rules:e.phoneRules(t),label:"Phone",autocomplete:"off","validate-on-blur":""},model:{value:t.phone,callback:function(n){e.$set(t,"phone",n)},expression:"item.phone"}})],1),n("v-col",{attrs:{offset:"1",cols:"auto"}},[n("btn",{staticClass:"mt-2",attrs:{icon:"","color-type":"secondary"},on:{click:function(t){return e.onPhoneClick(i)}}},[n("v-icon",0===i?[e._v("fa-plus")]:[e._v("fa-minus")])],1)],1)],1)]}))],2)])],1),n("div",{staticClass:"mt-8 btns-bar"},[n("btn",{attrs:{type:"submit",width:"300",disabled:e.loading}},[e._v(e._s(e.btnLabel))])],1)],1)},Ii=[],Ti=(n("a434"),n("ec2a")),Di=n.n(Ti),Ai={name:"ContactForm",components:{Btn:Oe["a"],NumberTextField:hi["a"]},props:{btnLabel:{type:String,required:!0},loading:{type:Boolean,default:!1},contact:{type:Object}},apollo:{phoneTypes:{query:Di.a,fetchPolicy:"cache-first",error:function(e){this.error=e.networkError?Object(m["a"])(Object(m["a"])({},e),{},{message:"Something went wrong! Could not load phone type list."}):e}}},data:function(){return{nameRules:[function(e){return!!e||"Name is Required"}],jobTitleRules:[function(e){return!!e||"Job Title is Required"}],emailRules:[ae["a"].email],phoneTypes:[],error:null}},methods:{phoneTypeRules:function(e){return[function(t){return null===t&&(null===e.phone||""===e.phone)||null!==t||"Phone Type is Required"}]},phoneRules:function(e){return[function(t){return(null===t||""===t)&&(null===e.type||""===e.type)||null!==t&&""!==t||"Phone is Required"}]},validate:function(){return this.$refs.form.validate()},onSubmit:function(){this.validate()&&this.$emit("submit",this.contact)},onPhoneClick:function(e){0===e?this.contact.phones.push({type:null,phone:null}):this.contact.phones.splice(e,1)}}},Pi=Ai,$i=(n("5b6e"),Object(S["a"])(Pi,Oi,Ii,!1,null,null,null)),Vi=$i.exports;N()($i,{VCol:lt["a"],VForm:le["a"],VIcon:_["a"],VRow:se["a"],VSelect:ki["a"],VTextField:ce["a"],VTextarea:Si["a"]});var ji=n("17a3"),Li=n.n(ji),Ri={name:"AddContact",components:{ContactForm:Vi},props:{client:{type:Object,default:null}},data:function(){return{ADD_CONTACT_MUTATION:Li.a,contact:{name:null,jobTitle:null,phones:[{type:null,phone:null}],email:null,location:null,countYearsTogether:null}}},methods:{updateContacts:function(e,t){var n=t.data.addContact;if(n){var i=Object(Fi["a"])(this.client.contacts);i.push(n),this.client.contacts=i,He["a"].$emit("show-snackbar",{color:"success",text:"Contact ".concat(n.name," was added successfully!")})}else He["a"].$emit("show-snackbar",{color:"error",text:"Error! Something went wrong... Please try later!"})}}},Ui=Ri,qi=(n("d361"),Object(S["a"])(Ui,xi,Ei,!1,null,null,null)),Bi=qi.exports,Mi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("data-table",{staticClass:"contact-list",attrs:{items:e.displayedItems,headers:e.displayedHeaders,"hide-default-footer":!0,"disable-pagination":!0,"item-key":"id",loading:e.loading},scopedSlots:e._u([{key:"item.actions",fn:function(t){var i=t.item;return[n("div",{staticClass:"table-actions-bar"},[n("modal",{attrs:{title:"Edit Contact",width:"840px"},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on,a=t.attrs;return[e.showEditBtn?n("v-icon",e._g(e._b({staticClass:"action edit mr-2",attrs:{small:""}},"v-icon",a,!1),i),[e._v("far fa-edit")]):e._e()]}},{key:"default",fn:function(t){var a=t.close;return[n("edit-contact",{attrs:{client:e.client,data:i},on:{done:a}})]}}],null,!0)}),e.showDeleteBtn?n("confirmation-modal",{attrs:{mutation:e.DELETE_CONTACT_MUTATION,variables:{id:i.id},title:"Delete Contact",message:"Are you sure you want to delete contact?","ok-btn":{label:"Delete"},update:e.onDelete(i)},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.on,a=t.attrs;return[n("v-icon",e._g(e._b({staticClass:"action",attrs:{small:""}},"v-icon",{attrs:a},!1),i),[e._v(" far fa-trash-alt ")])]}}],null,!0)}):e._e()],1)]}}])})},Yi=[],Gi=n("f7e4"),zi=n.n(Gi),Hi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ApolloMutation",e._g({staticClass:"update-contact-form",attrs:{mutation:e.UPDATE_CONTACT_MUTATION,variables:{input:Object.assign({},e.contact,{phone:void 0,phones:e.contact.phones.filter((function(e){return e.type})).map((function(e){return{typeId:e.type.id,phone:e.phone}})),countYearsTogether:Number(e.contact.countYearsTogether)||null})},update:e.updateContacts},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.mutate,a=t.loading,o=t.error;return[a?e._e():n("alert",{attrs:{align:"center",error:o}}),n("contact-form",e._b({on:{submit:function(e){return i()}}},"contact-form",{btnLabel:"Update",loading:a,contact:e.contact},!1))]}}])},e.$listeners))},Qi=[],Wi=(n("c740"),n("94e1")),Ji=n.n(Wi),Xi={name:"EditContact",components:{ContactForm:Vi},props:{client:{type:Object,default:null},data:{type:Object,default:null}},data:function(){return{UPDATE_CONTACT_MUTATION:Ji.a,contact:this.data&&Object(m["a"])(Object(m["a"])({},this.data),{},{phones:this.data.phones.length>0?this.data.phones:[{type:null,phone:null}]})||{name:null,jobTitle:null,phones:[{type:null,phone:null}],email:null,location:null,countYearsTogether:null}}},watch:{data:function(e){this.contact=Object(m["a"])({},e)}},methods:{updateContacts:function(e,t){var n=t.data.updateContact;if(n){var i=this.client.contacts.findIndex((function(e){return e.id===n.id}));-1!==i&&(this.client.contacts[i]=n,this.client.contacts=Object(Fi["a"])(this.client.contacts)),He["a"].$emit("show-snackbar",{color:"success",text:"Contact ".concat(n.name," was updated successfully!")})}else He["a"].$emit("show-snackbar",{color:"error",text:"Error! Something went wrong... Please try later!"})}}},Zi=Xi,Ki=(n("2bd3"),Object(S["a"])(Zi,Hi,Qi,!1,null,null,null)),ea=Ki.exports,ta={name:"ContactList",components:{Btn:Oe["a"],DataTable:$e["a"],ConfirmationModal:Le["a"],Modal:Ie["a"],EditContact:ea},props:{client:{type:Object,default:null},contacts:{type:Array,default:[]},loading:{type:Boolean}},apollo:{currentUser:{query:y.a,fetchPolicy:"cache-only"}},data:function(){return{DELETE_CONTACT_MUTATION:zi.a,currentUser:null,headers:[{text:"Name",value:"name",type:"text",dataType:"string",width:"150px"},{text:"Job Title",value:"jobTitle",type:"text",dataType:"string",width:"100px"},{text:"Phone",value:"phone",type:"text",dataType:"string",width:"120px"},{text:"Email",value:"email",type:"text",dataType:"string",width:"150px"},{text:"Facility/Location of Contact",value:"location",type:"text",dataType:"string",width:"180px"},{text:"Number of Years With Employer",value:"countYearsTogether",type:"number",dataType:"number",width:"150px"},{text:"Actions",value:"actions",sortable:!1,width:"53px",fixed:!0,permissions:[f["c"].EDIT_CONTACT,f["c"].DELETE_CONTACT]}]}},computed:{displayedItems:function(){return this.contacts.map((function(e){return Object(m["a"])(Object(m["a"])({},e),{},{phone:e.phones&&e.phones.length>0?e.phones[0].phone:null})}))},displayedHeaders:function(){var e=this;return this.headers.filter((function(t){return!t.permissions||t.permissions.some((function(t){return Object(b["a"])(t,e.currentUser)}))}))},showEditBtn:function(){return Object(b["a"])(f["c"].EDIT_CONTACT,this.currentUser)},showDeleteBtn:function(){return Object(b["a"])(f["c"].DELETE_CONTACT,this.currentUser)}},methods:{onDelete:function(e){var t=this;return function(n,i){var a=i.data.deleteContact;a&&(t.client.contacts=t.client.contacts.filter((function(t){return t.id!==e.id})),He["a"].$emit("show-snackbar",{color:"success",text:"Contact was deleted successfully!"}))}}}},na=ta,ia=Object(S["a"])(na,Mi,Yi,!1,null,null,null),aa=ia.exports;N()(ia,{VIcon:_["a"]});var oa={name:"Contacts",components:{Btn:Oe["a"],Modal:Ie["a"],AddContact:Bi,ContactList:aa},props:{client:{type:Object,default:null},loading:{type:Boolean}},apollo:{currentUser:{query:y.a,fetchPolicy:"cache-only"}},data:function(){return{currentUser:null}},computed:{showAddContactBtn:function(){return Object(b["a"])(f["c"].ADD_CONTACT,this.currentUser)}},methods:{onNextClick:function(){this.$emit("done")},onBackClick:function(){this.$emit("back")}}},ra=oa,la=Object(S["a"])(ra,_i,wi,!1,null,null,null),sa=la.exports;N()(la,{VCol:lt["a"],VRow:se["a"]});var ca=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("v-row",{staticClass:"mb-6",attrs:{"no-gutters":"",justify:"end"}},[n("modal",{attrs:{title:"Add Facility",width:"812px"},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on,a=t.attrs;return[n("btn",e._g(e._b({directives:[{name:"show",rawName:"v-show",value:e.showAddFacilityBtn,expression:"showAddFacilityBtn"}],attrs:{width:"180"}},"btn",a,!1),i),[e._v("Add Facility")])]}},{key:"default",fn:function(t){var i=t.close;return[n("add-facility",{attrs:{client:e.client},on:{done:i}})]}}])})],1),n("v-row",{attrs:{"no-gutters":""}},[n("facility-list",{attrs:{client:e.client,facilities:e.client&&e.client.facilities||[],readonly:!1,loading:e.loading}})],1),n("v-row",{staticClass:"mt-12",attrs:{"no-gutters":"",justify:"end"}},[n("v-col",{attrs:{"justify-self":"start"}},[n("btn",{attrs:{width:"100","color-type":"accent"},on:{click:e.onBackClick}},[e._v("Back")])],1),n("v-col",{attrs:{cols:"auto"}},[n("btn",{attrs:{width:"100","color-type":"accent"},on:{click:e.onNextClick}},[e._v("Next")])],1)],1)],1)},da=[],ua=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ApolloMutation",e._g({staticClass:"add-facility-form",attrs:{mutation:e.ADD_FACILITY_MUTATION,variables:{input:{name:e.facility.name,squareFootage:e.facility.squareFootage,age:e.facility.age,occupancy:e.facility.occupancy,capacity:e.facility.capacity,use:e.facility.use,siteSize:e.facility.siteSize,replacementCost:e.facility.replacementCost,photoFile:e.facility.photoFile,summary:e.facility.summary,clientId:e.client&&e.client.id||null}},update:e.updateFacilities},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.mutate,a=t.loading,o=t.error;return[a?e._e():n("alert",{attrs:{align:"center",error:o}}),n("facility-form",e._b({on:{submit:function(t){return e.onSubmit(i)}}},"facility-form",{btnLabel:"Add",loading:a,facility:e.facility},!1))]}}])},e.$listeners))},ma=[],fa=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-form",{ref:"form",staticClass:"facility-form",attrs:{"lazy-validation":"","aria-busy":e.loading,disabled:e.loading,autocomplete:"off"},on:{submit:function(t){return t.preventDefault(),e.onSubmit(t)}}},[n("v-row",{attrs:{"no-gutters":""}},[n("v-col",[n("v-text-field",{attrs:{rules:e.nameRules,label:"Name",required:"","validate-on-blur":"",autofocus:"",autocomplete:"off"},model:{value:e.facility.name,callback:function(t){e.$set(e.facility,"name",t)},expression:"facility.name"}}),n("number-text-field",{staticClass:"mt-1",attrs:{label:"Square Footage",autocomplete:"off"},model:{value:e.facility.squareFootage,callback:function(t){e.$set(e.facility,"squareFootage",e._n(t))},expression:"facility.squareFootage"}}),n("v-text-field",{staticClass:"mt-1",attrs:{label:"Age(s) of Facility",autocomplete:"off"},model:{value:e.facility.age,callback:function(t){e.$set(e.facility,"age",t)},expression:"facility.age"}}),n("number-text-field",{staticClass:"mt-1",attrs:{rules:[e.positiveNumber,e.integerNumber],label:"Occupancy","validate-on-blur":"",autocomplete:"off"},model:{value:e.facility.occupancy,callback:function(t){e.$set(e.facility,"occupancy",e._n(t))},expression:"facility.occupancy"}}),n("number-text-field",{staticClass:"mt-1",attrs:{rules:[e.positiveNumber,e.integerNumber],label:"Capacity",autocomplete:"off","validate-on-blur":""},model:{value:e.facility.capacity,callback:function(t){e.$set(e.facility,"capacity",e._n(t))},expression:"facility.capacity"}})],1),n("v-col",{attrs:{offset:"1"}},[n("v-text-field",{attrs:{label:"Use",autocomplete:"off"},model:{value:e.facility.use,callback:function(t){e.$set(e.facility,"use",t)},expression:"facility.use"}}),n("number-text-field",{staticClass:"mt-1",attrs:{rules:[e.positiveNumber,e.floatNumber(1)],label:"Site Acres",autocomplete:"off","validate-on-blur":""},model:{value:e.facility.siteSize,callback:function(t){e.$set(e.facility,"siteSize",e._n(t))},expression:"facility.siteSize"}}),n("number-text-field",{staticClass:"mt-1",attrs:{rules:[e.positiveNumber,e.integerNumber],label:"Replacement Cost, $",autocomplete:"off","validate-on-blur":""},model:{value:e.facility.replacementCost,callback:function(t){e.$set(e.facility,"replacementCost",e._n(t))},expression:"facility.replacementCost"}}),n("v-textarea",{staticClass:"mt-1",attrs:{rows:"1","auto-grow":"",label:"Summary of Facility",autocomplete:"off"},model:{value:e.facility.summary,callback:function(t){e.$set(e.facility,"summary",t)},expression:"facility.summary"}}),n("upload",{staticClass:"mt-4",attrs:{placeholder:"Upload Facility Photo",accept:".pdf,image/*"},model:{value:e.upload,callback:function(t){e.upload=t},expression:"upload"}})],1)],1),n("div",{staticClass:"mt-8 btns-bar"},[n("btn",{attrs:{type:"submit",width:"300",disabled:e.loading}},[e._v(e._s(e.btnLabel))])],1)],1)},pa=[],va={name:"FacilityForm",components:{Btn:Oe["a"],NumberTextField:hi["a"],Upload:vi},props:{btnLabel:{type:String,required:!0},loading:{type:Boolean,default:!1},facility:{type:Object}},data:function(e){var t=e.facility.urlPhotos?new File([""],e.facility.urlPhotos,{type:"image/plain"}):null;return Object(m["a"])(Object(m["a"])({},ae["a"]),{},{currentUser:null,upload:t,nameRules:[function(e){return!!e||"Name is Required"}]})},methods:{validate:function(){return this.$refs.form.validate()},onSubmit:function(){this.validate()&&(this.upload&&this.upload.name!==this.facility.urlPhotos&&(this.facility.photoFile=this.upload,this.facility.urlPhotos=""),this.$emit("submit",this.facility))}}},ha=va,ya=(n("c90a"),Object(S["a"])(ha,fa,pa,!1,null,null,null)),ba=ya.exports;N()(ya,{VCol:lt["a"],VForm:le["a"],VRow:se["a"],VTextField:ce["a"],VTextarea:Si["a"]});var ga=n("e194"),ka=n.n(ga),Sa={name:"AddFacility",components:{FacilityForm:ba},props:{client:{type:Object,default:null}},data:function(){return{ADD_FACILITY_MUTATION:ka.a,facility:{name:null,squareFootage:null,age:null,occupancy:null,capacity:null,use:null,siteSize:null,replacementCost:null,photoFile:null,summary:null}}},methods:{onSubmit:function(e){this.facility=Object(m["a"])({},this.facility),this.$nextTick((function(){e()}))},updateFacilities:function(e,t){var n=t.data.addFacility;if(n){var i=Object(Fi["a"])(this.client.facilities);i.unshift(n),this.client.facilities=i,He["a"].$emit("show-snackbar",{color:"success",text:"Facility ".concat(n.name," was added successfully!")})}else He["a"].$emit("show-snackbar",{color:"error",text:"Error! Something went wrong... Please try later!"})}}},Ca=Sa,Na=(n("af2a"),Object(S["a"])(Ca,ua,ma,!1,null,null,null)),_a=Na.exports,wa=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("data-table",{staticClass:"facility-list",attrs:{items:e.displayedItems,headers:e.displayedHeaders,height:"611px","item-key":"id",loading:e.loading},scopedSlots:e._u([{key:"item.urlPhotos",fn:function(t){var i=t.item;return[i.urlPhotos?n("a",{attrs:{href:i.urlPhotos,target:"_blank"}},[e._v("Link to Photos")]):e._e()]}},{key:"item.actions",fn:function(t){var i=t.item;return[n("div",{staticClass:"table-actions-bar"},[n("modal",{attrs:{title:"Edit Facility",width:"812px"},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on,a=t.attrs;return[e.showEditBtn?n("v-icon",e._g(e._b({staticClass:"action edit mr-2",attrs:{small:""}},"v-icon",a,!1),i),[e._v("far fa-edit")]):e._e()]}},{key:"default",fn:function(t){var a=t.close;return[n("edit-facility",{attrs:{client:e.client,data:i},on:{done:a}})]}}],null,!0)}),e.showDeleteBtn?n("confirmation-modal",{attrs:{mutation:e.DELETE_FACILITY_MUTATION,variables:{id:i.id},title:"Delete Facility",message:"Are you sure you want to delete facility?","ok-btn":{label:"Delete"},update:e.onDelete(i)},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.on,a=t.attrs;return[n("v-icon",e._g(e._b({staticClass:"action",attrs:{small:""}},"v-icon",{attrs:a},!1),i),[e._v(" far fa-trash-alt ")])]}}],null,!0)}):e._e()],1)]}}])})},xa=[],Ea=(n("99af"),n("0737")),Fa=n.n(Ea),Oa=n("ea34"),Ia=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ApolloMutation",e._g({staticClass:"update-facility-form",attrs:{mutation:e.UPDATE_FACILITY_MUTATION,variables:{input:{id:e.facility.id,name:e.facility.name,squareFootage:e.facility.squareFootage,age:e.facility.age,occupancy:e.facility.occupancy,capacity:e.facility.capacity,use:e.facility.use,siteSize:e.facility.siteSize,replacementCost:e.facility.replacementCost,photoFile:e.facility.photoFile,summary:e.facility.summary}},update:e.updateFacilities},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.mutate,a=t.loading,o=t.error;return[a?e._e():n("alert",{attrs:{align:"center",error:o}}),n("facility-form",e._b({on:{submit:function(t){return e.onSubmit(i)}}},"facility-form",{btnLabel:"Update",loading:a,facility:e.facility},!1))]}}])},e.$listeners))},Ta=[],Da=n("502f"),Aa=n.n(Da),Pa={name:"EditFacility",components:{FacilityForm:ba},props:{client:{type:Object,default:null},data:{type:Object,default:null}},data:function(){return{UPDATE_FACILITY_MUTATION:Aa.a,facility:this.data&&Object(m["a"])({},this.data)||{name:"",squareFootage:null,age:"",occupancy:null,capacity:null,use:"",siteSize:null,replacementCost:null,photoFile:null,summary:""}}},watch:{data:function(e){this.facility=Object(m["a"])({},e)}},methods:{onSubmit:function(e){this.facility=Object(m["a"])({},this.facility),this.$nextTick((function(){e()}))},updateFacilities:function(e,t){var n=t.data.updateFacility;if(n){var i=this.client.facilities.findIndex((function(e){return e.id===n.id}));-1!==i&&(this.client.facilities[i]=n,this.client.facilities=Object(Fi["a"])(this.client.facilities)),He["a"].$emit("show-snackbar",{color:"success",text:"Facility ".concat(n.name," was updated successfully!")})}else He["a"].$emit("show-snackbar",{color:"error",text:"Error! Something went wrong... Please try later!"})}}},$a=Pa,Va=(n("7aa9"),Object(S["a"])($a,Ia,Ta,!1,null,null,null)),ja=Va.exports,La={name:"FacilityList",components:{Btn:Oe["a"],DataTable:$e["a"],ConfirmationModal:Le["a"],Modal:Ie["a"],EditFacility:ja,TruncatedText:Oa["a"]},props:{client:{type:Object,default:null},facilities:{type:Array,default:[]},loading:{type:Boolean},readonly:{type:Boolean,default:!0}},apollo:{currentUser:{query:y.a,fetchPolicy:"cache-only"}},data:function(e){return{DELETE_FACILITY_MUTATION:Fa.a,currentUser:null,headers:[{text:"Name",value:"name",type:"text",dataType:"string",width:"180px",fixed:!0},{text:"Square Footage",value:"squareFootage",type:"number",dataType:"number",width:"80px"},{text:"Age(s) of Facility",value:"age",type:"text",dataType:"string",width:"120px"},{text:"Occupancy",value:"occupancy",type:"number",dataType:"number",width:"80px"},{text:"Capacity",value:"capacity",type:"number",dataType:"number",width:"80px"},{text:"Use",value:"use",type:"text",dataType:"string",width:"100px"},{text:"Site Acres",value:"siteSize",type:"number",dataType:"number",width:"80px"},{text:"Replacement Cost",value:"replacementCost",type:"number",dataType:"currency",width:"100px"},{text:"Link to Facility Photos",value:"urlPhotos",width:"130px"},{text:"Summary of Facility",value:"summary",type:"text",dataType:"longstring",width:"200px"}].concat(Object(Fi["a"])(e.readonly?[]:[{text:"Actions",value:"actions",sortable:!1,width:"53px",fixed:!0,permissions:[f["c"].EDIT_FACILITY,f["c"].DELETE_FACILITY]}]))}},computed:{displayedItems:function(){return this.facilities},displayedHeaders:function(){var e=this;return this.headers.filter((function(t){return!t.permissions||t.permissions.some((function(t){return Object(b["a"])(t,e.currentUser)}))}))},showEditBtn:function(){return Object(b["a"])(f["c"].EDIT_FACILITY,this.currentUser)},showDeleteBtn:function(){return Object(b["a"])(f["c"].DELETE_FACILITY,this.currentUser)}},methods:{onDelete:function(e){var t=this;return function(n,i){var a=i.data.deleteFacility;a&&(t.client.facilities=t.client.facilities.filter((function(t){return t.id!==e.id})),He["a"].$emit("show-snackbar",{color:"success",text:"Facility was deleted successfully!"}))}}}},Ra=La,Ua=Object(S["a"])(Ra,wa,xa,!1,null,null,null),qa=Ua.exports;N()(Ua,{VIcon:_["a"]});var Ba={name:"Facilities",components:{Btn:Oe["a"],Modal:Ie["a"],AddFacility:_a,FacilityList:qa},props:{client:{type:Object,default:null},loading:{type:Boolean}},apollo:{currentUser:{query:y.a,fetchPolicy:"cache-only"}},data:function(){return{currentUser:null}},computed:{showAddFacilityBtn:function(){return Object(b["a"])(f["c"].ADD_FACILITY,this.currentUser)}},methods:{onNextClick:function(){this.$emit("done")},onBackClick:function(){this.$emit("back")}}},Ma=Ba,Ya=Object(S["a"])(Ma,ca,da,!1,null,null,null),Ga=Ya.exports;N()(Ya,{VCol:lt["a"],VRow:se["a"]});var za=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("v-row",{staticClass:"mb-6 summary-content",attrs:{"no-gutters":""}},[n("client-info",{attrs:{client:e.client,loading:e.loading,"hide-plans":""}})],1),n("v-row",{staticClass:"mt-12",attrs:{"no-gutters":"",justify:"end"}},[n("v-col",{attrs:{"justify-self":"start"}},[n("btn",{attrs:{width:"100","color-type":"accent"},on:{click:e.onBackClick}},[e._v("Back")])],1),e.showCreatePlan?n("v-col",{attrs:{cols:"auto"}},[n("btn",{staticClass:"mr-6",attrs:{width:"180",link:"",to:{name:"create-plan",params:{clientId:e.client.id}},"color-type":"primary"}},[e._v("Create Plan")])],1):e._e(),n("v-col",{attrs:{cols:"auto"}},[n("btn",{attrs:{width:"100",to:e.redirectLink,link:"","color-type":"accent"}},[e._v("Done")])],1)],1)],1)},Ha=[],Qa=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-expansion-panels",{attrs:{flat:"",value:e.expanded}},[n("v-expansion-panel",[n("expansion-panel-header",[e._v(" General Information ")]),n("v-expansion-panel-content",[e.client?n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"general-info"},[n("definition-list",{attrs:{data:e.client,labels:e.generalInfoLabels}})],1),n("v-col",{attrs:{offset:"1"}},[n("v-img",{staticClass:"logo",attrs:{contain:"",src:e.client&&e.client.logoUrl||"",rounded:"",alt:"Logo Image"},scopedSlots:e._u([{key:"placeholder",fn:function(){return[n("div",{staticClass:"image-placeholder"},[e._v("Logo Image")])]},proxy:!0}],null,!1,4065266705)})],1)],1):n("v-row",{staticClass:"loader",class:{"-loaded":!e.loading},attrs:{"no-gutters":""}},[e._v("No information")])],1)],1),n("v-expansion-panel",[n("expansion-panel-header",[e._v(" Contacts ")]),n("v-expansion-panel-content",[e.client&&e.client.contacts&&e.client.contacts.length>0?n("v-row",{staticClass:"contacts",attrs:{"align-content":"space-between"}},e._l(e.client.contacts,(function(t){return n("v-col",{key:t.id},[n("definition-list",{staticClass:"contact-details",attrs:{data:t,labels:e.contactInfoLabels}})],1)})),1):n("p",{staticClass:"loader",class:{"-loaded":!e.loading}},[e._v("No contacts")])],1)],1),n("v-expansion-panel",[n("expansion-panel-header",[e._v(" Facilities ")]),n("v-expansion-panel-content",[e.facilities.length>0||e.loading?n("facility-list",{attrs:{client:e.client,loading:e.loading,facilities:e.facilities}}):n("p",[e._v("No facilities")])],1)],1),n("v-expansion-panel",[n("expansion-panel-header",[e._v(" Documents ")]),n("v-expansion-panel-content",[e.documents.length>0||e.loading?n("file-list",{attrs:{list:e.documents,loading:e.loading}}):n("p",[e._v("No documents")])],1)],1),!e.hidePlans&&e.canViewPlans?n("v-expansion-panel",[n("expansion-panel-header",[e._v(" Plans ")]),n("v-expansion-panel-content",[n("alert",{attrs:{error:e.error}}),e.displayedPlans.length>0||e.loading?n("data-table",{staticClass:"plans",attrs:{items:e.displayedPlans,headers:e.planHeaders,"hide-default-footer":"","disable-pagination":"","item-key":"id",loading:e.loading},scopedSlots:e._u([{key:"item.name",fn:function(t){var i=t.item;return[i.canViewDetails?n("router-link",{staticClass:"date-cell",attrs:{to:{name:"plan-details",params:{planId:i.id}}}},[e._v(" "+e._s(i.name)+" ")]):e._e()]}},{key:"item.dateOfCreation",fn:function(t){var i=t.item;return[n("span",{staticClass:"date-cell"},[n("span",{staticClass:"date"},[e._v(e._s(e._f("utcDate")(i.dateOfCreation)))])])]}},{key:"item.updatedAt",fn:function(t){var i=t.item;return[n("span",{staticClass:"date-cell"},[n("span",{staticClass:"date"},[e._v(e._s(e._f("date")(i.updatedAt)))]),e._v(" "),n("span",{staticClass:"time"},[e._v(e._s(e._f("time")(i.updatedAt)))])])]}}],null,!1,1973723e3)}):n("p",[e._v("No plans")])],1)],1):e._e()],1)},Wa=[],Ja=n("e3c2"),Xa=n("7c734"),Za=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.list&&e.list.length?n("div",[e._l(e.list,(function(t){return[t.link?n("v-list-item",{key:t.link},[n("v-list-item-icon",[n("v-icon",{attrs:{size:"16"}},[e._v("fa-file-alt")])],1),n("v-list-item-content",[n("v-list-item-title",[n("a",{attrs:{href:t.link,download:t.link,target:"_blank"}},[e._v(e._s(t.name||t.link))])])],1)],1):e._e()]}))],2):e._e()},Ka=[],eo={name:"FileList",props:{list:Array,loading:Boolean}},to=eo,no=Object(S["a"])(to,Za,Ka,!1,null,null,null),io=no.exports;N()(no,{VIcon:_["a"],VListItem:x["a"],VListItemContent:E["a"],VListItemIcon:F["a"],VListItemTitle:E["b"]});var ao={name:"ClientInfo",components:{Btn:Oe["a"],ExpansionPanelHeader:Ja["a"],DefinitionList:Xa["a"],DataTable:$e["a"],FacilityList:qa,FileList:io},props:{client:{type:Object,default:null},hidePlans:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},apollo:{currentUser:{query:y.a,fetchPolicy:"cache-first"}},data:function(){return{currentUser:null,expanded:0,error:null,generalInfoLabels:[{label:"Name",value:"name"},{label:"District/Department Number",value:"district"},{label:"Address Line",value:"address"},{label:"City",value:"city"},{label:"State",value:"state"},{label:"Zip Code",value:"zip"},{label:"County",value:"county"},{label:"ICS Responsible Office",value:"icsOffice.name"},{label:"Client Type",value:"clientType.name"},{label:"Client Summary",value:"description",type:"longstring"}],contactInfoLabels:[{label:"Name",value:"name"},{label:"Job Title",value:"jobTitle"},{label:"Phone",labelName:"type.name",value:"phones",type:"list",valueName:"phone"},{label:"Email",value:"email"},{label:"Facility/Location of Contact",value:"location"},{label:"Number of Year With Employee",value:"countYearsTogether"}],planHeaders:[{text:"Name",value:"name",type:"text",dataType:"string",width:"150px",fixed:!0},{text:"Current Plan",value:"isCurrent",type:"select",dataType:"string",width:"100px",options:["Yes","No"]},{text:"Date of Creation",value:"dateOfCreation",type:"date",dataType:"date",width:"150px"},{text:"Plan Type",value:"planType",type:"select",dataType:"string",width:"100px"},{text:"Creator",value:"creatorName",type:"select",dataType:"string",width:"120px"},{text:"Editor",value:"editorName",type:"select",dataType:"string",width:"150px"},{text:"Last Updated",value:"updatedAt",type:"date",dataType:"date",width:"180px"}]}},computed:{canViewPlans:function(){return Object(b["a"])(f["c"].VIEW_PLAN,this.currentUser)},facilities:function(){return this.client?this.client.facilities:[]},documents:function(){return this.client&&Array.isArray(this.client.documents)?this.client.documents.map((function(e){return{link:e.documentUrl,name:e.name||e.documentUrl}})):[]},displayedPlans:function(){var e=this;return this.client&&this.client.plans?this.client.plans.map((function(t){return Object(m["a"])(Object(m["a"])({},t),{},{creatorName:t.createdBy&&t.createdBy.username||"",planType:t.financialInfo&&t.financialInfo.typeOfPlan&&t.financialInfo.typeOfPlan.name||"",editorName:t.editedBy&&t.editedBy.username||"",canViewDetails:Object(b["a"])(f["c"].VIEW_PLAN,e.currentUser),isCurrent:t.isCurrent?"Yes":"No"})})):[]}}},oo=ao,ro=(n("1863"),n("cd55")),lo=n("49e2"),so=n("0393"),co=Object(S["a"])(oo,Qa,Wa,!1,null,"156d81b2",null),uo=co.exports;N()(co,{VCol:lt["a"],VExpansionPanel:ro["a"],VExpansionPanelContent:lo["a"],VExpansionPanels:so["a"],VImg:P["a"],VRow:se["a"]});var mo={name:"ClientSummary",components:{Btn:Oe["a"],ClientInfo:uo},apollo:{currentUser:{query:y.a,fetchPolicy:"cache-only"}},props:{client:{type:Object,default:null},loading:{type:Boolean}},data:function(){return{currentUser:null}},computed:{showCreatePlan:function(){return Object(b["a"])(f["c"].CREATE_PLAN,this.currentUser)&&this.client&&this.client.facilities&&this.client.facilities.length>0},redirectLink:function(){return Object(b["a"])(f["c"].VIEW_CLIENTS,this.currentUser)?{name:"clients"}:{name:"client-details",params:{clientId:this.client&&this.client.id}}}},methods:{onBackClick:function(){this.$emit("back")}}},fo=mo,po=(n("cddf"),Object(S["a"])(fo,za,Ha,!1,null,null,null)),vo=po.exports;N()(po,{VCol:lt["a"],VRow:se["a"]});var ho=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"loader -d-loader",class:{"-loaded":e.isLoaded}},[n("v-row",[n("v-col",{attrs:{cols:"12"}},[n("file-input-list",{staticClass:"d-list",attrs:{modal:""},on:{change:e.change,remove:e.remove},model:{value:e.fileList,callback:function(t){e.fileList=t},expression:"fileList"}})],1)],1),n("v-row",{staticClass:"mt-12",attrs:{"no-gutters":"",justify:"end"}},[n("v-col",{attrs:{"justify-self":"start"}},[n("btn",{attrs:{width:"100","color-type":"accent"},on:{click:e.onBackClick}},[e._v("Back")])],1),n("v-col",{attrs:{cols:"auto"}},[n("btn",{attrs:{width:"100","color-type":"accent"},on:{click:e.onNextClick}},[e._v("Next")])],1)],1)],1)},yo=[],bo=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e._l(e.list,(function(t,i){return n("v-list-item",{key:t.name+i},[n("v-list-item-content",{staticClass:"file-input-list__content"},[n("v-file-input",{attrs:{clearable:!1,value:e.list[i],"truncate-length":"100"},on:{change:function(t){return e.change(i,t)}}})],1),i!=e.list.length-1||e.isMax?e._e():n("v-list-item-action",{staticClass:"file-input-list__add"},[n("v-icon",{staticClass:"-cursor-pointer",attrs:{size:"24",color:"accent"},on:{click:e.add}},[e._v(" fa-plus-circle ")])],1),n("v-list-item-action",[n("v-icon",{staticClass:"-cursor-pointer",attrs:{size:"24"},on:{click:function(t){return e.del(i)}}},[e._v(" fa-times-circle ")])],1)],1)})),n("modal",{ref:"modal",attrs:{title:"Delete File","max-width":"480"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.close;return[n("div",{staticClass:"confirmation-modal-content"},[n("p",[e._v("Are you sure you want to delete file?")]),n("div",{staticClass:"mt-8"},[n("div",{staticClass:"zoom-fix"},[n("btn",{attrs:{width:"162","color-type":"accent"},on:{click:i}},[e._v("Cancel")])],1),n("div",{staticClass:"zoom-fix"},[n("btn",{attrs:{width:"162",type:"submit"},on:{click:e.approve}},[e._v("Delete")])],1)])])]}}])})],2)},go=[],ko={name:"FileInputList",components:{Modal:Ie["a"],Btn:Oe["a"]},props:{value:Array,max:Number,loading:Boolean,modal:Boolean},data:function(){return{deleteIndex:-1}},computed:{isMax:function(){return this.list.length+1>this.maxLength},maxLength:function(){return this.max>0?this.max:10},list:function(){var e=Array.isArray(this.value)?this.value.map((function(e){return"string"===typeof e&&(e=new File([""],e,{type:""})),e instanceof File?e:null})).slice(0,this.maxLength).filter((function(e){return e})):[];return e.length?e:[new File([""],"",{type:""})]}},methods:{del:function(e){this.modal&&this.list[e]&&this.list[e].name?(this.deleteIndex=e,this.$refs.modal.modalOpen=!0):this.remove(e)},approve:function(){this.deleteIndex>-1&&this.remove(this.deleteIndex),this.$refs.modal.modalOpen=!1,this.deleteIndex=-1},add:function(){this.list.push(new File([""],"",{type:""})),this.input()},remove:function(e){this.list.splice(e,1),this.$emit("remove",e),this.input()},input:function(){this.$emit("input",this.list.slice())},change:function(e,t){t instanceof File&&(this.list[e]=t,this.input(),this.$emit("change",{index:e,value:t}))}}},So=ko,Co=(n("4c95"),Object(S["a"])(So,bo,go,!1,null,null,null)),No=Co.exports;N()(Co,{VFileInput:ui["a"],VIcon:_["a"],VListItem:x["a"],VListItemAction:st["a"],VListItemContent:E["a"]});var _o=n("a151"),wo=n.n(_o),xo=n("0af4"),Eo=n.n(xo),Fo=n("3010"),Oo=n.n(Fo),Io=n("7514"),To=n.n(Io),Do={name:"Documents",components:{Btn:Oe["a"],FileInputList:No},props:{loading:{type:Boolean},client:{type:Object}},apollo:{currentUser:{query:y.a,fetchPolicy:"cache-only"}},data:function(){return{fileList:[],internalLoading:!1}},watch:{client:{handler:function(){this.updateFileList()},immediate:!0}},computed:{isLoaded:function(){return!this.loading&&!this.internalLoading}},methods:{change:function(e){var t=e.value,n=e.index;if(this.client.id&&t instanceof File&&"number"===typeof n){var i={clientId:this.client.id,documentUrl:"",documentFile:t,name:t.name},a=Eo.a;this.client.documents[n]&&this.client.documents[n].id&&(i.id=this.client.documents[n].id,a=Oo.a),this.uploadFile(i,a,n)}},remove:function(e){this.client.id&&"number"===typeof e&&this.client.documents[e]&&this.client.documents[e].id&&this.removeFile(this.client.documents[e].id)},updateFileList:function(){var e=this;this.fileList=[],this.client&&Array.isArray(this.client.documents)&&this.client.documents.forEach((function(t){t&&(t instanceof File?e.fileList.push(t):(t.name||t.documentUrl)&&e.fileList.push(t.name||t.documentUrl))}))},removeFile:function(e){var t=this;e&&(this.internalLoading=!0,this.$apollo.mutate({mutation:wo.a,variables:{id:e}}).then((function(){He["a"].$emit("show-snackbar",{color:"success",text:"File was removed successfully!"});var n=t.client.documents.findIndex((function(t){return t.id===e}));n>-1&&t.client.documents.splice(n,1)})).catch((function(e){t.error=e})).finally((function(){t.internalLoading=!1})))},uploadFile:function(e,t,n){var i=this;e&&t&&(this.internalLoading=!0,this.$apollo.mutate({mutation:t,variables:{input:e}}).then((function(e){var t=e.data,a=t.addDocument,o=t.updateDocument;He["a"].$emit("show-snackbar",{color:"success",text:"File was uploaded successfully!"}),i.$set(i.client.documents,n,a||o),i.$emit("submit",a||o)})).catch((function(e){He["a"].$emit("show-snackbar",{color:"error",text:"Error upload file. Max size of the file is 20 MB bytes. Please provide another file."}),i.fileList.splice(n,1),i.error=e})).finally((function(){i.internalLoading=!1})))},finalizeDocumentsList:function(){var e=this;this.$apollo.mutate({mutation:To.a,variables:{clientId:this.client.id}}).then((function(t){var n=t.data.documents;e.client.documents=n})).catch((function(t){e.error=t}))},onNextClick:function(){this.finalizeDocumentsList(),this.$emit("done")},onBackClick:function(){this.finalizeDocumentsList(),this.$emit("back")}}},Ao=Do,Po=(n("5c58"),Object(S["a"])(Ao,ho,yo,!1,null,null,null)),$o=Po.exports;N()(Po,{VCol:lt["a"],VRow:se["a"]});var Vo={name:"ClientForm",components:{Stepper:Mn,StepperStep:Xn,ClientGeneralInfoForm:Ni,Contacts:sa,Facilities:Ga,Documents:$o,ClientSummary:vo},props:{client:{type:Object,default:null},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},data:function(){return{step:1,lock:!1,lastCompleted:0,fileInputRules:[function(e){return e&&e.length<11||"You can choose 10 files maximum"}]}},watch:{step:function(e){e>this.lastCompleted&&(this.lastCompleted=e-1)},client:function(e,t){!t&&e&&e.id&&(this.lastCompleted=5)}},methods:{onUpdateClientInfo:function(e){this.step=2,this.lock=!1,this.$emit("submit",e)},onChangeClientInfo:function(){this.lock=!0},onResetChangesClientInfo:function(){this.lock=!1},onUpdateContacts:function(){this.step=3},onUpdateFacilities:function(){this.step=4},onUpdateDocuments:function(){this.step=5}}},jo=Vo,Lo=n("ce7e"),Ro=n("e516"),Uo=n("9c54"),qo=Object(S["a"])(jo,Pn,$n,!1,null,null,null),Bo=qo.exports;N()(qo,{VDivider:Lo["a"],VStepperContent:Ro["a"],VStepperHeader:Uo["a"],VStepperItems:Uo["b"]});var Mo=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-breadcrumbs",e._g(e._b({staticClass:"breadcrumbs",attrs:{items:e.displayedItems}},"v-breadcrumbs",Object.assign({},e.$props,e.$attrs),!1),e.$listeners),[e._t("default")],2)},Yo=[],Go=n("2bc5"),zo=i["a"].extend({mixins:[Go["a"]]}),Ho=zo.extend({name:"Breadcrumbs",components:{VBreadcrumbs:Go["a"]},apollo:{currentUser:{query:y.a,fetchPolicy:"cache-only"}},data:function(){return{currentUser:null}},computed:{displayedItems:function(){var e=this;return this.items.filter((function(t){return!t.permission||t.permission&&Object(b["a"])(t.permission,e.currentUser)}))}}}),Qo=Ho,Wo=(n("c350"),Object(S["a"])(Qo,Mo,Yo,!1,null,null,null)),Jo=Wo.exports;N()(Wo,{VBreadcrumbs:Go["a"]});var Xo={name:"AddClient",components:{ClientForm:Bo,Breadcrumbs:Jo},data:function(){return{client:{name:null,district:null,address:null,city:null,state:null,zip:null,county:null,description:null,icsOffice:null,clientType:null,logoUrl:null,contacts:null,facilities:null},breadcrumbs:[{text:"Clients",to:{name:"clients"},permission:f["c"].VIEW_CLIENTS},{text:"Add Client",disabled:!0}]}},methods:{onSubmit:function(e){this.client=e}}},Zo=Xo,Ko=Object(S["a"])(Zo,Dn,An,!1,null,null,null),er=Ko.exports;N()(Ko,{VCol:lt["a"],VRow:se["a"]});var tr={name:"AddClient",components:{Client:er}},nr=tr,ir=Object(S["a"])(nr,In,Tn,!1,null,null,null),ar=ir.exports,or=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"edit-client"},[n("client",{attrs:{"client-id":e.$route.params.clientId}})],1)},rr=[],lr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("v-row",{staticClass:"mb-1"},[n("v-col",[n("client-breadcrumbs",{attrs:{client:e.client,"is-edit":""}})],1)],1),n("alert",{attrs:{error:e.error}}),n("client-form",{attrs:{client:e.client,disabled:!!e.error,loading:e.loading},on:{submit:e.onSubmit}})],1)},sr=[],cr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("breadcrumbs",{attrs:{items:e.items}})},dr=[],ur={name:"ClientBreadcrumbs",components:{Breadcrumbs:Jo},props:{client:{type:Object},isEdit:{type:Boolean,default:!1}},computed:{items:function(){return[{text:"Clients",to:{name:"clients"},permission:f["c"].VIEW_CLIENTS}].concat(Object(Fi["a"])(this.client?[{text:this.client.name||"",href:"/client-details/"+this.client.id,disabled:!this.isEdit}]:[]),Object(Fi["a"])(this.isEdit?[{text:"Edit Client",disabled:!0}]:[]))}}},mr=ur,fr=Object(S["a"])(mr,cr,dr,!1,null,null,null),pr=fr.exports,vr=n("2f26"),hr=n.n(vr),yr={name:"EditClient",components:{ClientBreadcrumbs:pr,ClientForm:Bo},props:{clientId:{type:Number|String}},apollo:{client:{query:hr.a,variables:function(){return{id:this.clientId}},error:function(e){this.error=e}}},data:function(){return{client:null,error:null}},computed:{loading:function(){return this.$apollo.queries.client.loading}},methods:{onSubmit:function(e){this.client=e}}},br=yr,gr=Object(S["a"])(br,lr,sr,!1,null,null,null),kr=gr.exports;N()(gr,{VCol:lt["a"],VRow:se["a"]});var Sr={name:"EditClient",components:{Client:kr}},Cr=Sr,Nr=Object(S["a"])(Cr,or,rr,!1,null,null,null),_r=Nr.exports,wr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"client-details"},[n("client",{attrs:{clientId:e.$route.params.clientId}})],1)},xr=[],Er=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("v-row",{staticClass:"mb-6"},[n("v-col",[n("client-breadcrumbs",{attrs:{client:e.client}})],1),e.showEditClient&&!e.error?n("v-col",{attrs:{cols:"auto"}},[n("btn",{attrs:{"color-type":"accent",text:"",link:"",to:{name:"client",params:{id:e.client&&e.client.id}},width:"80"}},[e._v("Edit")])],1):e._e(),e.showCreatePlan?n("v-col",{attrs:{cols:"auto"}},[n("btn",{attrs:{link:"",to:{name:"create-plan",params:{clientId:e.client.id}},width:"180"}},[e._v("Create Plan")])],1):e._e()],1),n("alert",{attrs:{error:e.error}}),n("client-info",e._b({},"client-info",{loading:e.loading,client:e.client},!1))],1)},Fr=[],Or={name:"Client",components:{ClientInfo:uo,ClientBreadcrumbs:pr,Btn:Oe["a"]},props:{clientId:{type:Number|String}},apollo:{currentUser:{query:y.a,fetchPolicy:"cache-only"},client:{query:hr.a,variables:function(){return{id:this.clientId}},error:function(e){this.error=e}}},data:function(){return{client:null,currentUser:null,error:null}},computed:{loading:function(){return this.$apollo.queries.client.loading},showCreatePlan:function(){return Object(b["a"])(f["c"].CREATE_PLAN,this.currentUser)&&this.client&&this.client.facilities&&this.client.facilities.length>0},showEditClient:function(){return Object(b["a"])(f["c"].EDIT_CLIENT,this.currentUser)}}},Ir=Or,Tr=Object(S["a"])(Ir,Er,Fr,!1,null,null,null),Dr=Tr.exports;N()(Tr,{VCol:lt["a"],VRow:se["a"]});var Ar={name:"ClientDetails",components:{Client:Dr}},Pr=Ar,$r=Object(S["a"])(Pr,wr,xr,!1,null,null,null),Vr=$r.exports,jr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"plan-details"},[n("plan",{attrs:{planId:e.$route.params.planId}})],1)},Lr=[],Rr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("v-row",{staticClass:"mb-6"},[n("v-col",[n("breadcrumbs",{attrs:{items:e.breadcrumbs}})],1),e.showEditPlan&&!e.error?n("v-col",{attrs:{cols:"auto"}},[n("btn",{attrs:{"color-type":"accent",text:"",link:"",to:{name:"plan",params:{id:e.plan&&e.plan.id}},width:"80"}},[e._v("Edit")])],1):e._e()],1),n("alert",{attrs:{error:e.error}}),n("plan-info",e._b({},"plan-info",{loading:e.loading,plan:e.plan,components:e.componentsOfNeed},!1))],1)},Ur=[],qr=n("d368"),Br=n.n(qr),Mr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-expansion-panels",{attrs:{flat:"",value:e.expanded}},[n("v-expansion-panel",[n("expansion-panel-header",[e._v(" General Information ")]),n("v-expansion-panel-content",[e.plan?n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"general-info"},[n("definition-list",{attrs:{data:Object.assign({},e.plan,{isCurrent:e.plan.isCurrent?"Yes":"No"}),labels:e.generalInfoLabels}})],1)],1):n("v-row",{staticClass:"loader",class:{"-loaded":!e.loading},attrs:{"no-gutters":""}},[e._v("No information")])],1)],1),n("v-expansion-panel",[n("expansion-panel-header",[e._v(" Financial Information ")]),n("v-expansion-panel-content",[e.plan&&e.plan.financialInfo?n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"financial-info-details"},[n("plan-financial-info",{attrs:{plan:e.plan}})],1)],1):n("v-row",{staticClass:"loader",class:{"-loaded":!e.loading},attrs:{"no-gutters":""}},[e._v("No financial information")])],1)],1),n("v-expansion-panel",[n("expansion-panel-header",[e._v(" Components of need ")]),n("v-expansion-panel-content",[n("alert",{attrs:{error:e.error}}),e.displayedItems&&(e.displayedItems.length||e.loading)?n("data-table-vs",{attrs:{items:e.displayedItems,headers:e.headers,height:"611px","item-key":"id",loading:e.loading},on:{mounted:e.setFlagFilterDefault,reset:e.resetFlagFilter},scopedSlots:e._u([{key:"filter.flag",fn:function(t){var i=t.item,a=t.callback;return[n("div",{staticClass:"select-wrapper",staticStyle:{width:"97px"}},[n("v-select",{ref:"flag_filter",attrs:{outlined:"",dense:"",multiple:"","full-width":"","hide-details":"",clearable:"",items:["Marked","Unmarked"],default:i},on:{change:function(t){return e.onFlagFilter(i,a)}},model:{value:e.flagFilterModel,callback:function(t){e.flagFilterModel=t},expression:"flagFilterModel"}})],1)]}},{key:"item.flag",fn:function(t){var i=t.item;return[n("div",{staticClass:"text-center"},[n("v-icon",{attrs:{color:e.$vuetify.theme.themes.light.accent}},[e._v(e._s(i.flag?"fas":"far")+" fa-flag")])],1)]}},{key:"item.softCost",fn:function(e){var t=e.item;return[n("v-simple-checkbox",{attrs:{value:t.softCost,ripple:!1,readonly:""}})]}},{key:"item.componentUrl",fn:function(t){var i=t.item;return[i.componentUrl?n("a",{attrs:{href:i.componentUrl,target:"_blank"}},[e._v("Link to Photo")]):e._e()]}}],null,!1,2983391968)}):n("v-row",{attrs:{"no-gutters":""}},[e._v("No components")])],1)],1)],1)},Yr=[],Gr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-data-table",e._g(e._b({ref:"table",staticClass:"data-table",attrs:{items:e.vsItems,hideDefaultHeader:"","fixed-header":"","mobile-breakpoint":"0","group-desc":e.internalGroupDesc,headers:e.$props.headers.map((function(e){return Object.assign({},e,{cellClass:e.fixed?"fixed":""})})),"footer-props":e.$props.footerProps?e.$props.footerProps:{itemsPerPageOptions:[10,20,30,-1]},disableSort:!0},on:{"update:items-per-page":e.onPerPageChange,"update:page":e.recalcHeaderStyles},scopedSlots:e._u([{key:"body",fn:function(t){var i=t.items;return[n("tbody",[e.isVsEnabled?n("tr",{staticClass:"fake-rows"},[n("td",{staticClass:"faked-td",staticStyle:{height:"0"},attrs:{colspan:e.headers.length}},[n("p",{style:{margin:"0",height:"0px","padding-top":e.vsTopPadding}})])]):e._e(),e._l(i,(function(t){return n("tr",{key:t.id,class:e.getItemClass(t),attrs:{"data-key":t.id}},[e.showSelect?n("td",{staticClass:"text-start"},[n("v-simple-checkbox",{staticClass:"v-data-table__checkbox",on:{input:e.onSelectChange},model:{value:e.selectData[t.id],callback:function(n){e.$set(e.selectData,t.id,n)},expression:"selectData[item.id]"}})],1):e._e(),e._l(e.headers,(function(i){return n("td",{key:i.value,staticClass:"text-start",class:{fixed:i.fixed}},[e._t("item."+i.value,[n("span",{staticClass:"date-cell"},["number"===i.dataType?[e._v(" "+e._s(e._f("number")(t[i.value]))+" ")]:"currency"===i.dataType?[n("span",{key:t[i.value],staticClass:"currency-cell"},[e._v(e._s(e._f("currency")(t[i.value])))])]:"longstring"===i.dataType?n("truncated-text-simple",{attrs:{text:t[i.value]}}):[e._v(" "+e._s(t[i.value])+" ")]],2)],{item:t})],2)}))],2)})),e.isVsEnabled&&!e.isVSFinished?n("tr",{staticClass:"fake-rows"},[n("td",{staticClass:"faked-td",staticStyle:{height:"0"},attrs:{colspan:e.headers.length}},[n("p",{style:{margin:"0",height:"0px","padding-top":e.vsBottomPadding}})])]):e._e()],2)]}},{key:"top",fn:function(){return[n("div",{staticClass:"-position-relative"},[e.resetBtn.show?n("btn",{staticClass:"mb-3",class:{"reset-btn-absolute":e.resetBtn.isAbsolute},attrs:{disabled:e.isFilterEmpty},on:{click:e.onResetBtn}},[e._v("Reset filters")]):e._e()],1)]},proxy:!0},{key:"header",fn:function(t){var i=t.props,a=i.someItems,o=i.everyItem,r=i.options.groupBy,l=t.on;return[n("thead",{ref:"thead"},[n("tr",{ref:"header",staticClass:"header"},[e.showSelect?n("th",{attrs:{width:"20px"}},[e.selectLabel?[e._v(e._s(e.selectLabel))]:n("v-checkbox",{attrs:{value:o,indeterminate:a&&!o},on:{change:l["toggle-select-all"]}})],2):e._e(),e._l(e.$props.headers,(function(t){return n("th",e._g(e._b({key:t.value,style:e.headerStyles[t.value]},"th",Object.assign({},t,{class:{fixed:t.fixed}}),!1),t.sortable||void 0===t.sortable?{click:function(){e.onSorting(t)}}:{}),[t.sortable||void 0===t.sortable?n("span",{staticClass:"sortable",class:{active:e.sorting&&t.value===e.sorting.name||r.includes(t.value)}},[e._v(" "+e._s(t.text)+" "),t.sortable||void 0===t.sortable?n("span",{staticClass:"sorting"},[n("v-icon",{staticClass:"icon",class:{active:e.isAscActive(t)},attrs:{dense:""}},[e._v("fa-sort-up")]),n("v-icon",{staticClass:"icon",class:{active:e.isDescActive(t)},attrs:{dense:""}},[e._v("fa-sort-down")])],1):e._e()]):[e._v(" "+e._s(t.text)+" ")],t.width?n("span",{staticClass:"col-spacer",style:{width:t.width}}):e._e()],2)}))],2),e.isFilter?n("tr",{ref:"subHeader",staticClass:"header filter",style:e.subHeaderStyle},[e.showSelect?n("th",{style:e.subHeaderStyle}):e._e(),e._l(e.filters,(function(t){return n("th",e._b({key:t.name,style:e.subHeaderStyle,attrs:{width:t.width}},"th",{class:[{fixed:t.fixed},t.type]},!1),[!t.type||"text"!==t.type&&"number"!==t.type&&"currency"!==t.type?e._e():n("v-text-field",{attrs:{outlined:"",dense:"",clearable:"","full-width":"","hide-details":""},on:{input:function(n){return e.onFilter({name:t.name,value:t.value,type:t.type})}},model:{value:t.value,callback:function(n){e.$set(t,"value",n)},expression:"filter.value"}}),t.type&&"select"===t.type?n("div",{staticClass:"select-wrapper"},[n("v-select",{attrs:{outlined:"",dense:"",multiple:"",items:t.options,"full-width":"","hide-details":"",clearable:""},on:{change:function(n){return e.onFilter({name:t.name,value:t.value,type:t.type,options:t.options})}},scopedSlots:e._u([{key:"selection",fn:function(i){var a=i.index;return[0===a?n("span",{staticClass:"selection"},[e._l(t.value,(function(t,n){return[e._v(e._s(0===n?t:", "+t))]}))],2):e._e()]}},{key:"item",fn:function(t){var i=t.item,a=t.attrs,o=t.on;return[n("v-list-item",e._g(e._b({attrs:{dense:""},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.active;return[n("v-list-item-action",[n("v-checkbox",{attrs:{dense:"","hide-details":"","input-value":a}})],1),n("v-list-item-content",[n("v-list-item-title",[e._v(" "+e._s(i)+" ")])],1)]}}],null,!0)},"v-list-item",a,!1),o))]}}],null,!0),model:{value:t.value,callback:function(n){e.$set(t,"value",n)},expression:"filter.value"}})],1):e._e(),t.type&&"date"===t.type?n("date-picker",{attrs:{placeholder:"Date",dense:"",outlined:"",clearable:"","hide-details":""},on:{change:e.onFilter},model:{value:t.value,callback:function(n){e.$set(t,"value",n)},expression:"filter.value"}}):e._e(),t.type&&"slot"===t.type?e._t("filter."+t.name,null,{callback:e.onFilter,item:t}):e._e()],2)}))],2):e._e()])]}},{key:"group",fn:function(t){var i=t.headers,a=t.group,o=t.items;return[n("tr",{staticClass:"v-row-group__header"},[n("td",{attrs:{colspan:e.$props.headers.length-1}},[n("btn",{attrs:{"color-type":"secondary",icon:""},on:{click:function(t){return e.onGroupToggle(a)}}},[e.isGroupExpanded(a)?n("v-icon",[e._v("fa-chevron-up")]):n("v-icon",[e._v("fa-chevron-down")])],1),e._v(e._s(a)+" ")],1),n("td",{class:i[i.length-1].cellClass},[e._t("group.action",null,{group:a,items:o})],2)]),e.isGroupExpanded(a)?[e.isGroupContainChildren(o,i)?e._l(o,(function(t){return n("tr",{key:t[e.$props.itemKey]},[n("td"),e._l(i,(function(i){return n("td",{key:i.value,class:i.cellClass},[Object.keys(e.$scopedSlots).includes("item."+i.value)?e._t("item."+i.value,null,{item:t}):[e._v(" "+e._s(t[i.value]||"")+" ")]],2)}))],2)})):n("tr",{key:a},[n("td",{staticClass:"empty-group-text",attrs:{colspan:i.length+1}},[e._v(e._s(e.emptyGroupText))])])]:e._e()]}},e.isVsEnabled?{key:"footer.page-text",fn:function(){return[n("div",[e._v("1 - "+e._s(e.vsPaginationCurrent)+" of "+e._s(e.filteredItems.length))])]},proxy:!0}:null,e._l(e.$scopedSlots,(function(t,n){return{key:n,fn:function(t){return[e._t(n,null,null,t)]}}}))],null,!0)},"v-data-table",Object.assign({},e.$props,e.$attrs,{class:{"h-scroll":e.hasHScroll}}),!1),e.$listeners))},zr=[],Hr=n("8fea"),Qr=n("40a5"),Wr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"truncated-text-simple"},[e.showTooltip?n("v-tooltip",{attrs:{"max-width":"300",top:"","nudge-top":"-10","open-delay":"600"},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on,a=t.attrs;return[n("span",e._g(e._b({ref:"text"},"span",a,!1),i),[e._v(" "+e._s(e.text)+" ")])]}}])},[e._v(" "+e._s(e.text)+" ")]):n("span",{ref:"originalText",on:{mouseover:e.checkTextHeight}},[e._v(e._s(e.text))])],1)},Jr=[],Xr={name:"TruncatedTextSimple",components:{Btn:Oe["a"]},props:{text:{type:String}},mounted:function(){},beforeDestroy:function(){},data:function(){return{showTooltip:!1}},methods:{checkTextHeight:function(){!this.showTooltip&&this.$refs.originalText.offsetHeight>42&&(this.showTooltip=!0)}}},Zr=Xr,Kr=(n("e33e"),Object(S["a"])(Zr,Wr,Jr,!1,null,null,null)),el=Kr.exports;N()(Kr,{VTooltip:gn["a"]});var tl=20,nl=10,il=50,al=48,ol=0,rl=tl,ll=tl,sl={name:"DataTableVs",extends:$e["a"],components:{VDataTable:Hr["a"],DatePicker:Qr["a"],Btn:Oe["a"],TruncatedTextSimple:el},props:{enableVirtualScroll:{type:Boolean,default:!0}},data:function(){var e=this.itemsPerPage||10;return{vsMaxIndex:tl+nl,vsMinIndex:0,currentPerPage:e,selectData:{},vsTopPadding:0,vsBottomPadding:0}},watch:{value:{handler:function(){var e=this;this.showSelect&&(this.selectData={},this.value.forEach((function(t){t.id&&(e.selectData[t.id]=!0)})))}}},computed:{clearedItems:function(){return this.items},isVsEnabled:function(){return this.enableVirtualScroll&&-1===this.currentPerPage},vsItems:function(){var e=this;if(this.isVsEnabled){var t=this.getScrollDirection();if(t>=0){var n=this.vsMaxIndex-ol;n>=il&&(ol=this.vsMinIndex,this.vsTopPadding=this.getVsTopPadding()),this.vsBottomPadding=this.getVsBottomPadding(),rl=this.vsMaxIndex}else{var i=Math.abs(this.vsMinIndex-rl);(i>=il||ithis.filteredItems.length&&(ol=this.filteredItems.length-tl,rl=this.filteredItems.length,this.vsBottomPadding=0,this.vsTopPadding=this.getVsTopPadding(),this.$nextTick((function(){e.scrollToBottom()}))),this.$nextTick((function(){clearTimeout(e.recalcHeaderStylesTimeout),e.recalcHeaderStylesTimeout=setTimeout((function(){e.recalcHeaderStyles()}),100)})),this.filteredItems.slice(ol,rl)}return this.filteredItems},isVSFinished:function(){return this.vsMaxIndex>=this.filteredItems.length},vsPaginationCurrent:function(){var e=this.filteredItems.length;return this.vsMaxIndex<=e?this.vsMaxIndex:e}},methods:{initScrollHandler:function(){this.$refs.table&&this.$refs.table.$el&&(this.tableWrapper=this.$refs.table.$el.querySelector(".v-data-table__wrapper"),this.tableWrapper&&(this.tableWrapper.addEventListener("scroll",this.hideFilterDropdown()),this.enableVirtualScroll&&this.tableWrapper.addEventListener("scroll",this.virtualScrollHandler)))},getVsTopPadding:function(){return this.vsMinIndex*al+"px"},getVsBottomPadding:function(){return(this.filteredItems.length-this.vsMaxIndex)*al+"px"},getScrollDirection:function(){var e=this.vsMaxIndex-ll;return ll=this.vsMaxIndex,e>0?1:e<0?-1:0},virtualScrollHandler:function(){var e=this;this.isVsEnabled&&(this.vsTimeout&&clearTimeout(this.vsTimeout),this.vsTimeout=setTimeout((function(){e.scrollByHeight()}),20))},scrollByHeight:function(){var e=this.tableWrapper.offsetHeight,t=Math.ceil((this.tableWrapper.scrollTop+e)/al)+4,n=t-tl-nl;this.vsMinIndex=n<0?0:n,t>tl?this.vsMaxIndex=t:this.resetVS()},hideFilterDropdown:function(){var e,t=this,n=!0,i=function(){n&&(t.tableWrapper.click(),n=!1)};return function(){i(),clearTimeout(e),e=setTimeout((function(){n=!0}),100)}},scrollToBottom:function(){"function"===typeof this.tableWrapper.scrollTo&&this.tableWrapper.scrollTo(this.tableWrapper.scrollLeft,this.tableWrapper.scrollHeight+this.tableWrapper.offsetHeight)},resetVS:function(){this.isVsEnabled&&(this.vsMaxIndex=tl,this.vsMinIndex=0,ol=0,rl=tl,this.vsTopPadding=0,this.vsBottomPadding=this.getVsBottomPadding())},resetScroll:function(){"function"===typeof this.tableWrapper.scrollTo&&this.tableWrapper.scrollTo(this.tableWrapper.scrollLeft,0)},reset:function(e){this.updateFilters(!0),this.sorting=null,this.filteredItems=Object(Fi["a"])(e),this.lastSelectedFilter=null,this.resetScroll(),this.resetVS()},onFilter:function(e){var t=this;clearTimeout(this.filterTimeout),this.filterTimeout=setTimeout((function(){t.lastSelectedFilter=e,t.resetVS(),t.resetScroll(),t.filter(),t.sort(),t.recalcHeaderStyles()}),200)},onSorting:function(e){if(this.groupBy&&this.groupBy===e.value)this.internalGroupDesc=!this.internalGroupDesc;else{var t="asc";this.sorting&&e.value===this.sorting.name&&(t="asc"===this.sorting.order?"desc":"asc"),this.sorting={name:e.value,order:t,type:e.dataType||e.type}}this.sort(),this.resetScroll(),this.resetVS()},onPerPageChange:function(e){this.currentPerPage=e,this.resetScroll(),this.resetVS(),this.recalcHeaderStyles()},onSelectChange:function(){var e=this;this.$emit("input",Object.keys(this.selectData).filter((function(t){return e.selectData[t]})).map((function(t){return e.filteredItems.find((function(e){return Number(e.id)===Number(t)}))})))},getItemClass:function(e){var t={"v-data-table__selected":this.selectData[e.id]};return"function"===typeof this.itemClass&&(t[this.itemClass(e)]=!0),t}}},cl=sl,dl=(n("5388"),n("9e88")),ul=Object(S["a"])(cl,Gr,zr,!1,null,null,null),ml=ul.exports;N()(ul,{VCheckbox:rt["a"],VDataTable:Hr["a"],VIcon:_["a"],VListItem:x["a"],VListItemAction:st["a"],VListItemContent:E["a"],VListItemTitle:E["b"],VSelect:ki["a"],VSimpleCheckbox:dl["a"],VTextField:ce["a"]});var fl=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("definition-list",{attrs:{data:e.plan.financialInfo,labels:e.displayedFinancialInfoLabels}})},pl=[],vl={name:"PlanFinancialInfo",components:{DefinitionList:Xa["a"]},props:{plan:{type:Object,default:null}},data:function(){return{financialInfoLabels:[{label:"Plan Type",value:"typeOfPlan.name"},{label:"LTFMR Funding Amount (annual)",value:"ltfmrFundingAmount",type:"currency"},{label:"Capital Funding Amount",value:"capitalFundingAmount",type:"currency"},{label:"Capital Infusion Amount",value:"capitalInfusionAmount",type:"currency"},{label:"Capital Infusion Year",value:"capitalInfusionYear"},{label:"Plan Start Year",value:"planStartYear"},{label:"Regional Cost",value:"regionalCost",type:"percentage"},{label:"Funding Escalation",value:"fundingEscalation",type:"percentage"},{label:"Inflation Cost Escalation",value:"inflationCostEscalation",type:"percentage"},{label:"Soft Cost Percentage",value:"softCostPercentage",type:"percentage"}]}},computed:{displayedFinancialInfoLabels:function(){var e=this;return this.plan&&this.plan.financialInfo?this.financialInfoLabels.filter((function(t){return"ltfmrFundingAmount"===t.value?"capital"!==e.plan.financialInfo.typeOfPlan.name.toLowerCase():t})).filter((function(t){return"capitalFundingAmount"===t.value?"ltfm"!==e.plan.financialInfo.typeOfPlan.name.toLowerCase():t})):[]}}},hl=vl,yl=Object(S["a"])(hl,fl,pl,!1,null,null,null),bl=yl.exports,gl=(n("07ac"),n("c9d1")),kl=n.n(gl),Sl={data:function(){return{flagFilterModel:[],flagRequestList:{}}},methods:{resetFlagFilter:function(){this.flagFilterModel=[]},setFlagFilterDefault:function(){if(this.$refs.flag_filter&&this.$refs.flag_filter.$attrs.default){var e=this.$refs.flag_filter.$attrs.default.value;Array.isArray(e)&&(2===e.length?this.flagFilterModel=["Marked","Unmarked"]:!0===e[0]?this.flagFilterModel=["Marked"]:!1===e[0]&&(this.flagFilterModel=["Unmarked"]))}},onFlagFilter:function(e,t){if(e&&"function"===typeof t){var n=[];2===this.flagFilterModel.length?n=[!0,!1]:"Marked"===this.flagFilterModel[0]?n=[!0]:"Unmarked"===this.flagFilterModel[0]&&(n=[!1]),e.value=n,t(e)}},onFlagClick:function(e){var t=this;e&&e.id&&(e.flag=!e.flag,this.flagRequestList[e.id]=e,clearTimeout(this.changeFLagTimeout),this.changeFLagTimeout=setTimeout((function(){t.changeFlag()}),400))},changeFlag:function(){var e=this,t=Object.values(this.flagRequestList).map((function(e){return{id:e.id,facilityId:e.facility&&e.facility.id||null,systemId:e.system&&e.system.id||null,componentId:e.component&&e.component.id||null,status:e.status,yearCompleted:e.yearCompleted,actualCost:e.actualCost,description:e.description,componentUrl:e.componentUrl,yearForImprovement:e.yearForImprovement,quantityOfComponents:e.quantityOfComponents,unitId:e.unit&&e.unit.id||null,costPerUnit:e.costPerUnit,conditionAssessmentId:e.conditionAssessment&&e.conditionAssessment.id||null,locationOfComponent:e.locationOfComponent,fundingSourceId:e.fundingSource&&e.fundingSource.id||null,budgetaryNotes:e.budgetaryNotes,internalNotes:e.internalNotes,componentNotes:e.componentNotes,softCost:e.softCost,flag:e.flag}}));this.$apollo.mutate({mutation:kl.a,variables:{input:t}}).catch((function(t){e.error=t})).finally((function(){e.flagRequestList={}}))}}},Cl={name:"PlanInfo",components:{Btn:Oe["a"],ExpansionPanelHeader:Ja["a"],DefinitionList:Xa["a"],PlanFinancialInfo:bl,"data-table-vs":ml},mixins:[Sl],props:{plan:{type:Object,default:null},components:{type:Array,default:null},loading:{type:Boolean,default:!1}},data:function(){return{currentUser:null,expanded:0,error:null,generalInfoLabels:[{label:"Plan Name",value:"name"},{label:"ICS Project Number",value:"icsProjectNumber"},{label:"Date of Plan Creation",value:"dateOfCreation",type:"utcDate"},{label:"Date of Assessment",value:"dateOfAssessment",type:"utcDate"},{label:"Plan Notes",value:"description",type:"longstring"},{label:"Current Plan",value:"isCurrent",type:"name"}]}},computed:{displayedItems:function(){var e=this;return this.plan&&this.components?this.components.map((function(t){var n=bt(t,e.plan);return Object(m["a"])(Object(m["a"])({},t),{},{facilityName:t.facility&&t.facility.name||"",systemName:t.system&&t.system.name||"",componentName:t.component&&t.component.name||"",unitName:t.unit&&t.unit.name||"",conditionName:t.conditionAssessment&&t.conditionAssessment.name||"",fundingSourceName:t.fundingSource&&t.fundingSource.name||""},n)})):[]},headers:function(){return[{text:"Flag",value:"flag",dataType:"string",width:"40px",fixed:!0,type:"slot"},{text:"Facility",value:"facilityName",type:"select",dataType:"string",fixed:!0,width:"150px"},{text:"System",value:"systemName",type:"select",dataType:"string",width:"180px"},{text:"Component",value:"componentName",type:"select",dataType:"string",width:"200px"},{text:"Year",value:"yearForImprovement",type:"select",dataType:"year",width:"100px"},{text:"Quantity",value:"quantityOfComponents",type:"number",dataType:"number",width:"80px"},{text:"Unit",value:"unitName",type:"select",dataType:"string",width:"100px"},{text:"Cost Per Unit",value:"costPerUnit",type:"number",dataType:"currency",width:"100px"},{text:"Base Amount",value:"baseAmount",type:"number",dataType:"currency",width:"100px"},{text:"Component Subtotal",value:"componentSubtotal",type:"number",dataType:"currency",width:"100px"},{text:"Soft Cost",value:"softCost",width:"70px"},{text:"Budget Amount",value:"budgetAmount",type:"number",dataType:"currency",width:"120px"},{text:"Budgetary Notes",value:"budgetaryNotes",type:"text",dataType:"longstring",width:"180px"},{text:"Description",value:"description",type:"text",dataType:"longstring",width:"180px"},{text:"Condition",value:"conditionName",type:"select",dataType:"string",width:"100px",noSort:!0},{text:"Location",value:"locationOfComponent",type:"text",dataType:"longstring",width:"130px"},{text:"Image",value:"componentUrl",width:"100px"},{text:"Funding Source",value:"fundingSourceName",type:"select",dataType:"string",width:"100px"},{text:"Internal Notes",value:"internalNotes",type:"text",dataType:"longstring",width:"180px"}]}}},Nl=Cl,_l=(n("c3f6"),Object(S["a"])(Nl,Mr,Yr,!1,null,"774714df",null)),wl=_l.exports;N()(_l,{VCol:lt["a"],VExpansionPanel:ro["a"],VExpansionPanelContent:lo["a"],VExpansionPanels:so["a"],VIcon:_["a"],VRow:se["a"],VSelect:ki["a"],VSimpleCheckbox:dl["a"]});var xl,El=n("9cca"),Fl=n.n(El),Ol={OPEN:"open",COMPLETED:"completed"},Il=(xl={},Object(et["a"])(xl,Ol.OPEN,"Open"),Object(et["a"])(xl,Ol.COMPLETED,"Completed"),xl),Tl={name:"Plan",components:{PlanInfo:wl,Breadcrumbs:Jo,Btn:Oe["a"]},props:{planId:{type:Number|String}},apollo:{currentUser:{query:y.a,fetchPolicy:"cache-only"},plan:{query:Br.a,variables:function(){return{id:this.planId}},error:function(e){this.error=e}},componentsOfNeed:{query:Fl.a,variables:function(){return{planId:this.planId||null,status:Ol.OPEN}},error:function(e){this.error=e.networkError?Object(m["a"])(Object(m["a"])({},e),{},{message:"Something went wrong! Could not load plan components."}):e}}},data:function(){return{plan:null,componentsOfNeed:null,currentUser:null,error:null}},computed:{loading:function(){return this.$apollo.queries.componentsOfNeed.loading},showEditPlan:function(){return Object(b["a"])(f["c"].EDIT_PLAN,this.currentUser)},breadcrumbs:function(){return[{text:"Clients",to:{name:"clients"},permission:f["c"].VIEW_CLIENTS}].concat(Object(Fi["a"])(this.plan&&this.plan.client?[{text:this.plan.client.name||"",href:"/client-details/"+this.plan.client.id,permission:f["c"].VIEW_CLIENTS}]:[]),[{text:this.plan&&this.plan.name||"",disabled:!0}])}}},Dl=Tl,Al=Object(S["a"])(Dl,Rr,Ur,!1,null,null,null),Pl=Al.exports;N()(Al,{VCol:lt["a"],VRow:se["a"]});var $l={name:"PlanDetails",components:{Plan:Pl}},Vl=$l,jl=Object(S["a"])(Vl,jr,Lr,!1,null,null,null),Ll=jl.exports,Rl=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"add-plan"},[n("plan",{attrs:{clientId:e.$route.params.clientId}})],1)},Ul=[],ql=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("fragment",[n("v-row",{staticClass:"mb-6"},[e.loading?e._e():n("alert",{attrs:{error:e.error}}),n("v-col",[n("breadcrumbs",{attrs:{items:e.breadcrumbs}})],1)],1),n("plan-form",{attrs:{plan:e.plan,"readonly-fields":e.readonlyFields},on:{submit:e.onSubmit}})],1)},Bl=[],Ml=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("stepper",{model:{value:e.step,callback:function(t){e.step=t},expression:"step"}},[n("v-stepper-header",[n("stepper-step",{attrs:{step:"1",editable:!e.lock}},[e._v(" General Information ")]),n("v-divider"),n("stepper-step",{attrs:{editable:e.lastCompleted>=1&&!e.lock,step:"2"}},[e._v(" Financial Information ")]),n("v-divider"),n("stepper-step",{attrs:{editable:e.lastCompleted>=2&&!e.lock,step:"3"}},[e._v(" Components of need ")])],1),n("v-stepper-items",{attrs:{flat:""}},[n("v-stepper-content",{attrs:{step:"1"}},[n("plan-general-info-form",{attrs:{disabled:e.disabled,loading:e.loading,plan:e.plan},on:{submit:e.onUpdatePlanInfo,change:e.onChangePlanInfo,reset:e.onResetChangesPlanInfo}})],1),n("v-stepper-content",{attrs:{step:"2"}},[n("plan-financial-info-form",{attrs:{plan:e.plan,loading:e.loading,active:"2"===e.step.toString(),"readonly-fields":e.readonlyFields},on:{back:function(t){e.step=1},submit:e.onUpdateFinancialInfo,change:e.onChangeFinancialInfo,reset:e.onResetChangesFinancialInfo}})],1),n("v-stepper-content",{attrs:{step:"3"}},[n("components",{attrs:{plan:e.plan},on:{back:function(t){e.step=2}}})],1)],1)],1)},Yl=[],Gl=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-form",{ref:"form",staticClass:"plan-general-info-form",attrs:{"lazy-validation":"","aria-busy":e.loading||e.internalLoading,disabled:e.loading||e.internalLoading||e.disabled,autocomplete:"off"},on:{submit:function(t){return t.preventDefault(),e.onSubmit(t)}}},[e.loading?e._e():n("alert",{attrs:{error:e.error}}),e.loading?n("v-row",{attrs:{"no-gutters":"",justify:"center"}},[n("v-progress-circular",{attrs:{indeterminate:"",color:"#8C8C8C"}})],1):e._e(),e.form?n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"col col-2"},[n("v-text-field",{attrs:{label:"Plan Name",autofocus:"",autocomplete:"off",rules:e.nameRules,required:""},on:{input:function(t){return e.onChange("name",e.form.name)}},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}}),n("v-text-field",{staticClass:"mt-1",attrs:{label:"ICS Project Number",autocomplete:"off"},on:{input:function(t){return e.onChange("icsProjectNumber",e.form.icsProjectNumber)}},model:{value:e.form.icsProjectNumber,callback:function(t){e.$set(e.form,"icsProjectNumber",t)},expression:"form.icsProjectNumber"}}),n("date-picker",{staticClass:"mt-1",attrs:{label:"Date of Plan Creation",rules:e.dateOfCreationRules,required:"",autocomplete:"off","validate-on-blur":""},on:{change:function(t){return e.onChange("dateOfCreation",e.form.dateOfCreation)}},model:{value:e.form.dateOfCreation,callback:function(t){e.$set(e.form,"dateOfCreation",t)},expression:"form.dateOfCreation"}}),n("date-picker",{staticClass:"mt-1",attrs:{label:"Date of Assessment",autocomplete:"off"},on:{input:function(t){return e.onChange("dateOfAssessment",e.form.dateOfAssessment)}},model:{value:e.form.dateOfAssessment,callback:function(t){e.$set(e.form,"dateOfAssessment",t)},expression:"form.dateOfAssessment"}}),n("v-textarea",{staticClass:"mt-1",attrs:{rows:"1","auto-grow":"",label:"Plan Notes",autocomplete:"off","validate-on-blur":""},on:{input:function(t){return e.onChange("description",e.form.description)}},model:{value:e.form.description,callback:function(t){e.$set(e.form,"description",t)},expression:"form.description"}})],1),n("v-col",{staticClass:"col col-2 offset-1"},[n("v-checkbox",{attrs:{label:"Current Plan"},on:{change:function(t){return e.onChange("isCurrent",e.form.isCurrent)}},model:{value:e.form.isCurrent,callback:function(t){e.$set(e.form,"isCurrent",t)},expression:"form.isCurrent"}})],1)],1):e._e(),n("div",{staticClass:"mt-8 btns-bar"},[n("btn",{directives:[{name:"show",rawName:"v-show",value:e.changes.size>0,expression:"changes.size > 0"}],staticClass:"mr-2",attrs:{width:"100","color-type":"secondary",text:"",disabled:e.loading||e.internalLoading},on:{click:e.onReset}},[e._v("Reset")]),n("btn",{attrs:{type:"submit",width:"150","color-type":"accent",disabled:e.internalLoading||e.loading||e.disabled}},[e._v(e._s(e.changes.size>0?"Save & Next":"Next"))])],1)],1)},zl=[],Hl=n("358f"),Ql=n.n(Hl),Wl=n("169a"),Jl=n.n(Wl),Xl=n("54fc"),Zl=function(e,t){return Object.keys(e).reduce((function(e,n){return Object(m["a"])(Object(m["a"])({},e),{},Object(et["a"])({},n,void 0!==t[n]?t[n]:null))}),{})},Kl={name:"PlanGeneralInfoForm",components:{Btn:Oe["a"],DatePicker:Qr["a"]},props:{loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},plan:{type:Object}},data:function(){return{form:{name:null,icsProjectNumber:null,dateOfCreation:null,dateOfAssessment:null,photosLink:null,description:null,isCurrent:!1},nameRules:[function(e){return!!e||"Name is Required"}],dateOfCreationRules:[function(e){return!!e||"Date of Creation is Required"}],internalLoading:!1,error:null,changes:new Set}},watch:{plan:{immediate:!0,handler:function(e){null!==e&&(this.error=null,this.form=Zl(this.form,e),this.changes.clear(),e.dateOfCreation?this.form.dateOfCreation=e.dateOfCreation.substr(0,10):(this.form.dateOfCreation=(new Date).toISOString().substr(0,10),this.onChange("dateOfCreation",this.form.dateOfCreation)),e.dateOfAssessment&&(this.form.dateOfAssessment=e.dateOfAssessment.substr(0,10)))}}},methods:{validate:function(){return this.$refs.form.validate()},onChange:function(e,t){this.plan&&Object(si["isEqual"])(this.plan[e],t)?this.changes.has(e)&&this.changes.delete(e):this.changes.add(e),this.$emit("change")},onSubmit:function(){if(this.error=null,this.validate()&&this.changes.size>0){var e=this.form,t=e.name,n=e.icsProjectNumber,i=e.dateOfCreation,a=e.dateOfAssessment,o=e.photosLink,r=e.description,l=e.isCurrent,s={name:t,icsProjectNumber:n,dateOfCreation:Object(Xl["b"])(i),dateOfAssessment:Object(Xl["b"])(a),photosLink:o,description:r,isCurrent:l};this.plan.id?this.updatePlan(Object(m["a"])(Object(m["a"])({},s),{},{id:this.plan.id})):this.addPlan(Object(m["a"])(Object(m["a"])({},s),{},{clientId:this.plan.client.id}))}else this.validate()&&0===this.changes.size&&this.$emit("submit",this.plan)},onReset:function(){this.form=Zl(this.form,this.plan),this.error=null,this.$refs.form.resetValidation(),this.changes.clear(),this.$emit("reset")},addPlan:function(e){var t=this;this.internalLoading=!0,this.$apollo.mutate({mutation:Ql.a,variables:{input:e}}).then((function(e){var n=e.data.createPlan;He["a"].$emit("show-snackbar",{color:"success",text:"Plan was added successfully!"}),t.$emit("submit",n)})).catch((function(e){t.error=e})).finally((function(){t.internalLoading=!1}))},updatePlan:function(e){var t=this;this.internalLoading=!0,this.$apollo.mutate({mutation:Jl.a,variables:{input:e}}).then((function(e){var n=e.data.updatePlan;He["a"].$emit("show-snackbar",{color:"success",text:"Plan was updated successfully!"}),t.$emit("submit",n)})).catch((function(e){t.error=e})).finally((function(){t.internalLoading=!1}))}}},es=Kl,ts=(n("ba7b"),Object(S["a"])(es,Gl,zl,!1,null,"6e540dbc",null)),ns=ts.exports;N()(ts,{VCheckbox:rt["a"],VCol:lt["a"],VForm:le["a"],VProgressCircular:Nt["a"],VRow:se["a"],VTextField:ce["a"],VTextarea:Si["a"]});var is=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-form",{ref:"form",staticClass:"plan-financial-info-form",attrs:{"lazy-validation":"","aria-busy":e.loading||e.internalLoading,disabled:e.loading||e.internalLoading||e.disabled,autocomplete:"off"},on:{submit:function(t){return t.preventDefault(),e.onSubmit(t)}}},[e.loading?e._e():n("alert",{attrs:{error:e.error}}),e.loading?n("v-row",{attrs:{"no-gutters":"",justify:"center"}},[n("v-progress-circular",{attrs:{indeterminate:"",color:"#8C8C8C"}})],1):e._e(),e.form?n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"column"},[n("v-select",{attrs:{"item-text":"name",autofocus:"",items:e.planTypes,rules:e.planTypeRules,label:"Plan Type",required:"",readonly:e.plan&&e.plan.financialInfo&&e.readonlyFields&&e.readonlyFields.includes("typeOfPlan")},on:{input:function(t){return e.form.typeOfPlan=e.planTypes.find((function(e){return e.name===t}))},change:function(t){return e.onChange("typeOfPlan",e.form.typeOfPlan)}},model:{value:e.form.typeOfPlan,callback:function(t){e.$set(e.form,"typeOfPlan",t)},expression:"form.typeOfPlan"}}),e.showLtfmFundingAmount?n("number-text-field",{attrs:{label:"LTFMR Funding Amount (annual), $",rules:[e.positiveNumber,e.integerNumber],"validate-on-blur":"",autocomplete:"off",readonly:e.plan&&e.plan.financialInfo&&e.readonlyFields&&e.readonlyFields.includes("ltfmrFundingAmount")},on:{input:function(t){return e.onChange("ltfmrFundingAmount",e.form.ltfmrFundingAmount)}},model:{value:e.form.ltfmrFundingAmount,callback:function(t){e.$set(e.form,"ltfmrFundingAmount",e._n(t))},expression:"form.ltfmrFundingAmount"}}):e._e(),e.showCapitalFundingAmount?n("number-text-field",{staticClass:"mt-1",attrs:{label:"Capital Funding Amount, $",rules:[e.positiveNumber,e.integerNumber],"validate-on-blur":"",autocomplete:"off",readonly:e.plan&&e.plan.financialInfo&&e.readonlyFields&&e.readonlyFields.includes("capitalFundingAmount")},on:{input:function(t){return e.onChange("capitalFundingAmount",e.form.capitalFundingAmount)}},model:{value:e.form.capitalFundingAmount,callback:function(t){e.$set(e.form,"capitalFundingAmount",e._n(t))},expression:"form.capitalFundingAmount"}}):e._e(),n("number-text-field",{staticClass:"mt-1",attrs:{label:"Capital Infusion Amount, $",rules:[e.positiveNumber,e.integerNumber],"validate-on-blur":"",autocomplete:"off",readonly:e.plan&&e.plan.financialInfo&&e.readonlyFields&&e.readonlyFields.includes("capitalInfusionAmount")},on:{input:function(t){return e.onChange("capitalInfusionAmount",e.form.capitalInfusionAmount)}},model:{value:e.form.capitalInfusionAmount,callback:function(t){e.$set(e.form,"capitalInfusionAmount",e._n(t))},expression:"form.capitalInfusionAmount"}}),n("v-select",{staticClass:"mt-1",attrs:{label:"Capital Infusion Year",autocomplete:"off",items:e.years,readonly:e.plan&&e.plan.financialInfo&&e.readonlyFields&&e.readonlyFields.includes("capitalInfusionYear")},on:{change:function(t){return e.onChange("capitalInfusionYear",e.form.capitalInfusionYear)}},model:{value:e.form.capitalInfusionYear,callback:function(t){e.$set(e.form,"capitalInfusionYear",t)},expression:"form.capitalInfusionYear"}}),n("v-select",{staticClass:"mt-1",attrs:{label:"Plan Start Year",rules:e.planStartYearRules,autocomplete:"off",required:"",items:e.years,"validate-on-blur":"",readonly:e.plan&&e.plan.financialInfo&&e.readonlyFields&&e.readonlyFields.includes("planStartYear")},on:{change:function(t){return e.onChange("planStartYear",e.form.planStartYear)}},model:{value:e.form.planStartYear,callback:function(t){e.$set(e.form,"planStartYear",t)},expression:"form.planStartYear"}})],1),n("v-col",{staticClass:"column",attrs:{offset:"1"}},[n("number-text-field",{staticClass:"mt-1",attrs:{label:"Regional Cost, %",rules:e.regionalCostRules,required:"",autocomplete:"off","validate-on-blur":"",readonly:e.plan&&e.plan.financialInfo&&e.readonlyFields&&e.readonlyFields.includes("regionalCost")},on:{input:function(t){return e.onChange("regionalCost",e.form.regionalCost)}},model:{value:e.form.regionalCost,callback:function(t){e.$set(e.form,"regionalCost",e._n(t))},expression:"form.regionalCost"}}),n("number-text-field",{staticClass:"mt-1",attrs:{label:"Funding Escalation, %",rules:e.fundingEscalationRules,required:"",autocomplete:"off","validate-on-blur":"",readonly:e.plan&&e.plan.financialInfo&&e.readonlyFields&&e.readonlyFields.includes("regionfundingEscalationalCost")},on:{input:function(t){return e.onChange("fundingEscalation",e.form.fundingEscalation)}},model:{value:e.form.fundingEscalation,callback:function(t){e.$set(e.form,"fundingEscalation",e._n(t))},expression:"form.fundingEscalation"}}),n("number-text-field",{staticClass:"mt-1",attrs:{label:"Inflation Cost Escalation, %",rules:e.inflationCostEscalationRules,required:"",autocomplete:"off","validate-on-blur":"",readonly:e.plan&&e.plan.financialInfo&&e.readonlyFields&&e.readonlyFields.includes("inflationCostEscalation")},on:{input:function(t){return e.onChange("inflationCostEscalation",e.form.inflationCostEscalation)}},model:{value:e.form.inflationCostEscalation,callback:function(t){e.$set(e.form,"inflationCostEscalation",e._n(t))},expression:"form.inflationCostEscalation"}}),n("number-text-field",{staticClass:"mt-1",attrs:{label:"Soft Cost Percentage, %",rules:e.softCostPercentageRules,required:"",autocomplete:"off","validate-on-blur":"",readonly:e.plan&&e.plan.financialInfo&&e.readonlyFields&&e.readonlyFields.includes("softCostPercentage")},on:{input:function(t){return e.onChange("softCostPercentage",e.form.softCostPercentage)}},model:{value:e.form.softCostPercentage,callback:function(t){e.$set(e.form,"softCostPercentage",e._n(t))},expression:"form.softCostPercentage"}})],1)],1):e._e(),n("v-row",{staticClass:"mt-8",attrs:{"no-gutters":"",justify:"end"}},[n("v-col",{attrs:{"justify-self":"start"}},[n("btn",{attrs:{width:"100","color-type":"accent",disabled:e.changes.size>0},on:{click:e.onBackClick}},[e._v("Back")])],1),n("v-col",{attrs:{cols:"auto"}},[n("btn",{directives:[{name:"show",rawName:"v-show",value:e.changes.size>0,expression:"changes.size > 0"}],staticClass:"mr-2",attrs:{width:"100","color-type":"secondary",text:"",disabled:e.loading||e.internalLoading},on:{click:e.onReset}},[e._v("Reset")]),n("btn",{attrs:{type:"submit",width:"150","color-type":"accent",disabled:e.internalLoading||e.loading||e.disabled}},[e._v(e._s(e.changes.size>0?"Save & Next":"Next"))])],1)],1)],1)},as=[],os=n("134d"),rs=n.n(os),ls=n("f870"),ss=n.n(ls),cs=n("3e74"),ds=n.n(cs),us=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=[],a=e;a<=t;a+=n)i.push(a.toString());return i},ms=function(e,t){return Object.keys(e).reduce((function(e,n){return Object(m["a"])(Object(m["a"])({},e),{},Object(et["a"])({},n,null!==t&&void 0!==t[n]?t[n]:null))}),{})},fs={name:"PlanFinancialInfoForm",components:{Btn:Oe["a"],DatePicker:Qr["a"],NumberTextField:hi["a"]},props:{loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},plan:{type:Object},readonlyFields:{type:Array},active:{type:Boolean,default:!1}},apollo:{planTypes:{query:rs.a,fetchPolicy:"cache-first",error:function(e){this.error=e.networkError?Object(m["a"])(Object(m["a"])({},e),{},{message:"Something went wrong! Could not load plan type list."}):e}}},data:function(){return Object(m["a"])(Object(m["a"])({},ae["a"]),{},{form:{typeOfPlan:null,ltfmrFundingAmount:null,capitalFundingAmount:null,capitalInfusionAmount:null,capitalInfusionYear:null,planStartYear:null,regionalCost:null,fundingEscalation:null,inflationCostEscalation:null,softCostPercentage:null},years:us((new Date).getFullYear()-20,(new Date).getFullYear()+20).reverse(),planTypeRules:[function(e){return!!e||"Plan Type is Required"}],planTypes:[],planStartYearRules:[function(e){return!!e||"Plan Start Year is Required"}],regionalCostRules:[function(e){return null!==e&&""!==e||"Regional Cost is Required"},ae["a"].numberInRange(0,200),ae["a"].integerNumber],fundingEscalationRules:[function(e){return null!==e&&""!==e||"Funding Escalation is Required"},ae["a"].numberInRange(0,100),ae["a"].floatNumber(1)],inflationCostEscalationRules:[function(e){return null!==e&&""!==e||"Inflation cost escalation"},ae["a"].numberInRange(0,100),ae["a"].floatNumber(1)],softCostPercentageRules:[function(e){return null!==e&&""!==e||"Soft Cost Percentage is Required"},ae["a"].numberInRange(0,100),ae["a"].floatNumber(1)],internalLoading:!1,error:null,changes:new Set})},watch:{plan:{immediate:!0,handler:function(e){null!==e&&(this.error=null,this.form=ms(this.form,e.financialInfo),this.changes.clear(),null===e.financialInfo&&(this.changes=new Set("regionalCost","fundingEscalation","inflationCostEscalation","softCostPercentage"),this.form=Object(m["a"])(Object(m["a"])({},this.form),{},{regionalCost:100,fundingEscalation:0,inflationCostEscalation:0,softCostPercentage:0}),this.active&&this.$emit("change")))}},"form.typeOfPlan":function(e,t){null!==t&&e.id!==t.id&&(this.form.ltfmrFundingAmount=null)},active:{immediate:!0,handler:function(e){e&&this.changes.size>0?this.$emit("change"):this.$emit("reset")}}},computed:{showLtfmFundingAmount:function(){return this.form.typeOfPlan&&"LTFM"===this.form.typeOfPlan.name},showCapitalFundingAmount:function(){return this.form.typeOfPlan&&"capital"===this.form.typeOfPlan.name.toLowerCase()}},methods:{validate:function(){return this.$refs.form.validate()},onChange:function(e,t){this.plan&&this.plan.financialInfo&&Object(si["isEqual"])(this.plan.financialInfo[e],t)?this.changes.has(e)&&this.changes.delete(e):this.changes.add(e),this.active&&this.$emit("change")},onSubmit:function(){if(this.error=null,this.validate()&&this.changes.size>0){var e=this.form,t=e.typeOfPlan,n=e.ltfmrFundingAmount,i=e.capitalFundingAmount,a=e.capitalInfusionAmount,o=e.capitalInfusionYear,r=e.planStartYear,l=e.regionalCost,s=e.fundingEscalation,c=e.inflationCostEscalation,d=e.softCostPercentage,u={typeOfPlanId:t&&t.id||null,ltfmrFundingAmount:n,capitalFundingAmount:i,capitalInfusionAmount:a,capitalInfusionYear:o||null,planStartYear:r,regionalCost:l,fundingEscalation:s,inflationCostEscalation:c,softCostPercentage:d};null!==this.plan.financialInfo&&this.plan.financialInfo.id?this.updateFinancialInfo(Object(m["a"])(Object(m["a"])({},u),{},{id:this.plan.financialInfo.id})):this.addFinancialInfo(Object(m["a"])(Object(m["a"])({},u),{},{planId:this.plan.id}))}else this.validate()&&0===this.changes.size&&this.$emit("submit",this.plan)},onBackClick:function(){this.$emit("back")},onReset:function(){this.form=ms(this.form,this.plan.financialInfo),this.error=null,this.$refs.form.resetValidation(),this.changes.clear(),this.$emit("reset")},addFinancialInfo:function(e){var t=this;this.internalLoading=!0,this.$apollo.mutate({mutation:ss.a,variables:{input:e}}).then((function(e){var n=e.data.addFinancialInfo;He["a"].$emit("show-snackbar",{color:"success",text:"Financial info was added successfully!"}),t.$emit("submit",Object(m["a"])(Object(m["a"])({},t.plan),{},{financialInfo:n}))})).catch((function(e){t.error=e})).finally((function(){t.internalLoading=!1}))},updateFinancialInfo:function(e){var t=this;this.internalLoading=!0,this.$apollo.mutate({mutation:ds.a,variables:{input:e}}).then((function(e){var n=e.data.updateFinancialInfo;He["a"].$emit("show-snackbar",{color:"success",text:"Financial info was updated successfully!"}),t.$emit("submit",Object(m["a"])(Object(m["a"])({},t.plan),{},{financialInfo:n}))})).catch((function(e){t.error=e})).finally((function(){t.internalLoading=!1}))}}},ps=fs,vs=(n("e6fe"),Object(S["a"])(ps,is,as,!1,null,"c3366c70",null)),hs=vs.exports;N()(vs,{VCol:lt["a"],VForm:le["a"],VProgressCircular:Nt["a"],VRow:se["a"],VSelect:ki["a"]});var ys=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("v-tabs",{attrs:{"hide-slider":"","show-arrows":"","next-icon":"fa-chevron-right","prev-icon":"fa-chevron-left"},model:{value:e.tab,callback:function(t){e.tab=t},expression:"tab"}},[n("v-tab",{key:0,staticClass:"tab",attrs:{"active-class":"active",ripple:!1}},[e._v(" Plan Components ")]),n("v-tab",{key:1,staticClass:"tab",attrs:{"active-class":"active",ripple:!1}},[e._v(" Completed Components ")])],1),n("v-tabs-items",{model:{value:e.tab,callback:function(t){e.tab=t},expression:"tab"}},[n("v-tab-item",{key:0},[n("active-components",{staticClass:"mt-6",attrs:{plan:e.plan}})],1),n("v-tab-item",{key:1},[n("completed-components",{staticClass:"mt-6",attrs:{plan:e.plan}})],1)],1),n("v-row",{staticClass:"mt-12",attrs:{"no-gutters":"",justify:"end"}},[n("v-col",{attrs:{"justify-self":"start"}},[n("btn",{attrs:{width:"100","color-type":"accent"},on:{click:e.onBackClick}},[e._v("Back")])],1),n("v-col",{attrs:{cols:"auto"}},[n("budget-planning",{attrs:{plan:e.plan}})],1),n("v-col",{attrs:{cols:"auto"}},[n("btn",{staticClass:"ml-6",attrs:{width:"100",link:"",to:{name:"plans"},"color-type":"accent"}},[e._v("Done")])],1)],1)],1)},bs=[],gs=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-row",{staticClass:"mb-6",attrs:{"no-gutters":""}},[n("alert",{attrs:{error:e.error}}),n("component-list",{attrs:{plan:e.plan,loading:e.loading,components:e.componentsOfNeed||[]}})],1)},ks=[],Ss=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("data-table-vs",{staticClass:"component-list",attrs:{items:e.displayedItems,headers:e.displayedHeaders,height:"611px","item-key":"id",loading:e.loading},scopedSlots:e._u([{key:"item.actions",fn:function(t){var i=t.item;return[n("div",{staticClass:"table-actions-bar"},[e.showDeleteBtn?n("confirmation-modal",{attrs:{mutation:e.DELETE_COMPLETED_COMPONENT_MUTATION,variables:{id:i.id},title:"Delete Completed Component",message:"Are you sure you want to delete completed component?","ok-btn":{label:"Delete"},update:e.onDelete(i)},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.on,a=t.attrs;return[n("v-icon",e._g(e._b({staticClass:"action",attrs:{small:""}},"v-icon",{attrs:a},!1),i),[e._v(" far fa-trash-alt ")])]}}],null,!0)}):e._e()],1)]}}])})},Cs=[],Ns=n("f8fb"),_s=n.n(Ns),ws=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ApolloMutation",e._g({staticClass:"update-component-form",attrs:{mutation:e.UPDATE_COMPONENT_OF_NEED_MUTATION,variables:{input:{id:e.component.id,facilityId:e.component.facility&&e.component.facility.id||null,systemId:e.component.system&&e.component.system.id||null,componentId:e.component.component&&e.component.component.id||null,status:e.component.status,yearCompleted:e.component.yearCompleted,actualCost:e.component.actualCost,description:e.component.description,componentUrl:e.component.componentUrl,componentFile:e.component.componentFile,yearForImprovement:e.component.yearForImprovement&&e.component.yearForImprovement.toString()||null,quantityOfComponents:e.component.quantityOfComponents,costPerUnit:e.component.costPerUnit,unitId:e.component.unit&&e.component.unit.id||null,conditionAssessmentId:e.component.conditionAssessment&&e.component.conditionAssessment.id||null,locationOfComponent:e.component.locationOfComponent,fundingSourceId:e.component.fundingSource&&e.component.fundingSource.id||null,budgetaryNotes:e.component.budgetaryNotes,internalNotes:e.component.internalNotes,componentNotes:e.component.componentNotes,softCost:e.component.softCost,flag:e.component.flag}},update:e.updateComponents},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.mutate,a=t.loading,o=t.error;return[a?e._e():n("alert",{attrs:{align:"center",error:o}}),n("component-form",e._b({on:{submit:function(e){return i()}}},"component-form",{btnLabel:"Update",loading:a,component:e.component,plan:e.plan,client:e.plan&&e.plan.client||null,isEdit:!0},!1))]}}])},e.$listeners))},xs=[],Es=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-form",{ref:"form",staticClass:"component-form",attrs:{"lazy-validation":"","aria-busy":e.loading,disabled:e.loading,autocomplete:"off"},on:{submit:function(t){return t.preventDefault(),e.onSubmit(t)}}},[n("v-row",{attrs:{"no-gutters":"",justify:"center"}},[n("v-col",{attrs:{cols:"3"}},[n("v-select",{attrs:{"item-text":"name",autofocus:"",items:e.facilities,rules:e.facilityRules,readonly:e.readonlyFields&&e.readonlyFields.includes("facility"),label:"Facility",required:""},on:{input:function(t){return e.component.facility=e.client.facilities.find((function(e){return e.name===t}))}},model:{value:e.component.facility,callback:function(t){e.$set(e.component,"facility",t)},expression:"component.facility"}}),n("v-select",{staticClass:"mt-1",attrs:{"item-text":"name",items:e.displayedSystems,rules:e.systemRules,label:"System",required:"",readonly:e.readonlyFields&&e.readonlyFields.includes("system")},on:{input:function(t){return e.component.system=e.displayedSystems.find((function(e){return e.name===t}))}},model:{value:e.component.system,callback:function(t){e.$set(e.component,"system",t)},expression:"component.system"}}),n("v-select",{staticClass:"mt-1",attrs:{"item-text":"name",items:e.components,rules:e.componentRules,label:"Component",required:"",readonly:e.readonlyFields&&e.readonlyFields.includes("component")},on:{input:function(t){return e.component.component=e.components.find((function(e){return e.name===t}))}},model:{value:e.component.component,callback:function(t){e.$set(e.component,"component",t)},expression:"component.component"}}),n("v-select",{staticClass:"mt-1",attrs:{items:e.statuses,"item-text":"name","item-value":"value",rules:e.statusRules,label:"Status",required:"",readonly:e.readonlyFields&&e.readonlyFields.includes("status")},scopedSlots:e._u([{key:"item",fn:function(t){var n=t.item;return[e._v(" "+e._s(n.name)+" ")]}},{key:"selection",fn:function(t){var n=t.item;return[e._v(" "+e._s(n.name)+" ")]}}]),model:{value:e.component.status,callback:function(t){e.$set(e.component,"status",t)},expression:"component.status"}}),e.isCompleted?n("v-select",{attrs:{items:e.years,rules:e.yearCompletedRules,label:"Year completed",required:"",readonly:e.readonlyFields&&e.readonlyFields.includes("yearCompleted")},model:{value:e.component.yearCompleted,callback:function(t){e.$set(e.component,"yearCompleted",t)},expression:"component.yearCompleted"}}):e._e(),e.isCompleted?n("v-text-field",{staticClass:"mt-1",attrs:{type:"number",rules:e.actualCostRules,label:"Actual cost",autocomplete:"off",prefix:"$","validate-on-blur":"",readonly:e.readonlyFields&&e.readonlyFields.includes("actualCost")},model:{value:e.component.actualCost,callback:function(t){e.$set(e.component,"actualCost",e._n(t))},expression:"component.actualCost"}}):e._e(),e.isCompleted?n("v-textarea",{staticClass:"mt-1",attrs:{rows:"1","auto-grow":"",label:"Notes of Component",autocomplete:"off",readonly:e.readonlyFields&&e.readonlyFields.includes("componentNotes")},model:{value:e.component.componentNotes,callback:function(t){e.$set(e.component,"componentNotes",t)},expression:"component.componentNotes"}}):e._e(),n("v-textarea",{staticClass:"mt-1",attrs:{rows:"1","auto-grow":"",label:"Description of Component",autocomplete:"off",readonly:e.readonlyFields&&e.readonlyFields.includes("description"),counter:"500",rules:e.descriptionRules},model:{value:e.component.description,callback:function(t){e.$set(e.component,"description",t)},expression:"component.description"}}),n("upload",{staticClass:"mt-4",attrs:{placeholder:"Upload component photo",accept:".pdf,image/*"},model:{value:e.upload,callback:function(t){e.upload=t},expression:"upload"}})],1),n("v-col",{attrs:{cols:"3",offset:"1"}},[n("v-select",{attrs:{items:e.years,rules:e.yearForImprovementRules,label:"Year Set for Improvement",required:"",readonly:e.readonlyFields&&e.readonlyFields.includes("yearForImprovement")},on:{change:e.onYearForImprovementChange},model:{value:e.component.yearForImprovement,callback:function(t){e.$set(e.component,"yearForImprovement",t)},expression:"component.yearForImprovement"}}),n("number-text-field",{attrs:{label:"Quantity of Components",rules:e.quantityOfComponentsRules,required:"","validate-on-blur":"",autocomplete:"off",readonly:e.readonlyFields&&e.readonlyFields.includes("quantityOfComponents")},model:{value:e.component.quantityOfComponents,callback:function(t){e.$set(e.component,"quantityOfComponents",e._n(t))},expression:"component.quantityOfComponents"}}),n("v-select",{staticClass:"mt-1",attrs:{"item-text":"name",rules:e.unitRules,items:e.units,label:"Unit",required:"",readonly:e.readonlyFields&&e.readonlyFields.includes("unit")},on:{input:function(t){return e.component.unit=e.units.find((function(e){return e.name===t}))}},model:{value:e.component.unit,callback:function(t){e.$set(e.component,"unit",t)},expression:"component.unit"}}),n("v-text-field",{staticClass:"mt-1",attrs:{type:"number",rules:e.costRules,label:"Cost Per Unit",prefix:"$",required:"",autocomplete:"off","validate-on-blur":"",readonly:e.readonlyFields&&e.readonlyFields.includes("costPerUnit")},model:{value:e.component.costPerUnit,callback:function(t){e.$set(e.component,"costPerUnit",e._n(t))},expression:"component.costPerUnit"}}),n("v-text-field",{staticClass:"mt-1",attrs:{label:"Base amount",prefix:"$",readonly:""},model:{value:e.baseAmount,callback:function(t){e.baseAmount=t},expression:"baseAmount"}}),n("v-text-field",{staticClass:"mt-1",attrs:{label:"Component Subtotal",prefix:"$",readonly:""},model:{value:e.componentSubtotal,callback:function(t){e.componentSubtotal=t},expression:"componentSubtotal"}}),n("v-text-field",{staticClass:"mt-1",attrs:{label:"Budget amount",prefix:"$",readonly:""},model:{value:e.budgetAmount,callback:function(t){e.budgetAmount=t},expression:"budgetAmount"}})],1),n("v-col",{attrs:{cols:"3",offset:"1"}},[n("v-select",{staticClass:"mt-1",attrs:{"item-text":"name",items:e.conditionAssessment,rules:e.conditionAssessmentRules,label:"Condition at Time of Assessment",required:"",readonly:e.readonlyFields&&e.readonlyFields.includes("conditionAssessment")},on:{input:function(t){return e.component.conditionAssessment=e.conditionAssessment.find((function(e){return e.name===t}))}},model:{value:e.component.conditionAssessment,callback:function(t){e.$set(e.component,"conditionAssessment",t)},expression:"component.conditionAssessment"}}),n("v-textarea",{staticClass:"mt-1",attrs:{rows:"1","auto-grow":"",label:"Location of Component",autocomplete:"off",readonly:e.readonlyFields&&e.readonlyFields.includes("locationOfComponent")},model:{value:e.component.locationOfComponent,callback:function(t){e.$set(e.component,"locationOfComponent",t)},expression:"component.locationOfComponent"}}),n("v-select",{staticClass:"mt-1",attrs:{"item-text":"name",items:e.fundingSource,rules:e.fundingSourceRules,label:"Funding Source",required:"",readonly:e.readonlyFields&&e.readonlyFields.includes("fundingSource")},on:{input:function(t){return e.component.fundingSource=e.fundingSource.find((function(e){return e.name===t}))}},scopedSlots:e._u([{key:"append-item",fn:function(){return[n("div",{staticClass:"add-source"},[n("btn",{staticClass:"add-source__btn",on:{click:e.openSourceModal}},[n("span",{staticClass:"add-source__plus"},[e._v("+")]),e._v(" Source")])],1)]},proxy:!0}]),model:{value:e.component.fundingSource,callback:function(t){e.$set(e.component,"fundingSource",t)},expression:"component.fundingSource"}}),n("v-textarea",{staticClass:"mt-1",attrs:{rows:"1","auto-grow":"",label:"Budgetary Notes",autocomplete:"off",readonly:e.readonlyFields&&e.readonlyFields.includes("budgetaryNotes"),counter:"500",rules:e.descriptionRules},model:{value:e.component.budgetaryNotes,callback:function(t){e.$set(e.component,"budgetaryNotes",t)},expression:"component.budgetaryNotes"}}),n("v-textarea",{staticClass:"mt-1",attrs:{rows:"1","auto-grow":"",label:"Internal Notes",autocomplete:"off",readonly:e.readonlyFields&&e.readonlyFields.includes("internalNotes"),counter:"500",rules:e.descriptionRules},model:{value:e.component.internalNotes,callback:function(t){e.$set(e.component,"internalNotes",t)},expression:"component.internalNotes"}}),n("v-checkbox",{staticClass:"mt-1",attrs:{label:"Soft Cost",readonly:e.readonlyFields&&e.readonlyFields.includes("softCost")},model:{value:e.component.softCost,callback:function(t){e.$set(e.component,"softCost",t)},expression:"component.softCost"}}),n("v-checkbox",{staticClass:"mt-1",attrs:{label:"Mark for Review",readonly:e.readonlyFields&&e.readonlyFields.includes("flag")},model:{value:e.component.flag,callback:function(t){e.$set(e.component,"flag",t)},expression:"component.flag"}})],1)],1),n("div",{staticClass:"mt-8 btns-bar"},[n("btn",{attrs:{type:"submit",width:"300",disabled:e.loading}},[e._v(e._s(e.btnLabel))])],1),n("modal",{ref:"source_modal",attrs:{title:"Add Funding Source",width:"290px"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.close;return[n("div",{staticClass:"row",staticStyle:{width:"100%"}},[n("v-text-field",{attrs:{label:"Source name",autocomplete:"off",required:"",rules:e.fundingSourceNameRules,"validate-on-blur":""},model:{value:e.newSourceName,callback:function(t){e.newSourceName=t},expression:"newSourceName"}})],1),n("div",{staticClass:"row"},[n("btn",{staticClass:"mt-3",on:{click:function(t){return e.addSource(i)}}},[e._v("Add new Source")])],1)]}}])})],1)},Fs=[],Os=n("8ca5"),Is=n.n(Os),Ts=n("b8ea"),Ds=n.n(Ts),As=n("c899"),Ps=n.n(As),$s=n("9a28"),Vs=n.n($s),js=n("4910"),Ls=n.n(js),Rs=n("9f02"),Us={name:"ComponentForm",components:{Btn:Oe["a"],NumberTextField:hi["a"],Upload:vi,Modal:Ie["a"]},props:{btnLabel:{type:String,required:!0},loading:{type:Boolean,default:!1},component:{type:Object},readonlyFields:{type:Array},plan:{type:Object},client:{type:Object},isEdit:{type:Boolean,default:!1}},apollo:{units:{query:Is.a,fetchPolicy:"cache-first",error:function(e){this.error=e.networkError?Object(m["a"])(Object(m["a"])({},e),{},{message:"Something went wrong! Could not load unit list."}):e}},systems:{query:Ds.a,fetchPolicy:"cache-first",error:function(e){this.error=e.networkError?Object(m["a"])(Object(m["a"])({},e),{},{message:"Something went wrong! Could not load system list."}):e}},conditionAssessment:{query:Ps.a,fetchPolicy:"cache-first",error:function(e){this.error=e.networkError?Object(m["a"])(Object(m["a"])({},e),{},{message:"Something went wrong! Could not load condition assessment list."}):e}},fundingSource:{query:Vs.a,fetchPolicy:"cache-first",error:function(e){this.error=e.networkError?Object(m["a"])(Object(m["a"])({},e),{},{message:"Something went wrong! Could not load funding source list."}):e}}},data:function(e){var t=e.plan&&e.plan.financialInfo&&parseInt(e.plan.financialInfo.planStartYear),n=t?us(t,t+19):[],i=e.component&&e.component.componentUrl?new File([""],e.component.componentUrl,{type:"image/plain"}):null;return Object(m["a"])(Object(m["a"])({},ae["a"]),{},{systems:[],statuses:[{name:Il[Ol.OPEN],value:Ol.OPEN},{name:Il[Ol.COMPLETED],value:Ol.COMPLETED}],units:[],conditionAssessment:[],yearCompletedRules:[function(e){return null!==e&&""!==e||"Year completed is Required"}],years:n,upload:i,status:e.component.status.autocapitalize,quantityOfComponentsRules:[function(e){return null!==e&&""!==e||"Quantity of Components is Required"}],unitRules:[function(e){return!!e||"Unit is Required"}],actualCostRules:[ae["a"].positiveNumber,ae["a"].floatNumber(2)],costRules:[function(e){return null!==e&&""!==e||"Cost is Required"},ae["a"].positiveNumber,ae["a"].floatNumber(2)],fundingSource:[],facilityRules:[function(e){return!!e||"Facility is Required"}],systemRules:[function(e){return!!e||"System is Required"}],componentRules:[function(e){return!!e||"Component is Required"}],statusRules:[function(e){return!!e||"Status is Required"}],yearForImprovementRules:[function(e){return!!e||"Year Set for Improvement is Required"}],conditionAssessmentRules:[function(e){return!!e||"Condition at Time of Assessment is Required"}],fundingSourceRules:[function(e){return!!e||"Funding Source is Required"}],fundingSourceNameRules:[function(e){return!!e||"Name is Required"}],newSourceName:"",descriptionRules:[function(e){return!e||e&&e.length<=500||"Max 500 characters"}]})},computed:{displayedSystems:function(){return Array.isArray(this.systems)?this.systems.sort(it["a"]):[]},components:function(){var e=this,t=this.component.system&&this.displayedSystems.find((function(t){return t.id===e.component.system.id})),n=t&&t.components||[];return n.sort(it["a"])},isCompleted:function(){return this.component.status===Ol.COMPLETED},baseAmount:function(){var e=this.component,t=e.quantityOfComponents,n=e.costPerUnit;return pt(t,n,this.plan.financialInfo.regionalCost)},componentSubtotal:function(){var e=this.plan.financialInfo,t=e.planStartYear,n=e.inflationCostEscalation;return vt(this.baseAmount,t,this.component.yearForImprovement,n)},budgetAmount:function(){return ht(this.componentSubtotal,this.plan.financialInfo.softCostPercentage,this.component.softCost)},facilities:function(){return this.client&&Array.isArray(this.client.facilities)&&this.client.facilities.sort(it["a"])},conditionByLabel:function(){return this.conditionAssessment.reduce((function(e,t){return e[t.name]=t,e}),{})}},watch:{"component.system":function(){this.component.component=null,this.component.costPerUnit=null,this.component.unit=null},"component.component":function(e){null!==e&&(this.component.costPerUnit=e.costPerUnit,this.component.unit=e.unit)},isCompleted:function(e){e||(this.component.yearCompleted=null,this.component.actualCost=null,this.component.componentNotes=null)},fundingSource:function(e){var t=this;e&&this.plan.financialInfo.typeOfPlan&&null===this.component.fundingSource&&(this.component.fundingSource=e.find((function(e){return t.plan.financialInfo.typeOfPlan.id===e.id}))||null)}},methods:{validate:function(){return this.$refs.form.validate()},onSubmit:function(){var e=this;this.validate()&&(this.component.componentFile=this.upload&&this.upload.name===this.component.componentUrl?null:this.upload,this.component.componentUrl=this.component.componentUrl&&!this.upload?null:this.component.componentUrl,this.$nextTick((function(){e.$emit("submit",e.component)})))},openSourceModal:function(){this.$refs.source_modal&&(this.$refs.source_modal.modalOpen=!0)},addSource:function(e){var t,n=this;(this.validate(),this.newSourceName)&&this.$apollo.mutate({mutation:Ls.a,variables:{input:{name:this.newSourceName}},update:function(e,n){var i=n.data.addFundingSource;if(i){t=i;var a=e.readQuery({query:Vs.a});Array.isArray(a["fundingSource"])&&(a["fundingSource"].push(i),a["fundingSource"].sort(it["a"]),e.writeQuery({query:Vs.a,data:a}))}}}).then((function(){He["a"].$emit("show-snackbar",{color:"success",text:'Funding Source "'.concat(n.newSourceName,'" is created!')}),n.component.fundingSource=t,n.newSourceName="","function"===typeof e&&e()})).catch((function(e){He["a"].$emit("show-snackbar",{color:"error",text:Object(Rs["a"])(e.message)}),console.warn("Add Funding Source error",e)}))},onYearForImprovementChange:function(e){var t=Number(e);if(t){var n=t-(new Date).getFullYear();switch(!0){case n<3:this.conditionByLabel["Poor"]&&(this.component.conditionAssessment=this.conditionByLabel["Poor"]);break;case n<7:this.conditionByLabel["Fair"]&&(this.component.conditionAssessment=this.conditionByLabel["Fair"]);break;case n<20:this.conditionByLabel["Good"]&&(this.component.conditionAssessment=this.conditionByLabel["Good"]);break}}}}},qs=Us,Bs=(n("fc4b"),Object(S["a"])(qs,Es,Fs,!1,null,null,null)),Ms=Bs.exports;N()(Bs,{VCheckbox:rt["a"],VCol:lt["a"],VForm:le["a"],VRow:se["a"],VSelect:ki["a"],VTextField:ce["a"],VTextarea:Si["a"]});var Ys=n("7eca"),Gs=n.n(Ys),zs={name:"EditComponent",components:{ComponentForm:Ms},props:{plan:{type:Object,default:null},data:{type:Object,default:null}},data:function(){return{UPDATE_COMPONENT_OF_NEED_MUTATION:Gs.a,component:this.data&&Object(m["a"])(Object(m["a"])({},this.data),{},{componentFile:null})||{system:null,facility:null,component:null,status:Ol.OPEN,yearCompleted:null,actualCost:null,description:null,componentUrl:null,componentFile:null,yearForImprovement:null,quantityOfComponents:null,unit:null,costPerUnit:null,baseAmount:null,componentSubtotal:null,budgetAmount:null,conditionAssessment:null,locationOfComponent:null,fundingSource:null,budgetaryNotes:null,internalNotes:null,componentNotes:null,softCost:!1,flag:!1}}},watch:{data:function(e){this.component=Object(m["a"])({},e)}},methods:{updateComponents:function(e,t){var n=t.data.updateComponentOfNeed;if(n){if(n.status===Ol.COMPLETED){var i=e.readQuery({query:Fl.a,variables:{planId:this.plan.id,status:Ol.OPEN}});i&&(i.componentsOfNeed=i.componentsOfNeed.filter((function(e){return e.id!==n.id})),e.writeQuery({query:Fl.a,variables:{planId:this.plan.id,status:Ol.OPEN},data:i}))}try{var a=e.readQuery({query:Fl.a,variables:{planId:this.plan.id,status:n.status}});if(a){var o=a.componentsOfNeed.findIndex((function(e){return e.id===n.id}));-1!==o?(a.componentsOfNeed[o]=n,a.componentsOfNeed=Object(Fi["a"])(a.componentsOfNeed)):a.componentsOfNeed.unshift(n),e.writeQuery({query:Fl.a,variables:{planId:this.plan.id,status:n.status},data:a})}}catch(r){}He["a"].$emit("show-snackbar",{color:"success",text:"Component was updated successfully!"})}else He["a"].$emit("show-snackbar",{color:"error",text:"Error! Something went wrong... Please try later!"})}}},Hs=zs,Qs=(n("5d0e"),Object(S["a"])(Hs,ws,xs,!1,null,null,null)),Ws=Qs.exports,Js={name:"ComponentList",components:{Btn:Oe["a"],ConfirmationModal:Le["a"],Modal:Ie["a"],EditComponent:Ws,ActionsMenu:Me,"data-table-vs":ml},props:{plan:{type:Object,default:null},components:{type:Array,default:[]},loading:{type:Boolean}},apollo:{currentUser:{query:y.a,fetchPolicy:"cache-only"}},data:function(){return{DELETE_COMPLETED_COMPONENT_MUTATION:_s.a,currentUser:null}},computed:{headers:function(){return[{text:"Facility",value:"facilityName",type:"select",dataType:"string",fixed:!0,width:"150px"},{text:"Component",value:"componentName",type:"select",dataType:"string",width:"180px"},{text:"Year Completed",value:"yearCompleted",type:"select",dataType:"year",width:"100px"},{text:"Actual Cost",value:"actualCost",type:"number",dataType:"currency",width:"120px"},{text:"Planned Cost",value:"budgetAmount",type:"number",dataType:"currency",width:"120px"},{text:"Quantity",value:"quantityOfComponents",type:"number",dataType:"number",width:"100px"},{text:"Location",value:"locationOfComponent",type:"text",dataType:"string",width:"130px"},{text:"Component Notes",value:"componentNotes",type:"text",dataType:"longstring",width:"180px"},{text:"Actions",value:"actions",sortable:!1,width:"53px",fixed:!0,permissions:[f["c"].DELETE_PLAN_COMPONENT]}]},displayedItems:function(){var e=this;return this.components?this.components.map((function(t){var n=t.quantityOfComponents,i=t.costPerUnit,a=t.yearForImprovement,o=t.softCost,r=e.plan.financialInfo,l=r.regionalCost,s=r.planStartYear,c=r.inflationCostEscalation,d=r.softCostPercentage,u=pt(n,i,l),f=vt(u,s,a,c),p=ht(f,d,o);return Object(m["a"])(Object(m["a"])({},t),{},{facilityName:t.facility&&t.facility.name||"",componentName:t.component&&t.component.name||"",budgetAmount:p})})):[]},displayedHeaders:function(){var e=this;return this.headers.filter((function(t){return!t.permissions||t.permissions.some((function(t){return Object(b["a"])(t,e.currentUser)}))}))},showEditBtn:function(){return Object(b["a"])(f["c"].EDIT_PLAN_COMPONENT,this.currentUser)},showDeleteBtn:function(){return Object(b["a"])(f["c"].DELETE_PLAN_COMPONENT,this.currentUser)}},methods:{onDelete:function(e){var t=this;return function(n,i){var a=i.data.deleteComponentOfNeed;if(a){var o=n.readQuery({query:Fl.a,variables:{planId:t.plan.id,status:e.status}});o.componentsOfNeed=o.componentsOfNeed.filter((function(t){return t.id!==e.id})),n.writeQuery({query:Fl.a,variables:{planId:t.plan.id,status:e.status},data:o}),He["a"].$emit("show-snackbar",{color:"success",text:"Component was deleted successfully!"})}}}}},Xs=Js,Zs=Object(S["a"])(Xs,Ss,Cs,!1,null,null,null),Ks=Zs.exports;N()(Zs,{VIcon:_["a"]});var ec={name:"CompletedComponents",components:{Btn:Oe["a"],Modal:Ie["a"],ComponentList:Ks},props:{plan:{type:Object,default:null}},apollo:{currentUser:{query:y.a,fetchPolicy:"cache-only"},componentsOfNeed:{query:Fl.a,variables:function(){return{planId:this.plan&&this.plan.id||null,status:Ol.COMPLETED}},skip:function(){return null===this.plan||!this.plan.id},error:function(e){this.error=e.networkError?Object(m["a"])(Object(m["a"])({},e),{},{message:"Something went wrong! Could not load completed components."}):e}}},data:function(){return{currentUser:null,componentsOfNeed:null,error:null}},computed:{loading:function(){return this.$apollo.queries.componentsOfNeed.loading}}},tc=ec,nc=Object(S["a"])(tc,gs,ks,!1,null,null,null),ic=nc.exports;N()(nc,{VRow:se["a"]});var ac=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("v-row",{staticClass:"mb-6",attrs:{"no-gutters":"",justify:"end"}},[n("budget-calculation-info"),n("data-table-columns",{attrs:{headers:e.headers,uId:e.TABLE_UID},model:{value:e.selectedHeaders,callback:function(t){e.selectedHeaders=t},expression:"selectedHeaders"}}),n("modal",{attrs:{title:"Add Component",width:"812px"},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on,a=t.attrs;return[n("btn",e._g(e._b({directives:[{name:"show",rawName:"v-show",value:e.showAddComponentBtn,expression:"showAddComponentBtn"}],staticClass:"ml-6",attrs:{width:"180"}},"btn",a,!1),i),[e._v("Add Component")])]}},{key:"default",fn:function(t){var i=t.close;return[n("add-component",{attrs:{plan:e.plan},on:{done:i}})]}}])})],1),n("v-row",{attrs:{"no-gutters":""}},[n("alert",{attrs:{error:e.error}}),n("component-list",{attrs:{plan:e.plan,loading:e.loading,components:e.components,"selected-headers":e.selectedHeaders},on:{initHeaders:e.onInitHeaders}})],1)],1)},oc=[],rc=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ApolloMutation",e._g({staticClass:"add-component-form",attrs:{mutation:e.ADD_COMPONENT_OF_NEED_MUTATION,variables:{input:{facilityId:e.component.facility&&e.component.facility.id||null,systemId:e.component.system&&e.component.system.id||null,componentId:e.component.component&&e.component.component.id||null,status:e.component.status,yearCompleted:e.component.yearCompleted,actualCost:e.component.actualCost,description:e.component.description,componentFile:e.component.componentFile,yearForImprovement:e.component.yearForImprovement&&e.component.yearForImprovement.toString()||null,quantityOfComponents:e.component.quantityOfComponents,costPerUnit:e.component.costPerUnit,unitId:e.component.unit&&e.component.unit.id||null,conditionAssessmentId:e.component.conditionAssessment&&e.component.conditionAssessment.id||null,locationOfComponent:e.component.locationOfComponent,fundingSourceId:e.component.fundingSource&&e.component.fundingSource.id||null,budgetaryNotes:e.component.budgetaryNotes,internalNotes:e.component.internalNotes,componentNotes:e.component.componentNotes,softCost:e.component.softCost,flag:e.component.flag,planId:e.plan&&e.plan.id||null}},update:e.updateComponents},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.mutate,a=t.loading,o=t.error;return[a?e._e():n("alert",{attrs:{align:"center",error:o}}),n("component-form",e._b({on:{submit:function(e){return i()}}},"component-form",{btnLabel:"Add",loading:a,component:e.component,plan:e.plan,client:e.plan&&e.plan.client||null},!1))]}}])},e.$listeners))},lc=[],sc=n("894d"),cc=n.n(sc),dc={name:"AddComponent",components:{ComponentForm:Ms},props:{plan:{type:Object,default:null}},data:function(){return{ADD_COMPONENT_OF_NEED_MUTATION:cc.a,component:{system:null,facility:null,component:null,status:Ol.OPEN,yearCompleted:null,actualCost:null,description:null,componentFile:null,yearForImprovement:null,quantityOfComponents:null,unit:null,costPerUnit:null,baseAmount:null,componentSubtotal:null,budgetAmount:null,conditionAssessment:null,locationOfComponent:null,fundingSource:null,budgetaryNotes:null,internalNotes:null,componentNotes:null,softCost:!1,flag:!1}}},methods:{updateComponents:function(e,t){var n=t.data.addComponentOfNeed;if(n){var i=e.readQuery({query:Fl.a,variables:{planId:this.plan.id,status:n.status}});i&&(i.componentsOfNeed.unshift(n),e.writeQuery({query:Fl.a,variables:{planId:this.plan.id,status:n.status},data:i})),He["a"].$emit("show-snackbar",{color:"success",text:"Component was added successfully!"})}else He["a"].$emit("show-snackbar",{color:"error",text:"Error! Something went wrong... Please try later!"})}}},uc=dc,mc=(n("36f4"),Object(S["a"])(uc,rc,lc,!1,null,null,null)),fc=mc.exports,pc=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("data-table-vs",{staticClass:"component-list",attrs:{items:e.displayedItems,headers:e.displayedHeaders,height:"611px","item-key":"id",loading:e.loading,resetBtnParams:{show:!0,isAbsolute:!0}},on:{filtered:function(t){return e.$emit("filtered",t)},mounted:e.setFlagFilterDefault,reset:e.resetFlagFilter},scopedSlots:e._u([{key:"filter.flag",fn:function(t){var i=t.item,a=t.callback;return[n("div",{staticClass:"select-wrapper",staticStyle:{width:"97px"}},[n("v-select",{ref:"flag_filter",attrs:{outlined:"",dense:"",multiple:"","full-width":"","hide-details":"",clearable:"",items:["Marked","Unmarked"],default:i},on:{change:function(t){return e.onFlagFilter(i,a)}},model:{value:e.flagFilterModel,callback:function(t){e.flagFilterModel=t},expression:"flagFilterModel"}})],1)]}},{key:"item.flag",fn:function(t){var i=t.item;return[n("div",{staticClass:"text-center"},[n("v-icon",{attrs:{color:e.$vuetify.theme.themes.light.accent},on:{click:function(t){return e.onFlagClick(i)}}},[e._v(e._s(i.flag?"fas":"far")+" fa-flag")])],1)]}},{key:"item.softCost",fn:function(e){var t=e.item;return[n("v-simple-checkbox",{attrs:{value:t.softCost,ripple:!1,readonly:""}})]}},{key:"item.componentUrl",fn:function(t){var i=t.item;return[i.componentUrl?n("a",{attrs:{href:i.componentUrl,target:"_blank"}},[e._v("Link to Photo")]):e._e()]}},{key:"item.actions",fn:function(e){var t=e.item;return[n("actions-menu",{attrs:{actions:t.actions}})]}}])})},vc=[],hc=(n("caad"),n("2532"),n("b44d")),yc=n.n(hc),bc=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ApolloMutation",e._g({staticClass:"complete-component",attrs:{mutation:e.COMPLETE_COMPONENT_OF_NEED_MUTATION,variables:{input:{id:e.component.id,yearCompleted:e.component.yearCompleted,actualCost:e.component.actualCost,componentNotes:e.component.componentNotes}},update:e.updateComponents},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.mutate,a=t.loading,o=t.error;return[a?e._e():n("alert",{attrs:{align:"center",error:o}}),n("complete-component-form",e._b({on:{submit:function(e){return i()}}},"complete-component-form",{loading:a,component:e.component,plan:e.plan},!1))]}}])},e.$listeners))},gc=[],kc=n("45ae"),Sc=n.n(kc),Cc=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-form",{ref:"form",staticClass:"complete-component-form",attrs:{"lazy-validation":"","aria-busy":e.loading,disabled:e.loading,autocomplete:"off"},on:{submit:function(t){return t.preventDefault(),e.onSubmit(t)}}},[n("v-row",{attrs:{"no-gutters":""}},[n("v-col",[n("v-select",{attrs:{items:e.years,rules:e.yearCompletedRules,label:"Year completed",required:""},model:{value:e.component.yearCompleted,callback:function(t){e.$set(e.component,"yearCompleted",t)},expression:"component.yearCompleted"}}),n("v-text-field",{staticClass:"mt-1",attrs:{type:"number",rules:e.actualCostRules,label:"Actual cost",autocomplete:"off",prefix:"$","validate-on-blur":""},model:{value:e.component.actualCost,callback:function(t){e.$set(e.component,"actualCost",e._n(t))},expression:"component.actualCost"}}),n("v-textarea",{staticClass:"mt-1",attrs:{rows:"1","auto-grow":"",label:"Notes of Component",autocomplete:"off"},model:{value:e.component.componentNotes,callback:function(t){e.$set(e.component,"componentNotes",t)},expression:"component.componentNotes"}})],1)],1),n("div",{staticClass:"mt-8 btns-bar"},[n("btn",{attrs:{type:"submit",width:"300",disabled:e.loading}},[e._v("Complete")])],1)],1)},Nc=[],_c={name:"CompleteComponentForm",components:{Btn:Oe["a"],NumberTextField:hi["a"]},props:{loading:{type:Boolean,default:!1},component:{type:Object},plan:{type:Object}},data:function(e){var t=e.plan&&e.plan.financialInfo&&parseInt(e.plan.financialInfo.planStartYear),n=t?us(t,t+19):[];return Object(m["a"])(Object(m["a"])({},ae["a"]),{},{yearCompletedRules:[function(e){return null!==e&&""!==e||"Year completed is Required"}],years:n,actualCostRules:[ae["a"].positiveNumber,ae["a"].floatNumber(2)]})},methods:{validate:function(){return this.$refs.form.validate()},onSubmit:function(){this.validate()&&this.$emit("submit",this.component)}}},wc=_c,xc=(n("8295"),Object(S["a"])(wc,Cc,Nc,!1,null,null,null)),Ec=xc.exports;N()(xc,{VCol:lt["a"],VForm:le["a"],VRow:se["a"],VSelect:ki["a"],VTextField:ce["a"],VTextarea:Si["a"]});var Fc={name:"CompleteComponent",components:{CompleteComponentForm:Ec},props:{plan:{type:Object,default:null},data:{type:Object,default:null}},data:function(e){return{COMPLETE_COMPONENT_OF_NEED_MUTATION:Sc.a,component:e.data&&Object(m["a"])({},e.data)||{yearCompleted:null,actualCost:null,componentNotes:null}}},watch:{data:function(e){this.component=Object(m["a"])({},e)}},methods:{updateComponents:function(e,t){var n=t.data.completedComponentOfNeed;if(n){var i=e.readQuery({query:Fl.a,variables:{planId:this.plan.id,status:Ol.OPEN}});i&&(i.componentsOfNeed=i.componentsOfNeed.filter((function(e){return e.id!==n.id})),e.writeQuery({query:Fl.a,variables:{planId:this.plan.id,status:Ol.OPEN},data:i}));try{i=e.readQuery({query:Fl.a,variables:{planId:this.plan.id,status:n.status}}),i&&(i.componentsOfNeed.unshift(n),e.writeQuery({query:Fl.a,variables:{planId:this.plan.id,status:n.status},data:i}))}catch(a){}He["a"].$emit("show-snackbar",{color:"success",text:"Status of the component was changes successfully!"})}else He["a"].$emit("show-snackbar",{color:"error",text:"Error! Something went wrong... Please try later!"})}}},Oc=Fc,Ic=(n("9392"),Object(S["a"])(Oc,bc,gc,!1,null,null,null)),Tc=Ic.exports,Dc={name:"ComponentList",mixins:[Sl],components:{Btn:Oe["a"],ConfirmationModal:Le["a"],Modal:Ie["a"],EditComponent:Ws,CompleteComponent:Tc,ActionsMenu:Me,"data-table-vs":ml},props:{plan:{type:Object,default:null},components:{type:Array,default:[]},selectedHeaders:{type:Array,default:[]},loading:{type:Boolean}},apollo:{currentUser:{query:y.a,fetchPolicy:"cache-only"}},data:function(){return{currentUser:null,flagFilterModel:[]}},computed:{headers:function(){return[{text:"Flag",value:"flag",dataType:"string",width:"40px",fixed:!0,type:"slot"},{text:"Facility",value:"facilityName",type:"select",dataType:"string",fixed:!0,width:"150px"},{text:"System",value:"systemName",type:"select",dataType:"string",width:"180px"},{text:"Component",value:"componentName",type:"select",dataType:"string",width:"180px"},{text:"Year",value:"yearForImprovement",type:"select",dataType:"year",width:"100px"},{text:"Quantity",value:"quantityOfComponents",type:"number",dataType:"number",width:"80px"},{text:"Unit",value:"unitName",type:"select",dataType:"string",width:"100px"},{text:"Cost Per Unit",value:"costPerUnit",type:"number",dataType:"currency",width:"100px"},{text:"Base Amount",value:"baseAmount",type:"number",dataType:"currency",width:"100px"},{text:"Component Subtotal",value:"componentSubtotal",type:"number",dataType:"currency",width:"100px"},{text:"Soft Cost",value:"softCost",width:"70px"},{text:"Budget Amount",value:"budgetAmount",type:"number",dataType:"currency",width:"120px"},{text:"Budgetary Notes",value:"budgetaryNotes",type:"text",dataType:"longstring",width:"180px"},{text:"Description",value:"description",type:"text",dataType:"longstring",width:"180px"},{text:"Condition",value:"conditionName",type:"select",dataType:"string",width:"100px",noSort:!0},{text:"Location",value:"locationOfComponent",type:"text",dataType:"longstring",width:"130px"},{text:"Image",value:"componentUrl",width:"100px"},{text:"Funding Source",value:"fundingSourceName",type:"select",dataType:"string",width:"100px"},{text:"Internal Notes",value:"internalNotes",type:"text",dataType:"longstring",width:"180px"},{text:"Actions",value:"actions",sortable:!1,width:"53px",fixed:!0,permissions:[f["c"].EDIT_PLAN_COMPONENT,f["c"].DELETE_PLAN_COMPONENT]}]},displayedItems:function(){var e=this;return this.components?this.components.map((function(t){var n=bt(t,e.plan);return Object(m["a"])(Object(m["a"])(Object(m["a"])({},t),{},{facilityName:t.facility&&t.facility.name||"",systemName:t.system&&t.system.name||"",componentName:t.component&&t.component.name||"",unitName:t.unit&&t.unit.name||"",conditionName:t.conditionAssessment&&t.conditionAssessment.name||"",fundingSourceName:t.fundingSource&&t.fundingSource.name||""},n),{},{actions:[Object(b["a"])(f["c"].EDIT_PLAN_COMPONENT,e.currentUser)&&{name:"Edit",modal:{type:"common",props:{title:"Edit Component",width:"812px"},content:{componentName:Ws,props:{plan:e.plan,data:t}}}},Object(b["a"])(f["c"].EDIT_PLAN_COMPONENT,e.currentUser)&&{name:"Complete",modal:{type:"common",props:{title:"Complete Component",width:"480px"},content:{componentName:Tc,props:{plan:e.plan,data:t}}}},Object(b["a"])(f["c"].EDIT_PLAN_COMPONENT,e.currentUser)&&{name:"Clone",modal:{props:{mutation:yc.a,variables:{id:t.id},title:"Clone Component",message:"Are you sure you want to clone component?",okBtn:{label:"Clone"},update:e.onCloneComponent(t)}}},Object(b["a"])(f["c"].DELETE_PLAN_COMPONENT,e.currentUser)&&{name:"Delete",modal:{props:{mutation:_s.a,variables:{id:t.id},title:"Delete Component",message:"Are you sure you want to delete component?",okBtn:{label:"Delete"},update:e.onDelete(t)}}}]})})):[]},availableHeaders:function(){var e=this,t=this.headers.filter((function(t){return!t.permissions||t.permissions.some((function(t){return Object(b["a"])(t,e.currentUser)}))}));return this.$emit("initHeaders",t),t},displayedHeaders:function(){var e=this;return this.availableHeaders.filter((function(t,n){return e.selectedHeaders?e.selectedHeaders.includes(n):t}))},showEditBtn:function(){return Object(b["a"])(f["c"].EDIT_PLAN_COMPONENT,this.currentUser)},showDeleteBtn:function(){return Object(b["a"])(f["c"].DELETE_PLAN_COMPONENT,this.currentUser)},flagFilterIcon:function(){return 0===this.flagFilterModel.length?"fa-star-half-alt":!0===this.flagFilterModel[0]?"fas fa-star":!1===this.flagFilterModel[0]?"far fa-star":void 0}},methods:{onCloneComponent:function(){var e=this;return function(t,n){var i=n.data.cloneComponentOfNeed;if(i){var a=t.readQuery({query:Fl.a,variables:{planId:e.plan.id,status:i.status}});a&&(a.componentsOfNeed.unshift(i),t.writeQuery({query:Fl.a,variables:{planId:e.plan.id,status:i.status},data:a})),He["a"].$emit("show-snackbar",{color:"success",text:"Component was cloned successfully!"})}}},onDelete:function(e){var t=this;return function(n,i){var a=i.data.deleteComponentOfNeed;if(a){var o=n.readQuery({query:Fl.a,variables:{planId:t.plan.id,status:e.status}});o&&(o.componentsOfNeed=o.componentsOfNeed.filter((function(t){return t.id!==e.id})),n.writeQuery({query:Fl.a,variables:{planId:t.plan.id,status:e.status},data:o})),He["a"].$emit("show-snackbar",{color:"success",text:"Component was deleted successfully!"})}}}}},Ac=Dc,Pc=Object(S["a"])(Ac,pc,vc,!1,null,null,null),$c=Pc.exports;N()(Pc,{VIcon:_["a"],VSelect:ki["a"],VSimpleCheckbox:dl["a"]});var Vc=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-menu",{attrs:{bottom:"","min-width":"150px","close-on-content-click":!1,rounded:"","offset-y":""},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on;return[n("v-btn",e._g({staticClass:"menu-activator",attrs:{"color-type":"secondary",text:""}},i),[e._v(" Columns "),e.menuOpen?n("v-icon",{staticClass:"icon ml-2"},[e._v("fa-caret-up")]):n("v-icon",{staticClass:"icon ml-2"},[e._v("fa-caret-down")])],1)]}}]),model:{value:e.menuOpen,callback:function(t){e.menuOpen=t},expression:"menuOpen"}},[n("v-card",{staticClass:"headers-container"},[n("v-list",{staticClass:"headers",attrs:{dense:""}},[n("v-list-item-group",{attrs:{multiple:"","active-class":"header-active"},model:{value:e.selected,callback:function(t){e.selected=t},expression:"selected"}},[e._l(e.headers,(function(t,i){return[n("v-list-item",{key:i,staticClass:"header",attrs:{color:"primary",dense:"",tabindex:"0"},scopedSlots:e._u([{key:"default",fn:function(i){var a=i.active;return[n("v-list-item-action",{staticClass:"header-selection"},[n("v-checkbox",{attrs:{dense:"","hide-details":"","input-value":a,tabindex:"0"}})],1),n("v-list-item-content",[n("v-list-item-title",[e._v(" "+e._s(t.text)+" ")])],1)]}}],null,!0)})]}))],2)],1)],1)],1)},jc=[],Lc=n("3552"),Rc={name:"DataTableColumns",model:{prop:"value",event:"change"},props:{value:{type:Array},headers:{type:Array},uId:{type:String}},data:function(){return{menuOpen:!1,selected:[]}},watch:{headers:{immediate:!0,handler:function(e){var t=this;if(null===this.value&&e&&e.length>0){var n=e.map((function(e,t){return t}));if(this.uId){var i=Object(Lc["b"])(this.uId);if(i){n=[];var a=i.every((function(i){var a=e.findIndex((function(e){return i.value===e.value}));return a>-1?n.push(a):(Object(Lc["d"])(t.uId,void 0),n=[]),a>-1}));a||(Object(Lc["d"])(this.uId,void 0),n=[])}}this.selected=n,this.$emit("change",n)}}},value:function(e){null!==e&&JSON.stringify(this.selected)!==JSON.stringify(e)&&(this.selected=e)},menuOpen:function(e){var t=this;if(!e&&JSON.stringify(this.selected)!==JSON.stringify(this.value)){if(this.uId){var n=this.selected.map((function(e){return t.headers[e]}));Object(Lc["d"])(this.uId,n)}this.$emit("change",this.selected)}}},methods:{onModalClose:function(){this.menuOpen=!1}}},Uc=Rc,qc=(n("f85a"),Object(S["a"])(Uc,Vc,jc,!1,null,null,null)),Bc=qc.exports;N()(qc,{VBtn:A["a"],VCard:he["a"],VCheckbox:rt["a"],VIcon:_["a"],VList:w["a"],VListItem:x["a"],VListItemAction:st["a"],VListItemContent:E["a"],VListItemGroup:ct["a"],VListItemTitle:E["b"],VMenu:qe["a"]});var Mc=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-tooltip",{attrs:{top:"","nudge-top":"-5","open-on-click":!0,"max-width":"500px","open-on-hover":!1,color:"ics-light-grey-blue"},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on,a=t.attrs;return[n("btn",e._b({attrs:{icon:"","color-type":"secondary"},on:{click:i.click}},"btn",a,!1),[n("v-icon",[e._v("fa-info-circle")])],1)]}}])},[n("dl",{staticClass:"budget-info"},[n("dd",[e._v("Base Amount")]),n("dt",[e._v("= Quantity x Costs per unit x Regional cost%")]),n("dd",[e._v("Component Subtotal")]),n("dt",[e._v("= Base amount x Inflation escalation%")]),n("dd",[e._v("Budget Amount")]),n("dt",[e._v("= Component Subtotal x (1+ Soft costs % )")])])])},Yc=[],Gc={name:"BudgetCalculationInfo",components:{Btn:Oe["a"]}},zc=Gc,Hc=(n("4230"),Object(S["a"])(zc,Mc,Yc,!1,null,null,null)),Qc=Hc.exports;N()(Hc,{VIcon:_["a"],VTooltip:gn["a"]});var Wc="PLAN_ACTIVE_COMPONENTS",Jc={name:"ActiveComponents",components:{Btn:Oe["a"],Modal:Ie["a"],AddComponent:fc,ComponentList:$c,DataTableColumns:Bc,BudgetCalculationInfo:Qc},props:{plan:{type:Object}},apollo:{currentUser:{query:y.a,fetchPolicy:"cache-only"},componentsOfNeed:{query:Fl.a,variables:function(){return{planId:this.plan&&this.plan.id||null,status:Ol.OPEN}},skip:function(){return null===this.plan||!this.plan.id},error:function(e){this.error=e.networkError?Object(m["a"])(Object(m["a"])({},e),{},{message:"Something went wrong! Could not load plan components."}):e}}},data:function(){return{TABLE_UID:Wc,currentUser:null,componentsOfNeed:null,error:null,headers:[],selectedHeaders:null}},computed:{loading:function(){return this.$apollo.queries.componentsOfNeed.loading},showAddComponentBtn:function(){return Object(b["a"])(f["c"].ADD_PLAN_COMPONENT,this.currentUser)},components:function(){return JSON.parse(JSON.stringify(this.componentsOfNeed))||[]}},methods:{onInitHeaders:function(e){this.headers=e}}},Xc=Jc,Zc=Object(S["a"])(Xc,ac,oc,!1,null,null,null),Kc=Zc.exports;N()(Zc,{VRow:se["a"]});var ed=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("modal",{ref:"main_modal",attrs:{fullscreen:"",persistent:!0,"no-click-animation":!0,closeFunction:e.confirmBudgetPlanning},on:{close:e.onModalClose},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on,a=t.attrs;return[n("btn",e._g(e._b({attrs:{width:"180"}},"btn",a,!1),i),[e._v("Budget Planning")])]}},{key:"modal-header",fn:function(t){var i=t.close;return[n("v-row",{staticClass:"mt-3 mb-3",attrs:{"no-gutters":"",justify:"start"}},[n("h1",{staticClass:"mr-10"},[e._v(" Budget Planning / "),n("span",{on:{click:i}},[e._v(e._s(e.plan.name))])]),e.showGenerateReportBtn?n("modal",{attrs:{title:"Generate Report",width:"380px"},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on,a=t.attrs;return[n("btn",e._g(e._b({staticClass:"mr-6",attrs:{width:"110","color-type":"accent",disabled:e.loading||e.internalLoading}},"btn",a,!1),i),[e._v("Report")])]}},{key:"default",fn:function(t){var i=t.close;return[n("components-report",{attrs:{disableYearSlider:e.isHideReportSlider,plan:e.plan,components:e.reportComponents},on:{done:i}})]}}],null,!0)}):e._e(),n("modal",{attrs:{width:"500px","no-close":!0,persistent:!0},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on,a=t.attrs;return[n("btn",e._g(e._b({staticClass:"mr-6",attrs:{width:"170",disabled:e.loading||e.internalLoading||0===e.changes.length}},"btn",a,!1),i),[e._v("Apply to Plan")])]}},{key:"modal-header",fn:function(){return[n("h3",{staticClass:"modal-title mt-8"},[e._v("Are you sure you want to save the changes and apply them to the plan?")])]},proxy:!0},{key:"default",fn:function(t){var i=t.close;return[n("div",{staticClass:"row mt-2"},[n("btn",{staticClass:"mr-6",on:{click:function(t){return e.onApplyToPlan(i)}}},[e._v("Yes")]),e._v(" "),n("btn",{on:{click:i}},[e._v("No")])],1)]}}],null,!0)}),n("modal",{ref:"confirm_modal",attrs:{width:"500px","no-close":!0,persistent:!0},scopedSlots:e._u([{key:"modal-header",fn:function(){return[n("h3",{staticClass:"modal-title mt-8"},[e._v(" Are you sure you want to close the window? Unsaved data will be lost and not be applied to the plan ")])]},proxy:!0},{key:"default",fn:function(t){var i=t.close;return[n("div",{staticClass:"row mt-2"},[n("btn",{staticClass:"mr-6",on:{click:e.closeBudgetPopup}},[e._v("Yes")]),e._v(" "),n("btn",{on:{click:i}},[e._v("No")])],1)]}}],null,!0)}),n("btn",{directives:[{name:"show",rawName:"v-show",value:e.selected.length>0,expression:"selected.length > 0"}],attrs:{width:"150","color-type":"accent",text:"",disabled:e.loading||e.internalLoading},on:{click:e.onReset}},[e._v("Reset Included")])],1)]}},{key:"default",fn:function(t){var i=t.close;return[n("div",{staticClass:"budget-planning mt-2",on:{done:i}},[n("alert",{attrs:{error:e.error}}),n("v-expansion-panels",{attrs:{flat:"",value:e.expanded,multiple:""}},[n("v-expansion-panel",[n("expansion-panel-header",[e._v(" Clients & Components Budget ")]),n("v-expansion-panel-content",[n("div",{staticClass:"budget-table-container"},[n("budget-table",{attrs:{components:e.components,changes:e.changes,plan:e.plan,loading:e.loading}})],1)])],1),n("v-expansion-panel",[n("expansion-panel-header",[e._v(" Financial Information ")]),n("v-expansion-panel-content",[e.plan&&e.plan.financialInfo?n("v-row",{attrs:{"no-gutters":""}},[n("v-col",{staticClass:"financial-info-details"},[n("plan-financial-info",{attrs:{plan:e.plan}})],1)],1):n("v-row",{attrs:{"no-gutters":""}},[e._v("No financial information")])],1)],1)],1),n("v-row",{staticClass:"mt-3",attrs:{"no-gutters":"",justify:"end"}},[n("modal",{attrs:{title:"Bulk year change",width:"380px"},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on,a=t.attrs;return[n("btn",e._g(e._b({directives:[{name:"show",rawName:"v-show",value:e.showBulkYearChangeBtn,expression:"showBulkYearChangeBtn"}],staticClass:"ml-6",attrs:{width:"200"}},"btn",a,!1),i),[e._v("Bulk year change ")])]}},{key:"default",fn:function(t){var i=t.close;return[e._v("` "),n("v-select",{attrs:{items:e.years,label:"Year Set for Improvement",required:""},model:{value:e.selectedYear,callback:function(t){e.selectedYear=t},expression:"selectedYear"}}),n("btn",{attrs:{width:"200"},on:{click:function(t){e.bulkUpdateComponentsYear(e.selectedYear),i()}}},[e._v("Update components ")])]}}],null,!0)}),n("budget-calculation-info"),n("data-table-columns",{attrs:{headers:e.headers,uId:e.TABLE_UID},model:{value:e.selectedHeaders,callback:function(t){e.selectedHeaders=t},expression:"selectedHeaders"}})],1),n("component-list",{ref:"component_list",staticClass:"mt-3",attrs:{plan:e.plan,loading:e.loading,components:e.components,readonly:!e.canEdit,changes:e.changes,selected:e.selected,filtered:e.filtered,"show-select":e.showGenerateReportBtn,"selected-headers":e.selectedHeaders},on:{change:e.onChange,select:e.onSelect,filtered:e.onFilter,initHeaders:e.onInitHeaders}})],1)]}}])})},td=[],nd=n("3835"),id=(n("4fad"),function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("data-table-vs",e._g({ref:"data_table",staticClass:"component-list mt-6",attrs:{items:e.displayedItems,headers:e.displayedHeaders,height:"611px","item-key":"id",loading:e.loading,"show-select":e.showSelect,"select-label":"Include",resetBtnParams:{show:!0,isAbsolute:!0},enableStoredFilter:!1,"item-class":e.itemClass},on:{reset:e.resetFlagFilter},scopedSlots:e._u([{key:"filter.flag",fn:function(t){var i=t.item,a=t.callback;return[n("div",{staticClass:"select-wrapper",staticStyle:{width:"97px"}},[n("v-select",{ref:"flag_filter",attrs:{outlined:"",dense:"",multiple:"","full-width":"","hide-details":"",clearable:"",items:["Marked","Unmarked"],default:i},on:{change:function(t){return e.onFlagFilter(i,a)}},model:{value:e.flagFilterModel,callback:function(t){e.flagFilterModel=t},expression:"flagFilterModel"}})],1)]}},{key:"item.flag",fn:function(t){var i=t.item;return[n("div",{staticClass:"text-center"},[n("v-icon",{attrs:{color:e.$vuetify.theme.themes.light.accent},on:{click:function(t){return e.onFlagClick(i)}}},[e._v(e._s(i.flag?"fas":"far")+" fa-flag")])],1)]}},e.readonly?null:{key:"item.yearForImprovement",fn:function(t){return[n("edit-dialog",{on:{close:function(n){return e.onSave(t.item,"yearForImprovement")},open:function(n){return e.onOpen(t.item,"yearForImprovement")}},scopedSlots:e._u([{key:"dialog",fn:function(){return[e.editableField?n("v-form",{staticClass:"inline-editing-form",on:{submit:function(n){return n.preventDefault(),e.onSave(t.item,"yearForImprovement")}},model:{value:e.valid,callback:function(t){e.valid=t},expression:"valid"}},[n("v-select",{attrs:{items:e.years,label:"Edit Year Set for Improvement"},model:{value:e.editableField,callback:function(t){e.editableField=t},expression:"editableField"}})],1):e._e()]},proxy:!0},{key:"text",fn:function(){return[e._v(e._s(t.item.yearForImprovement))]},proxy:!0}],null,!0)})]}},e.readonly?null:{key:"item.unitName",fn:function(t){return[n("edit-dialog",{on:{open:function(n){return e.onOpen(t.item,"unit")},close:function(n){return e.onSave(t.item,"unit")}},scopedSlots:e._u([{key:"dialog",fn:function(){return[e.editableField?n("v-form",{staticClass:"inline-editing-form",on:{submit:function(n){return n.preventDefault(),e.onSave(t.item,"unit")}},model:{value:e.valid,callback:function(t){e.valid=t},expression:"valid"}},[n("v-select",{attrs:{"item-text":"name",items:e.units,label:"Edit Unit"},on:{input:function(t){return e.editableField=e.units.find((function(e){return e.name===t}))}},model:{value:e.editableField,callback:function(t){e.editableField=t},expression:"editableField"}})],1):e._e()]},proxy:!0},{key:"text",fn:function(){return[e._v(" "+e._s(t.item.unit&&t.item.unit.name||""))]},proxy:!0}],null,!0)})]}},e.readonly?null:{key:"item.conditionName",fn:function(t){return[n("edit-dialog",{on:{open:function(n){return e.onOpen(t.item,"conditionAssessment")},close:function(n){return e.onSave(t.item,"conditionAssessment")}},scopedSlots:e._u([{key:"dialog",fn:function(){return[e.editableField?n("v-form",{staticClass:"inline-editing-form",on:{submit:function(n){return n.preventDefault(),e.onSave(t.item,"conditionAssessment")}},model:{value:e.valid,callback:function(t){e.valid=t},expression:"valid"}},[n("v-select",{attrs:{"item-text":"name",items:e.conditionAssessment,label:"Edit Condition"},on:{input:function(t){return e.editableField=e.conditionAssessment.find((function(e){return e.name===t}))}},model:{value:e.editableField,callback:function(t){e.editableField=t},expression:"editableField"}})],1):e._e()]},proxy:!0},{key:"text",fn:function(){return[e._v(" "+e._s(t.item.conditionAssessment&&t.item.conditionAssessment.name||""))]},proxy:!0}],null,!0)})]}},e.readonly?null:{key:"item.fundingSourceName",fn:function(t){return[n("edit-dialog",{on:{open:function(n){return e.onOpen(t.item,"fundingSource")},close:function(n){return e.onSave(t.item,"fundingSource")}},scopedSlots:e._u([{key:"dialog",fn:function(){return[e.editableField?n("v-form",{staticClass:"inline-editing-form",on:{submit:function(n){return n.preventDefault(),e.onSave(t.item,"fundingSource")}},model:{value:e.valid,callback:function(t){e.valid=t},expression:"valid"}},[n("v-select",{attrs:{"item-text":"name",items:e.fundingSource,label:"Edit Funding Source"},on:{input:function(t){return e.editableField=e.fundingSource.find((function(e){return e.name===t}))}},model:{value:e.editableField,callback:function(t){e.editableField=t},expression:"editableField"}})],1):e._e()]},proxy:!0},{key:"text",fn:function(){return[e._v(" "+e._s(t.item.fundingSource&&t.item.fundingSource.name||"")+" ")]},proxy:!0}],null,!0)})]}},e.readonly?null:{key:"item.budgetaryNotes",fn:function(t){return[n("edit-dialog",{on:{open:function(n){return e.onOpen(t.item,"budgetaryNotes")},close:function(n){return e.onSave(t.item,"budgetaryNotes")}},scopedSlots:e._u([{key:"dialog",fn:function(){return[n("v-form",{staticClass:"inline-editing-longtext-form",model:{value:e.valid,callback:function(t){e.valid=t},expression:"valid"}},[n("v-textarea",{attrs:{label:"Edit Budgetary Notes",autofocus:"",autocomplete:"off"},model:{value:e.editableField,callback:function(t){e.editableField=t},expression:"editableField"}})],1)]},proxy:!0},{key:"text",fn:function(){return[n("truncated-text-simple",{attrs:{text:t.item.budgetaryNotes||""}})]},proxy:!0}],null,!0)})]}},e.readonly?null:{key:"item.quantityOfComponents",fn:function(t){return[n("edit-dialog",{on:{open:function(n){return e.onOpen(t.item,"quantityOfComponents")},close:function(n){return e.onSave(t.item,"quantityOfComponents")}},scopedSlots:e._u([{key:"dialog",fn:function(){return[n("v-form",{staticClass:"inline-editing-form",on:{submit:function(n){return n.preventDefault(),e.onSave(t.item,"quantityOfComponents")}},model:{value:e.valid,callback:function(t){e.valid=t},expression:"valid"}},[n("number-text-field",{attrs:{rules:e.quantityOfComponentsRules,required:"",label:"Edit Quantity",autocomplete:"off"},model:{value:e.editableField,callback:function(t){e.editableField=e._n(t)},expression:"editableField"}})],1)]},proxy:!0},{key:"text",fn:function(){return[e._v(" "+e._s(e._f("number")(t.item.quantityOfComponents))+" ")]},proxy:!0}],null,!0)})]}},e.readonly?null:{key:"item.costPerUnit",fn:function(t){return[n("edit-dialog",{on:{open:function(n){return e.onOpen(t.item,"costPerUnit")},close:function(n){return e.onSave(t.item,"costPerUnit")}},scopedSlots:e._u([{key:"dialog",fn:function(){return[n("v-form",{staticClass:"inline-editing-form",on:{submit:function(n){return n.preventDefault(),e.onSave(t.item,"costPerUnit")}},model:{value:e.valid,callback:function(t){e.valid=t},expression:"valid"}},[n("number-text-field",{attrs:{rules:e.costRules,required:"",label:"Edit Cost Per Unit",autocomplete:"off"},model:{value:e.editableField,callback:function(t){e.editableField=e._n(t)},expression:"editableField"}})],1)]},proxy:!0},{key:"text",fn:function(){return[n("span",{staticClass:"currency-cell"},[e._v(e._s(e._f("currency")(t.item.costPerUnit)))])]},proxy:!0}],null,!0)})]}},{key:"item.softCost",fn:function(t){var i=t.item;return[n("v-checkbox",{staticClass:"mt-0 pt-0",attrs:{"hide-details":"",ripple:!1},on:{change:function(t){return e.onSaveSoftCost(i)}},model:{value:i.softCost,callback:function(t){e.$set(i,"softCost",t)},expression:"item.softCost"}})]}},{key:"item.componentUrl",fn:function(t){var i=t.item;return[i.componentUrl?n("a",{attrs:{href:i.componentUrl,target:"_blank"}},[e._v("Link to Photo")]):e._e()]}},{key:"footer",fn:function(){return[n("v-row",{staticClass:"data-table-footer",attrs:{"no-gutters":"",justify:"end"}},[n("v-col",{staticClass:"budget-amount-label"},[e._v(e._s(e.footerLabel)+":")]),n("v-col",{staticClass:"budget-amount",attrs:{cols:"auto"}},[e._v(e._s(e._f("currency")(e.selectedBudget)))])],1)]},proxy:!0}],null,!0),model:{value:e.selectedState,callback:function(t){e.selectedState=t},expression:"selectedState"}},e.$listeners))}),ad=[],od=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"edit-dialog -cursor-pointer",on:{click:e.showDialog}},[e.isActive?n("div",[n("v-edit-dialog",{ref:"dialog",attrs:{small:""},on:{open:e.onOpen,close:e.onClose},scopedSlots:e._u([{key:"input",fn:function(){return[e._t("dialog")]},proxy:!0}],null,!0)},[e._t("text")],2)],1):n("div",[e._t("text")],2)])},rd=[],ld={name:"EditDialog",data:function(){return{isActive:!1}},methods:{showDialog:function(){var e=this;this.isActive=!0,this.$nextTick((function(){e.$refs.dialog.isActive=!0}))},onOpen:function(e){this.$emit("open",e)},onClose:function(e){this.isActive=!1,this.$emit("close",e)}}},sd=ld,cd=n("7679"),dd=Object(S["a"])(sd,od,rd,!1,null,null,null),ud=dd.exports;N()(dd,{VEditDialog:cd["a"]});var md={name:"ComponentList",components:{Btn:Oe["a"],EditDialog:ud,NumberTextField:hi["a"],TruncatedTextSimple:el,"data-table-vs":ml},props:{plan:{type:Object,default:null},components:{type:Array,default:[]},loading:{type:Boolean},readonly:{type:Boolean},changes:{type:Array},selected:{type:Array},filtered:{type:Array,default:[]},selectedHeaders:{type:Array,default:[]},showSelect:{type:Boolean,default:!1}},apollo:{units:{query:Is.a,fetchPolicy:"cache-first",error:function(e){this.error=e.networkError?Object(m["a"])(Object(m["a"])({},e),{},{message:"Something went wrong! Could not load unit list."}):e}},conditionAssessment:{query:Ps.a,fetchPolicy:"cache-first",error:function(e){this.error=e.networkError?Object(m["a"])(Object(m["a"])({},e),{},{message:"Something went wrong! Could not load condition assessment list."}):e}},fundingSource:{query:Vs.a,fetchPolicy:"cache-first",error:function(e){this.error=e.networkError?Object(m["a"])(Object(m["a"])({},e),{},{message:"Something went wrong! Could not load funding source list."}):e}}},data:function(e){var t=e.plan&&e.plan.financialInfo&&parseInt(e.plan.financialInfo.planStartYear),n=t?us(t,t+19):[];return{valid:!1,editableItem:null,editableField:null,costRules:[function(e){return null!==e&&""!==e||"Cost Per Unit is Required"},ae["a"].positiveNumber,ae["a"].floatNumber(2)],years:n,yearForImprovementRules:[function(e){return!!e||"Year Set for Improvement is Required"}],quantityOfComponentsRules:[function(e){return null!==e&&""!==e||"Quantity of Components is Required"}],unitRules:[function(e){return!!e||"Unit is Required"}],units:null,conditionAssessment:null,fundingSource:null,error:null,flagFilterModel:[]}},mounted:function(){this.$emit("initHeaders",this.headers)},computed:{headers:function(){return[{text:"Flag",value:"flag",dataType:"string",width:"40px",fixed:!0,type:"slot"},{text:"Facility",value:"facilityName",type:"select",dataType:"string",fixed:!0,width:"150px"},{text:"System",value:"systemName",type:"select",dataType:"string",width:"180px"},{text:"Component",value:"componentName",type:"select",dataType:"string",width:"180px"},{text:"Year",value:"yearForImprovement",type:"select",dataType:"year",width:"100px"},{text:"Quantity",value:"quantityOfComponents",type:"number",dataType:"number",width:"80px"},{text:"Unit",value:"unitName",type:"select",dataType:"string",width:"100px"},{text:"Cost Per Unit",value:"costPerUnit",type:"number",dataType:"currency",width:"100px"},{text:"Base Amount",value:"baseAmount",type:"number",dataType:"currency",width:"100px"},{text:"Component Subtotal",value:"componentSubtotal",type:"number",dataType:"currency",width:"100px"},{text:"Soft Cost",value:"softCost",width:"70px"},{text:"Budget Amount",value:"budgetAmount",type:"number",dataType:"currency",width:"120px"},{text:"Budgetary Notes",value:"budgetaryNotes",type:"text",dataType:"longstring",width:"180px"},{text:"Description",value:"description",type:"text",dataType:"longstring",width:"180px"},{text:"Condition",value:"conditionName",type:"select",dataType:"string",width:"100px",noSort:!0},{text:"Location",value:"locationOfComponent",type:"text",dataType:"longstring",width:"130px"},{text:"Image",value:"componentUrl",width:"100px"},{text:"Funding Source",value:"fundingSourceName",type:"select",dataType:"string",width:"100px"},{text:"Internal Notes",value:"internalNotes",type:"text",dataType:"longstring",width:"180px"}]},displayedItems:function(){var e=this;return this.components?this.components.map((function(t){return Object(m["a"])(Object(m["a"])({},t),{},{facilityName:t.facility&&t.facility.name||"",systemName:t.system&&t.system.name||"",componentName:t.component&&t.component.name||"",unitName:t.unit&&t.unit.name||"",conditionName:t.conditionAssessment&&t.conditionAssessment.name||"",fundingSourceName:t.fundingSource&&t.fundingSource.name||""},bt(t,e.plan))})):[]},displayedHeaders:function(){var e=this;return this.headers.filter((function(t,n){return e.selectedHeaders?e.selectedHeaders.includes(n):t}))},selectedBudget:function(){return this.selected.length>0?this.selected.reduce((function(e,t){return e+t.budgetAmount}),0):this.filtered.length>0?this.filtered.reduce((function(e,t){return e+t.budgetAmount}),0):this.displayedItems?this.displayedItems.reduce((function(e,t){return e+t.budgetAmount}),0):0},footerLabel:function(){return 0===this.filtered.length&&0===this.selected.length?"Components Budget":"Selected components Budget"},selectedState:{get:function(){return this.selected},set:function(e){this.$emit("select",e)}}},methods:{itemClass:function(e){var t=this.changes.find((function(t){return t.id===e.id}));if(t)return"changed-row"},onSaveSoftCost:function(e){var t=bt(e,this.plan),n=t.baseAmount,i=t.componentSubtotal,a=t.budgetAmount;e.baseAmount=n,e.componentSubtotal=i,e.budgetAmount=a,this.$emit("change",e,"softCost")},onFlagClick:function(e){e.flag=!e.flag,this.$emit("change",e,"flag")},onSave:function(e,t){if(this.valid&&e[t]!==this.editableField){e[t]=this.editableField;var n=bt(e,this.plan),i=n.baseAmount,a=n.componentSubtotal,o=n.budgetAmount;switch(e.baseAmount=i,e.componentSubtotal=a,e.budgetAmount=o,t){case"unit":e.unitName=e.unit&&e.unit.name||"";break;case"conditionAssessment":e.conditionName=e.conditionAssessment&&e.conditionAssessment.name||"";break;case"fundingSource":e.fundingSourceName=e.fundingSource&&e.fundingSource.name||"";break}this.$emit("change",e,t)}},onOpen:function(e,t){var n=this;setTimeout((function(){n.editableItem=e,n.valid=!0,n.editableField=e[t]}),100)},massChage:function(e,t){var n=this;this.editableField=t,this.valid=!0,this.filtered.forEach((function(t){t[e]&&n.onSave(t,e)}))},setFilterValue:function(e,t){if(this.$refs.data_table&&Array.isArray(this.$refs.data_table.filters)){var n=this.$refs.data_table.filters.find((function(t){return t.name===e}));n&&Object(B["a"])(n.value)===Object(B["a"])(t)&&(n.value=t)}},onFlagFilter:function(e,t){if(e&&"function"===typeof t){var n=[];2===this.flagFilterModel.length?n=[!0,!1]:"Marked"===this.flagFilterModel[0]?n=[!0]:"Unmarked"===this.flagFilterModel[0]&&(n=[!1]),e.value=n,t(e)}},resetFlagFilter:function(){this.flagFilterModel=[]}}},fd=md,pd=(n("85a5"),Object(S["a"])(fd,id,ad,!1,null,null,null)),vd=pd.exports;N()(pd,{VCheckbox:rt["a"],VCol:lt["a"],VForm:le["a"],VIcon:_["a"],VRow:se["a"],VSelect:ki["a"],VTextarea:Si["a"]});var hd=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("data-table",{staticClass:"budget-table",attrs:{items:e.displayedItems,headers:e.displayedHeaders,loading:e.loading,"hide-default-footer":!0,"disable-pagination":!0,resetBtnParams:{show:!1},"item-key":"key"},scopedSlots:e._u([{key:"item",fn:function(t){var i=t.headers,a=t.item;return[n("tr",{key:a.key},[n("th",{staticClass:"budget-table-header-cell fixed"},[e._v(e._s(a.label))]),e._l(i,(function(t){return[n("td",{directives:[{name:"show",rawName:"v-show",value:"label"!==t.value,expression:"header.value !== 'label'"}],key:a.key+t.value+a[t.value].value,class:a[t.value].className},[e._v(" "+e._s(e._f("currency")(a[t.value].value))+" ")])]}))],2)]}}])})},yd=[],bd={name:"BudgetTable",components:{DataTable:$e["a"]},props:{plan:{type:Object,default:null},components:{type:Array,default:[]},loading:{type:Boolean},changes:{type:Array}},data:function(e){var t=e.plan&&e.plan.financialInfo&&parseInt(e.plan.financialInfo.planStartYear),n=t?us(t,t+19):[],i=n.map((function(e){return{text:e,value:e,sortable:!1,width:"80px"}}));return{years:n,displayedHeaders:[{text:"",value:"label",sortable:!1,fixed:!0,width:"150px"}].concat(Object(Fi["a"])(i)),items:[]}},computed:{displayedItems:function(){var e=this;if(!this.plan||!this.plan.financialInfo)return[];var t=this.plan.financialInfo,n=t.typeOfPlan,i=t.capitalFundingAmount,a=t.ltfmrFundingAmount,o=t.capitalInfusionYear,r=t.capitalInfusionAmount,l=t.fundingEscalation,s=t.planStartYear,c=("Capital"===n.name?i:a)||null,d=this.years.reduce((function(e,t){var n=l?yt(c,l,t,s):c,i=o&&r&&o===t?n+r:n;return Object(m["a"])(Object(m["a"])({},e),{},Object(et["a"])({},t,{value:i}))}),{}),u=this.years.reduce((function(t,n){var i=e.components.filter((function(t){var i=e.changes.find((function(e){return e.id===t.id}));return i?i.yearForImprovement===n:t.yearForImprovement===n})).reduce((function(t,n){var i=e.changes.find((function(e){return e.id===n.id})),a=bt(i||n,e.plan),o=a.budgetAmount;return t+o}),0),a=d[n].value;return Object(m["a"])(Object(m["a"])({},t),{},Object(et["a"])({},n,{value:i.toString(),className:a&&a-i<0?"out-of-budget":""}))}),{});return[Object(m["a"])(Object(m["a"])({},d),{},{label:"Client Budget",key:1}),Object(m["a"])(Object(m["a"])({},u),{},{label:"Components Budget",key:2})]}}},gd=bd,kd=(n("816f"),Object(S["a"])(gd,hd,yd,!1,null,null,null)),Sd=kd.exports,Cd="PLANING_BUDGET_COMPONENTS",Nd={name:"BudgetPlanning",components:{Btn:Oe["a"],BudgetCalculationInfo:Qc,Modal:Ie["a"],ComponentList:vd,ExpansionPanelHeader:Ja["a"],BudgetTable:Sd,ComponentsReport:wt,DataTableColumns:Bc,PlanFinancialInfo:bl},props:{plan:{type:Object}},apollo:{currentUser:{query:y.a,fetchPolicy:"cache-only"},componentsOfNeed:{query:Fl.a,variables:function(){return{planId:this.plan&&this.plan.id||null,status:Ol.OPEN}},skip:function(){return null===this.plan||!this.plan.id},error:function(e){this.error=e.networkError?Object(m["a"])(Object(m["a"])({},e),{},{message:"Something went wrong! Could not load plan components."}):e}}},data:function(){return{TABLE_UID:Cd,currentUser:null,componentsOfNeed:null,error:null,internalLoading:!1,components:[],changes:[],selected:[],filtered:[],expanded:[],headers:[],selectedHeaders:null,selectedYear:null}},watch:{componentsOfNeed:function(e){e&&(this.components=Object(si["cloneDeep"])(e),this.changes=[],this.selected=[],this.filtered=[])}},computed:{isHideReportSlider:function(){return Boolean(this.selected.length||this.filtered.length)},loading:function(){return this.$apollo.queries.componentsOfNeed.loading},showGenerateReportBtn:function(){return Object(b["a"])(f["c"].GENERATE_REPORT,this.currentUser)},canEdit:function(){return Object(b["a"])(f["c"].EDIT_PLAN_COMPONENT,this.currentUser)},reportComponents:function(){return this.selected.length>0?this.selected:this.filtered.length>0?this.filtered:[]},showBulkYearChangeBtn:function(){return this.filtered.length>0},planStartYear:function(){return null!==this.plan&&null!==this.plan.financialInfo&&null!==this.plan.financialInfo.planStartYear?parseInt(this.plan.financialInfo.planStartYear):0},years:function(){return this.planStartYear?us(this.planStartYear,this.planStartYear+19):us((new Date).getFullYear(),(new Date).getFullYear()+19)}},methods:{onModalClose:function(){this.changes=[],this.selected=[],this.filtered=[],this.onReset(),this.components=Object(si["cloneDeep"])(this.componentsOfNeed)},onReset:function(){this.selected=[]},onSelect:function(e){this.selected=e},onFilter:function(e){this.filtered=e},onChange:function(e,t){var n=this.componentsOfNeed.find((function(t){return e.id===t.id})),i=this.changes.findIndex((function(t){return t.id===e.id}));if(n&&n[t]!==e[t])i>=0?this.changes[i]=e:this.changes.push(e);else if(n&&i>=0){var a=Object.entries(n).some((function(t){var i=Object(nd["a"])(t,1),a=i[0];return!Object(si["isEqual"])(n[a],e[a])}));a||(this.changes=this.changes.filter((function(t){return t.id!==e.id})))}},onApplyToPlan:function(e){var t=this;this.internalLoading=!0;var n=this.changes.map((function(e){return{id:e.id,facilityId:e.facility&&e.facility.id||null,systemId:e.system&&e.system.id||null,componentId:e.component&&e.component.id||null,status:e.status,yearCompleted:e.yearCompleted,actualCost:e.actualCost,description:e.description,componentUrl:e.componentUrl,yearForImprovement:e.yearForImprovement,quantityOfComponents:e.quantityOfComponents,unitId:e.unit&&e.unit.id||null,costPerUnit:e.costPerUnit,conditionAssessmentId:e.conditionAssessment&&e.conditionAssessment.id||null,locationOfComponent:e.locationOfComponent,fundingSourceId:e.fundingSource&&e.fundingSource.id||null,budgetaryNotes:e.budgetaryNotes,internalNotes:e.internalNotes,componentNotes:e.componentNotes,softCost:e.softCost,flag:e.flag}}));this.$apollo.mutate({mutation:kl.a,variables:{input:n},update:function(e,n){var i=n.data.updateComponentsOfNeed,a=e.readQuery({query:Fl.a,variables:{planId:t.plan&&t.plan.id||null,status:Ol.OPEN}});i.forEach((function(e){var t=a.componentsOfNeed.findIndex((function(t){return t.id===e.id}));t>=0&&(a.componentsOfNeed[t]=e)})),e.writeQuery({query:Fl.a,variables:{planId:t.plan&&t.plan.id||null,status:Ol.OPEN},data:a})}}).then((function(){e&&e()})).catch((function(n){t.error=n,e&&e()})).finally((function(){t.internalLoading=!1}))},onInitHeaders:function(e){this.headers=e},confirmBudgetPlanning:function(){this.changes.length&&this.$refs.confirm_modal?this.$refs.confirm_modal.modalOpen=!0:this.closeBudgetPopup()},closeBudgetPopup:function(){this.$refs.main_modal&&(this.$refs.main_modal.modalOpen=!1)},bulkUpdateComponentsYear:function(e){this.$refs.component_list.massChage("yearForImprovement",e),this.$refs.component_list.setFilterValue("yearForImprovement",[e])}}},_d=Nd,wd=(n("1ea3"),Object(S["a"])(_d,ed,td,!1,null,null,null)),xd=wd.exports;N()(wd,{VCol:lt["a"],VExpansionPanel:ro["a"],VExpansionPanelContent:lo["a"],VExpansionPanels:so["a"],VRow:se["a"],VSelect:ki["a"]});var Ed={name:"Components",components:{Btn:Oe["a"],Modal:Ie["a"],ActiveComponents:Kc,CompletedComponents:ic,BudgetPlanning:xd},props:{plan:{type:Object,default:null}},apollo:{currentUser:{query:y.a,fetchPolicy:"cache-only"}},data:function(){return{currentUser:null,tab:null}},computed:{showAddComponentBtn:function(){return Object(b["a"])(f["c"].ADD_PLAN_COMPONENT,this.currentUser)}},methods:{onBackClick:function(){this.$emit("back")}}},Fd=Ed,Od=(n("a9fc"),n("71a3")),Id=n("c671"),Td=n("fe57"),Dd=n("aac8"),Ad=Object(S["a"])(Fd,ys,bs,!1,null,null,null),Pd=Ad.exports;N()(Ad,{VCol:lt["a"],VRow:se["a"],VTab:Od["a"],VTabItem:Id["a"],VTabs:Td["a"],VTabsItems:Dd["a"]});var $d={name:"PlanForm",components:{Stepper:Mn,StepperStep:Xn,PlanGeneralInfoForm:ns,PlanFinancialInfoForm:hs,Components:Pd},props:{plan:{type:Object,default:null},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonlyFields:{type:Array}},data:function(){return{step:1,lock:!1,lastCompleted:0}},watch:{step:function(e){e>this.lastCompleted&&(this.lastCompleted=e-1)},plan:function(e){e&&e.id&&(null!==e.financialInfo?this.lastCompleted=2:this.lastCompleted=1)}},methods:{onUpdatePlanInfo:function(e){this.step=2,this.lock=!1,this.$emit("submit",e)},onChangePlanInfo:function(){this.lock=!0},onResetChangesPlanInfo:function(){this.lock=!1},onUpdateFinancialInfo:function(e){this.step=3,this.lock=!1,this.$emit("submit",e)},onChangeFinancialInfo:function(){this.lock=!0},onResetChangesFinancialInfo:function(){this.lock=!1}}},Vd=$d,jd=Object(S["a"])(Vd,Ml,Yl,!1,null,null,null),Ld=jd.exports;N()(jd,{VDivider:Lo["a"],VStepperContent:Ro["a"],VStepperHeader:Uo["a"],VStepperItems:Uo["b"]});var Rd={name:"AddPlan",components:{PlanForm:Ld,Breadcrumbs:Jo},props:{clientId:{type:String}},apollo:{client:{query:hr.a,variables:function(){return{id:this.clientId}},error:function(e){this.error=e}}},data:function(e){return{plan:{name:null,icsProjectNumber:null,dateOfCreation:null,dateOfAssessment:null,photosLink:null,description:null,financialInfo:null,components:null,client:{id:e.clientId},isCurrent:!1},client:null,error:null,readonlyFields:["typeOfPlan"]}},computed:{loading:function(){return this.$apollo.queries.client.loading},breadcrumbs:function(){return[{text:"Clients",to:{name:"clients"},permission:f["c"].VIEW_CLIENTS}].concat(Object(Fi["a"])(this.client?[{text:this.client.name||"",to:{name:"client-details",params:{clientId:this.clientId}},permission:f["c"].VIEW_CLIENT}]:[]),[{text:"Create Plan",disabled:!0}])}},methods:{onSubmit:function(e){this.plan=e}}},Ud=Rd,qd=Object(S["a"])(Ud,ql,Bl,!1,null,null,null),Bd=qd.exports;N()(qd,{VCol:lt["a"],VRow:se["a"]});var Md={name:"AddPlan",components:{Plan:Bd}},Yd=Md,Gd=Object(S["a"])(Yd,Rl,Ul,!1,null,null,null),zd=Gd.exports,Hd=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"edit-plan"},[n("plan",{attrs:{"plan-id":e.$route.params.planId}})],1)},Qd=[],Wd=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("v-row",{staticClass:"mb-6"},[n("v-col",[n("breadcrumbs",{attrs:{items:e.breadcrumbs}})],1)],1),e.loading?e._e():n("alert",{attrs:{error:e.error}}),n("plan-form",{attrs:{plan:e.plan,loading:e.loading,disabled:!!e.error,"readonly-fields":e.readonlyFields},on:{submit:e.onSubmit}})],1)},Jd=[],Xd={name:"EditPlan",components:{PlanForm:Ld,Breadcrumbs:Jo},props:{planId:{type:Number|String}},apollo:{plan:{query:Br.a,variables:function(){return{id:this.planId}},error:function(e){this.error=e}}},data:function(){return{plan:null,error:null,readonlyFields:["typeOfPlan"]}},computed:{loading:function(){return this.$apollo.queries.plan.loading},breadcrumbs:function(){return[{text:"Plans",href:"/plans",permission:f["c"].VIEW_PLANS},{text:this.plan&&this.plan.name||"",href:"/plan-details/"+this.planId,permission:f["c"].VIEW_PLANS},{text:"Edit Plan",disabled:!0}]}},methods:{onSubmit:function(e){this.plan=e}}},Zd=Xd,Kd=Object(S["a"])(Zd,Wd,Jd,!1,null,null,null),eu=Kd.exports;N()(Kd,{VCol:lt["a"],VRow:se["a"]});var tu={name:"EditPlan",components:{Plan:eu}},nu=tu,iu=Object(S["a"])(nu,Hd,Qd,!1,null,null,null),au=iu.exports,ou=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("unauth-app-layout",[n("reset-password")],1)},ru=[],lu=function(){var e=this,t=e.$createElement,n=e._self._c||t;return 1===e.step?n("div",{staticClass:"reset-password-container"},[n("btn",{staticClass:"back-btn",attrs:{icon:"",to:{name:"login"},"color-type":"secondary"}},[n("v-icon",[e._v("fa-chevron-left")])],1),n("h1",[e._v("Reset Password")]),n("ApolloMutation",{attrs:{mutation:e.RESET_PASSWORD_MUTATION,variables:{email:e.email}},on:{done:e.onDone},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.mutate,a=t.loading,o=t.error;return[a?e._e():n("alert",{attrs:{align:"center",error:o}}),n("p",[e._v(" Please enter your registered email address. An email notification with a new password will be sent to you. ")]),n("v-form",{ref:"form",attrs:{"lazy-validation":"","aria-busy":a,disabled:a},on:{submit:function(t){t.preventDefault(),e.validate()&&i()}}},[n("v-text-field",{attrs:{rules:e.emailRules,label:"Email",required:"","validate-on-blur":""},model:{value:e.email,callback:function(t){e.email=t},expression:"email"}}),n("div",{staticClass:"mt-16"},[n("btn",{attrs:{type:"submit","color-type":"primary","full-width":"",disabled:a}},[e._v("Send")])],1)],1)]}}],null,!1,352590128)})],1):n("div",{staticClass:"reset-password-success-container"},[n("h1",[e._v("Check your email")]),n("p",[e._v(" Email with new password has been sent to "),n("span",{staticClass:"email"},[e._v(e._s(e.email))]),e._v(". ")]),n("p",[e._v("Please go back to "),n("router-link",{attrs:{to:{name:"login"}}},[e._v("login")]),e._v(" and enter new password")],1)])},su=[],cu=n("cc07"),du=n.n(cu),uu={name:"ResetPassword",components:{Btn:Oe["a"]},data:function(){return{RESET_PASSWORD_MUTATION:du.a,step:1,email:"",emailRules:[function(e){return!!e||"Email is Required"},ae["a"].email]}},methods:{validate:function(){return this.$refs.form.validate()},onDone:function(){this.step=2}}},mu=uu,fu=(n("40be"),Object(S["a"])(mu,lu,su,!1,null,null,null)),pu=fu.exports;N()(fu,{VForm:le["a"],VIcon:_["a"],VTextField:ce["a"]});var vu={components:{ResetPassword:pu,UnauthAppLayout:ke}},hu=vu,yu=Object(S["a"])(hu,ou,ru,!1,null,null,null),bu=yu.exports,gu=[{path:"/login",name:"login",component:_e,meta:{title:"ICS - Login",pageTitle:"Login",requiresAuth:!1}},{path:"/forgot-password",name:"forgot-password",component:bu,meta:{title:"ICS - Reset Password",pageTitle:"Reset Password",requiresAuth:!1}},{path:"/clients",name:"clients",meta:{title:"ICS - Clients",pageTitle:"Clients",permission:f["c"].VIEW_CLIENTS},component:On},{path:"/add-client",name:"add-client",meta:{title:"ICS - Add Client",pageTitle:"Add Client",permission:f["c"].ADD_CLIENT},component:ar},{path:"/client/:clientId",name:"client",meta:{title:"ICS - Client",pageTitle:"Edit Client",permission:f["c"].EDIT_CLIENT},component:_r},{path:"/client-details/:clientId",name:"client-details",meta:{title:"ICS - Client Details",permission:f["c"].VIEW_CLIENT},component:Vr},{path:"/plans",name:"plans",component:rn,meta:{title:"ICS - Plans",pageTitle:"Plans",permission:f["c"].VIEW_PLANS}},{path:"/plan-details/:planId",name:"plan-details",meta:{title:"ICS - Plan Details",permission:f["c"].VIEW_PLAN},component:Ll},{path:"/create-plan/:clientId",name:"create-plan",meta:{title:"ICS - Create Plan",pageTitle:"Create Plan",permission:f["c"].CREATE_PLAN},component:zd},{path:"/plan/:planId",name:"plan",meta:{title:"ICS - Plan",pageTitle:"Edit Plan",permission:f["c"].EDIT_PLAN},component:au},{path:"/manage-users",name:"manage-users",meta:{title:"ICS - Manage Users",pageTitle:"Manage Users",permission:f["c"].VIEW_USERS},component:function(){return Promise.all([n.e("manage-database~manage-users"),n.e("manage-users")]).then(n.bind(null,"8b8c"))}},{path:"/manage-database",name:"manage-database",meta:{title:"ICS - Manage Database",pageTitle:"Manage Database",permission:f["c"].VIEW_DATABASE},component:function(){return Promise.all([n.e("manage-database~manage-users"),n.e("manage-database")]).then(n.bind(null,"dc09"))}},{path:"/settings",name:"settings",meta:{title:"ICS - Setting",pageTitle:"Settings",permission:f["c"].CHANGE_ROLE_PERMISSIONS},component:function(){return n.e("settings").then(n.bind(null,"26d3"))}}],ku=gu;i["a"].use(X["a"]);var Su=new X["a"]({mode:"history",base:"/",routes:ku});Su.beforeEach(function(){var e=Object(M["a"])(regeneratorRuntime.mark((function e(t,n,i){var a,o,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("login"===t.name||void 0!==t.meta.requiresAuth&&!t.meta.requiresAuth||Tu()){e.next=4;break}i({name:"login"}),e.next=14;break;case 4:if(!Tu()){e.next=13;break}return a=Vu.defaultClient,e.next=8,a.query({query:y.a});case 8:o=e.sent,r=o.data.currentUser;try{null===t.name&&"/"===t.path?r.permissions.find((function(e){return e.key===f["c"].VIEW_CLIENTS}))?i({name:"clients"}):r.permissions.find((function(e){return e.key===f["c"].VIEW_CLIENT}))&&r.client&&r.client.id&&i({name:"client-details",params:{clientId:r.client.id}}):i()}catch(n){i({name:"login"})}e.next=14;break;case 13:i();case 14:case"end":return e.stop()}}),e)})));return function(t,n,i){return e.apply(this,arguments)}}());var Cu=Su;i["a"].use(G["a"]);var Nu,_u="apollo-token",wu="apollo-refresh-token",xu=Object(z["a"])((function(e){var t=e.graphQLErrors,n=e.networkError,i=e.operation,a=e.forward;if(t){var o,r=Object(Y["a"])(t);try{for(r.s();!(o=r.n()).done;){var l=o.value;switch(l.extensions.code){case"UNAUTHENTICATED":var s=function(){var e=i.getContext().headers,t="undefined"!==typeof localStorage?localStorage.getItem(wu):"";if(t){var n=Nu.defaultClient;return{v:new H["a"]((function(o){n.mutate({mutation:J.a,variables:{token:t}}).then((function(t){var n=t.data,a=n.refreshToken,o=a.accessToken,r=a.refreshToken;localStorage.setItem(_u,o),localStorage.setItem(wu,r),i.setContext({headers:Object(m["a"])(Object(m["a"])({},e),{},{Authorization:"Bearer ".concat(o)})})})).then((function(){var e={next:o.next.bind(o),error:o.error.bind(o),complete:o.complete.bind(o)};a(i).subscribe(e)})).catch(function(){var e=Object(M["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return o.error(t),e.next=3,Pu(n);case 3:"login"!==Cu.currentRoute.name&&Cu.push({name:"login"});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}))}}return"login"!==Cu.currentRoute.name&&Cu.push({name:"login"}),{v:!1}}();if("object"===Object(B["a"])(s))return s.v;case"FORBIDDEN":return Pu(Nu.defaultClient).then((function(){"login"!==Cu.currentRoute.name&&Cu.push({name:"login"})})),!1}}}catch(l){r.e(l)}finally{r.f()}}n&&(He["a"].$emit("show-snackbar",{color:"error",text:"Error! Something went wrong... Please try again later"}),console.log("[Network error]: ".concat(n)))})),Eu="http://34.237.88.184/api/graphql",Fu=Object({NODE_ENV:"production",VUE_APP_GRAPHQL_HTTP:"http://34.237.88.184/api/graphql",BASE_URL:"/"}).VUE_APP_FILES_ROOT||Eu.substr(0,Eu.indexOf("/graphql"));i["a"].prototype.$filesRoot=Fu;var Ou={httpEndpoint:Eu,tokenName:_u,refreshTokenName:wu,persisting:!1,websocketsOnly:!1,ssr:!1,link:xu,inMemoryCacheOptions:{addTypename:!1}};function Iu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(Q["createApolloClient"])(Object(m["a"])(Object(m["a"])({},Ou),e)),n=t.apolloClient;return new G["a"]({defaultClient:n,defaultOptions:{$query:{fetchPolicy:"cache-and-network",errorPolicy:"all"},$mutation:{errorPolicy:"all"}}})}function Tu(){return"undefined"!==typeof localStorage&&localStorage.getItem(_u)}function Du(e,t,n){return Au.apply(this,arguments)}function Au(){return Au=Object(M["a"])(regeneratorRuntime.mark((function e(t,n,i){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return"undefined"!==typeof localStorage&&n&&i&&(localStorage.setItem(_u,n),localStorage.setItem(wu,i)),e.prev=1,e.next=4,t.resetStore();case 4:e.next=9;break;case 6:e.prev=6,e.t0=e["catch"](1),console.log("%cError on cache reset (login)","color: orange;",e.t0.message);case 9:case"end":return e.stop()}}),e,null,[[1,6]])}))),Au.apply(this,arguments)}function Pu(e){return $u.apply(this,arguments)}function $u(){return $u=Object(M["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return"undefined"!==typeof localStorage&&(localStorage.removeItem(_u),localStorage.removeItem(wu)),e.prev=1,e.next=4,t.resetStore();case 4:e.next=9;break;case 6:e.prev=6,e.t0=e["catch"](1),console.log("%cError on cache reset (logout)","color: orange;",e.t0.message);case 9:case"end":return e.stop()}}),e,null,[[1,6]])}))),$u.apply(this,arguments)}Nu=Iu();var Vu=Nu,ju={name:"UserProfile",props:{username:{type:String},loading:{type:Boolean,default:!1}},computed:{userInitials:function(){return this.username&&this.username.split(" ").map((function(e){return e.charAt(0).toUpperCase()})).join("")}},methods:{logout:function(){Pu(),this.$router.push({name:"login"})}}},Lu=ju,Ru=(n("f5e0"),n("8212")),Uu=Object(S["a"])(Lu,U,q,!1,null,null,null),qu=Uu.exports;N()(Uu,{VAvatar:Ru["a"],VBtn:A["a"],VCard:he["a"],VDivider:Lo["a"],VIcon:_["a"],VList:w["a"],VListItem:x["a"],VListItemContent:E["a"],VListItemTitle:E["b"],VMenu:qe["a"],VSubheader:ut["a"]});var Bu={name:"AppHeader",components:{UserProfile:qu},data:function(){return{CURRENT_USER_QUERY:y.a}},created:function(){this.loadColorTheme()},methods:{setToStorage:function(e){try{window.localStorage.setItem("darkMode",e||"")}catch(t){console.warn("set theme error ",t)}},loadColorTheme:function(){try{this.$vuetify.theme.dark=Boolean(window.localStorage.getItem("darkMode"))}catch(e){console.warn("load theme error ",e)}}}},Mu=Bu,Yu=(n("77b5"),n("b73d")),Gu=n("2a7f"),zu=Object(S["a"])(Mu,L,R,!1,null,null,null),Hu=zu.exports;N()(zu,{VSwitch:Yu["a"],VToolbarItems:Gu["a"]});var Qu={name:"AppLayout",components:{AppNavigationDrawer:j,AppHeader:Hu}},Wu=Qu,Ju=(n("daee"),n("40dc")),Xu=Object(S["a"])(Wu,r,l,!1,null,null,null),Zu=Xu.exports;N()(Xu,{VAppBar:Ju["a"],VMain:be["a"]});var Ku=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",e._l(e.queue,(function(t,i){return n("v-snackbar",{key:t.text,style:{paddingTop:60*(i+1)+"px"},attrs:{timeout:"error"===t.color?5e3:3e3,color:t.color,top:"",right:""},on:{input:function(){e.onClose(t)}},scopedSlots:e._u([{key:"action",fn:function(i){var a=i.attrs;return[n("btn",e._b({attrs:{"color-type":"secondary",icon:""},on:{click:function(n){return e.onClose(t)}}},"btn",a,!1),[n("v-icon",{attrs:{small:""}},[e._v("fa-times")])],1)]}}],null,!0),model:{value:t.snack,callback:function(n){e.$set(t,"snack",n)},expression:"snack.snack"}},[e._v(" "+e._s(t.text)+" ")])})),1)},em=[],tm={name:"AppNotification",components:{Btn:Oe["a"]},mounted:function(){var e=this;He["a"].$on("show-snackbar",(function(t){var n=e.queue.filter((function(e){return e.snack}));""===t.text||n.some((function(e){return e.text===t.text}))||n.push(Object(m["a"])({snack:!0},t)),e.queue=n}))},beforeDestroy:function(){He["a"].$off("show-snackbar")},data:function(){return{queue:[]}},methods:{onClose:function(e){this.queue=this.queue.filter((function(t){return t.text!==e.text}))}}},nm=tm,im=n("2db4"),am=Object(S["a"])(nm,Ku,em,!1,null,null,null),om=am.exports;N()(am,{VIcon:_["a"],VSnackbar:im["a"]});var rm={name:"App",components:{AppNotification:om,AppLayout:Zu},data:function(){return{pageTitle:""}},created:function(){this.updateTitle(this.$route)},watch:{$route:function(e){this.updateTitle(e)}},methods:{updateTitle:function(e){document.title=e.meta&&e.meta.title||"ICS"}}},lm=rm,sm=(n("5c0b"),n("7496")),cm=Object(S["a"])(lm,a,o,!1,null,null,null),dm=cm.exports;N()(cm,{VApp:sm["a"]});var um=n("f309");i["a"].use(um["a"]);var mm=new um["a"]({icons:{iconfont:"fa"},theme:{themes:{light:{primary:"#2D7372",secondary:"#1564b7",accent:"#4FC2BD",accent1:"#99D9D9",accent2:"#F6DDB9",error:"#FF5252",info:"#2196F3",success:"#4CAF50",warning:"#FFC107",background:"#fff",menu:"#2D7372","ics-light-grey-blue":"#eff1f1","ics-light-grey":"#C8C8C8","ics-grey":"#989899"},dark:{primary:"#c9d9d9",secondary:"#1564b7",accent:"#4FC2BD",accent1:"#51739f",accent2:"#4a6a93",error:"#ff8181",info:"#2196F3",success:"#4CAF50",warning:"#FFC107",background:"#435252",menu:"#2D7372",anchor:"#63c5c3","ics-light-grey-blue":"#5c6868","ics-light-grey":"#3c4046","ics-grey":"#b0b3b7"}},options:{customProperties:!0,variations:!1}}});n("15f5"),n("9772"),n("b680"),n("5319");function fm(e){return null===e||void 0===e||""===e?"":"--"===e?e:"$ ".concat(pm(10*e%10?e.toFixed(2):e))}function pm(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}i["a"].filter("currency",fm);function vm(e){return e?"--"===e?e:Object(Xl["a"])(e):""}i["a"].filter("date",vm);function hm(e){return e?"--"===e?e:Object(Xl["c"])(e):""}i["a"].filter("utcDate",hm);var ym=function(e){var t=e&&new Date(e);return t?t.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}):""};function bm(e){return e?"--"===e?e:ym(e):""}i["a"].filter("time",bm);function gm(e){return null===e||void 0===e||""===e?"":"--"===e?e:new Intl.NumberFormat("en-US",{maximumFractionDigits:2}).format(Number(e)).toString()}i["a"].filter("number",gm);function km(e){return null===e||void 0===e||""===e?"":"--"===e?e:e+"%"}i["a"].filter("percentage",km);var Sm=n("3f08"),Cm=function(){var e,t=this,n=t.$createElement,i=t._self._c||n;return t.error?i("p",t._b({staticClass:"alert-msg"},"p",{class:(e={},e[t.align]=t.align,e)},!1),[t._v(t._s(t._f("errorMsg")(t.error.message)))]):t._e()},Nm=[],_m={name:"Alert",props:{error:{type:Object|Error,default:null},align:{type:String,default:"left",validator:function(e){return["right","left","center"].includes(e)}}}},wm=_m,xm=(n("082b"),Object(S["a"])(wm,Cm,Nm,!1,null,null,null)),Em=xm.exports;i["a"].config.productionTip=!1,i["a"].component("Fragment",Sm["a"]),i["a"].component("Alert",Em),new i["a"]({router:Cu,vuetify:mm,apolloProvider:Vu,render:function(e){return e(dm)}}).$mount("#app")},"5b6e":function(e,t,n){"use strict";n("1797")},"5c0b":function(e,t,n){"use strict";n("9c0c")},"5c58":function(e,t,n){"use strict";n("c15b")},"5d0e":function(e,t,n){"use strict";n("10a5")},"609c":function(e,t,n){},"629d":function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));n("13d5"),n("1276"),n("ac1f");var i=function(e,t){return t.split(".").reduce((function(e,t){return e&&e[t]||""}),e)}},"6cc7":function(e,t,n){},"6ed5":function(e,t,n){},"6fda":function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ClientTypes"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"clientTypes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:58}};n.loc.source={body:"query ClientTypes {\n clientTypes {\n id\n name\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,t)})),e.definitions&&e.definitions.forEach((function(e){i(e,t)}))}var a={};function o(e,t){for(var n=0;n0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var t=a[e]||new Set;t.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(function(){n.definitions.forEach((function(e){if(e.name){var t=new Set;i(e,t),a[e.name.value]=t}}))})(),e.exports=n,e.exports["ClientTypes"]=r(n,"ClientTypes")},"715c":function(e,t,n){},"72e8":function(e,t,n){"use strict";n("c6c1")},7514:function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Documents"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"clientId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"documents"},arguments:[{kind:"Argument",name:{kind:"Name",value:"clientId"},value:{kind:"Variable",name:{kind:"Name",value:"clientId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"documentUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:145}};n.loc.source={body:"query Documents($clientId: ID!) {\n documents(clientId: $clientId) {\n id\n documentUrl\n name\n createdAt\n updatedAt\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,t)})),e.definitions&&e.definitions.forEach((function(e){i(e,t)}))}var a={};function o(e,t){for(var n=0;n0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var t=a[e]||new Set;t.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(function(){n.definitions.forEach((function(e){if(e.name){var t=new Set;i(e,t),a[e.name.value]=t}}))})(),e.exports=n,e.exports["Documents"]=r(n,"Documents")},7672:function(e,t){var n={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"FinancialInfo"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"FinancialInfo"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"typeOfPlan"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"ltfmrFundingAmount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"capitalFundingAmount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"capitalInfusionAmount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"capitalInfusionYear"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"planStartYear"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"regionalCost"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fundingEscalation"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"inflationCostEscalation"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"softCostPercentage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}}],loc:{start:0,end:285}};n.loc.source={body:"fragment FinancialInfo on FinancialInfo {\n id\n typeOfPlan {\n id\n name\n }\n ltfmrFundingAmount\n capitalFundingAmount\n capitalInfusionAmount\n capitalInfusionYear\n planStartYear\n regionalCost\n fundingEscalation\n inflationCostEscalation\n softCostPercentage\n __typename\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};e.exports=n},"77b5":function(e,t,n){"use strict";n("d715")},"77e6":function(e,t){var n={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"Component"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ComponentOfNeed"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"planId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"facility"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"system"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"finCode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"category"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"component"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"yearCompleted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"actualCost"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"componentUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"yearForImprovement"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"quantityOfComponents"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"unit"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"costPerUnit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"conditionAssessment"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"locationOfComponent"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fundingSource"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"budgetaryNotes"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"internalNotes"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"componentNotes"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"softCost"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"flag"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}}],loc:{start:0,end:570}};n.loc.source={body:"fragment Component on ComponentOfNeed {\n id\n planId\n facility {\n id\n name\n }\n system {\n id\n name\n finCode\n category {\n id\n name\n }\n }\n component {\n id\n name\n }\n status\n yearCompleted\n actualCost\n description\n componentUrl\n yearForImprovement\n quantityOfComponents\n unit {\n id\n name\n }\n costPerUnit\n conditionAssessment {\n id\n name\n }\n locationOfComponent\n fundingSource {\n id\n name\n }\n budgetaryNotes\n internalNotes\n componentNotes\n softCost\n flag\n createdAt\n updatedAt\n __typename\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};e.exports=n},"79ea":function(e,t,n){},"7a10":function(e,t,n){},"7aa9":function(e,t,n){"use strict";n("1c07")},"7bbb":function(e,t,n){},"7c734":function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ul",{staticClass:"definition-list"},e._l(e.displayedData,(function(t,i){return n("li",{key:i,staticClass:"definition-list-item"},[n("span",{staticClass:"definition-list-item-label",style:{width:e.labelWidth}},[e._v(e._s(t.label)+":")]),t.type&&"date"===t.type?n("span",{staticClass:"definition-list-item-value"},[e._v(e._s(e._f("date")(t.value||"--")))]):e._e(),t.type&&"utcDate"===t.type?n("span",{staticClass:"definition-list-item-value"},[e._v(e._s(e._f("utcDate")(t.value||"--")))]):t.type&&"longstring"===t.type?n("span",{staticClass:"definition-list-item-value"},[n("truncated-text",{attrs:{text:t.value||"--"}})],1):t.type&&"percentage"===t.type?n("span",{staticClass:"definition-list-item-value"},[e._v(e._s(e._f("percentage")(t.value||"--")))]):t.type&&"currency"===t.type?n("span",{staticClass:"definition-list-item-value"},[e._v(e._s(e._f("currency")(t.value||"--")))]):t.type&&"number"===t.type?n("span",{staticClass:"definition-list-item-value"},[e._v(e._s(e._f("number")(t.value||"--")))]):t.type&&"link"===t.type?n("span",{staticClass:"definition-list-item-value"},[t.value?n("a",{attrs:{href:t.value}},[e._v("Link")]):[e._v(e._s("--"))]],2):n("span",{staticClass:"definition-list-item-value"},[e._v(e._s(t.value||"--"))])])})),0)},a=[],o=n("2909"),r=n("5530"),l=(n("a9e3"),n("13d5"),n("d81d"),n("99af"),n("629d")),s=n("ea34"),c={name:"DefinitionList",props:{labels:{type:Array,default:[]},data:{type:Object,default:null},labelWidth:{type:String|Number}},components:{TruncatedText:s["a"]},computed:{displayedData:function(){var e=this;return this.data?this.labels.reduce((function(t,n){var i=Object(l["a"])(e.data,n.value),a="list"===n.type?i&&i.length>0?i.map((function(e){var t=Object(l["a"])(e,n.labelName);return{label:t?"".concat(n.label," (").concat(t.toLowerCase(),")"):n.label,value:Object(l["a"])(e,n.valueName)}})):[Object(r["a"])(Object(r["a"])({},n),{},{value:null})]:null,s=a||[Object(r["a"])(Object(r["a"])({},n),{},{value:i})];return t.push.apply(t,Object(o["a"])(s)),t}),[]):[]}}},d=c,u=(n("0c31"),n("2877")),m=Object(u["a"])(d,i,a,!1,null,null,null);t["a"]=m.exports},"7c9a":function(e,t,n){},"7eca":function(e,t,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateComponentOfNeed"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NamedType",name:{kind:"Name",value:"UpdateComponentOfNeedInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateComponentOfNeed"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Component"},directives:[]}]}}]}}],loc:{start:0,end:170}};i.loc.source={body:'#import "../fragments/component.gql"\nmutation UpdateComponentOfNeed($input: UpdateComponentOfNeedInput) {\n updateComponentOfNeed(input: $input) {\n ...Component\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function o(e){return e.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!a[t]&&(a[t]=!0,!0)}))}function r(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,t)})),e.definitions&&e.definitions.forEach((function(e){r(e,t)}))}i.definitions=i.definitions.concat(o(n("77e6").definitions));var l={};function s(e,t){for(var n=0;n0){var r=o;o=new Set,r.forEach((function(e){if(!a.has(e)){a.add(e);var t=l[e]||new Set;t.forEach((function(e){o.add(e)}))}}))}return a.forEach((function(t){var i=s(e,t);i&&n.definitions.push(i)})),n}(function(){i.definitions.forEach((function(e){if(e.name){var t=new Set;r(e,t),l[e.name.value]=t}}))})(),e.exports=i,e.exports["UpdateComponentOfNeed"]=c(i,"UpdateComponentOfNeed")},"7fff":function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteClient"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteClient"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[]}]}}],loc:{start:0,end:60}};n.loc.source={body:"mutation DeleteClient($id: ID!) {\n deleteClient(id: $id)\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,t)})),e.definitions&&e.definitions.forEach((function(e){i(e,t)}))}var a={};function o(e,t){for(var n=0;n0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var t=a[e]||new Set;t.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(function(){n.definitions.forEach((function(e){if(e.name){var t=new Set;i(e,t),a[e.name.value]=t}}))})(),e.exports=n,e.exports["DeleteClient"]=r(n,"DeleteClient")},"816f":function(e,t,n){"use strict";n("955d")},8295:function(e,t,n){"use strict";n("7c9a")},"85a5":function(e,t,n){"use strict";n("3e9c")},"85d0":function(e,t,n){},"866b":function(e,t,n){},"87bb":function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"GenerateAllClientsReport"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NamedType",name:{kind:"Name",value:"InputAllClientsReport"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"generateAllClientsReport"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:125}};n.loc.source={body:"mutation GenerateAllClientsReport($input: InputAllClientsReport) {\n generateAllClientsReport(input: $input) {\n url\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,t)})),e.definitions&&e.definitions.forEach((function(e){i(e,t)}))}var a={};function o(e,t){for(var n=0;n0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var t=a[e]||new Set;t.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(function(){n.definitions.forEach((function(e){if(e.name){var t=new Set;i(e,t),a[e.name.value]=t}}))})(),e.exports=n,e.exports["GenerateAllClientsReport"]=r(n,"GenerateAllClientsReport")},8810:function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ClonePlan"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"clonePlan"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dateOfCreation"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"client"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"icsOffice"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"clientType"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"createdBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"editedBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"financialInfo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"typeOfPlan"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:427}};n.loc.source={body:"mutation ClonePlan($id: ID!, $name: String!) {\n clonePlan(id: $id name: $name) {\n id\n name\n dateOfCreation\n client {\n id\n name\n icsOffice {\n id\n name\n }\n clientType {\n id\n name\n }\n }\n createdBy {\n username\n }\n editedBy {\n username\n }\n financialInfo {\n typeOfPlan {\n id\n name\n }\n }\n updatedAt\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,t)})),e.definitions&&e.definitions.forEach((function(e){i(e,t)}))}var a={};function o(e,t){for(var n=0;n0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var t=a[e]||new Set;t.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(function(){n.definitions.forEach((function(e){if(e.name){var t=new Set;i(e,t),a[e.name.value]=t}}))})(),e.exports=n,e.exports["ClonePlan"]=r(n,"ClonePlan")},"894d":function(e,t,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AddComponentOfNeed"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NamedType",name:{kind:"Name",value:"AddComponentOfNeedInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"addComponentOfNeed"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Component"},directives:[]}]}}]}}],loc:{start:0,end:161}};i.loc.source={body:'#import "../fragments/component.gql"\nmutation AddComponentOfNeed($input: AddComponentOfNeedInput) {\n addComponentOfNeed(input: $input) {\n ...Component\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function o(e){return e.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!a[t]&&(a[t]=!0,!0)}))}function r(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,t)})),e.definitions&&e.definitions.forEach((function(e){r(e,t)}))}i.definitions=i.definitions.concat(o(n("77e6").definitions));var l={};function s(e,t){for(var n=0;n0){var r=o;o=new Set,r.forEach((function(e){if(!a.has(e)){a.add(e);var t=l[e]||new Set;t.forEach((function(e){o.add(e)}))}}))}return a.forEach((function(t){var i=s(e,t);i&&n.definitions.push(i)})),n}(function(){i.definitions.forEach((function(e){if(e.name){var t=new Set;r(e,t),l[e.name.value]=t}}))})(),e.exports=i,e.exports["AddComponentOfNeed"]=c(i,"AddComponentOfNeed")},"89a7":function(e,t,n){var i={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"Plan"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Plan"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isCurrent"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"icsProjectNumber"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dateOfCreation"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dateOfAssessment"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"photosLink"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"financialInfo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"FinancialInfo"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"client"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"facilities"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}}],loc:{start:0,end:303}};i.loc.source={body:'#import "../fragments/financialInfo.gql"\nfragment Plan on Plan {\n id\n name\n isCurrent\n icsProjectNumber\n dateOfCreation\n dateOfAssessment\n photosLink\n description\n financialInfo {\n ...FinancialInfo\n }\n client {\n id\n name\n facilities {\n id\n name\n }\n }\n __typename\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function o(e){return e.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!a[t]&&(a[t]=!0,!0)}))}i.definitions=i.definitions.concat(o(n("7672").definitions)),e.exports=i},"8a75":function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Plans"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"plans"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isCurrent"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dateOfCreation"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"client"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"icsOffice"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"clientType"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"createdBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"editedBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"financialInfo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"typeOfPlan"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"planStartYear"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:403}};n.loc.source={body:"query Plans {\n plans {\n id\n name\n isCurrent\n dateOfCreation\n client {\n id\n name\n icsOffice {\n id\n name\n }\n clientType {\n id\n name\n }\n }\n createdBy {\n username\n }\n editedBy {\n username\n }\n financialInfo {\n typeOfPlan {\n id\n name\n }\n planStartYear\n }\n updatedAt\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,t)})),e.definitions&&e.definitions.forEach((function(e){i(e,t)}))}var a={};function o(e,t){for(var n=0;n0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var t=a[e]||new Set;t.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(function(){n.definitions.forEach((function(e){if(e.name){var t=new Set;i(e,t),a[e.name.value]=t}}))})(),e.exports=n,e.exports["Plans"]=r(n,"Plans")},"8ab8":function(e,t,n){"use strict";n("006c")},"8af6":function(e,t,n){},"8ca5":function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Units"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"units"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:46}};n.loc.source={body:"query Units {\n units {\n id\n name\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,t)})),e.definitions&&e.definitions.forEach((function(e){i(e,t)}))}var a={};function o(e,t){for(var n=0;n0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var t=a[e]||new Set;t.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(function(){n.definitions.forEach((function(e){if(e.name){var t=new Set;i(e,t),a[e.name.value]=t}}))})(),e.exports=n,e.exports["Units"]=r(n,"Units")},9392:function(e,t,n){"use strict";n("b24e")},"94e1":function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateContact"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NamedType",name:{kind:"Name",value:"ContactUpdateInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateContact"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"jobTitle"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"phones"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"phone"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"location"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"countYearsTogether"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:252}};n.loc.source={body:"mutation UpdateContact($input: ContactUpdateInput) {\n updateContact(input: $input) {\n id\n name\n jobTitle\n phones {\n id\n type {\n id\n name\n }\n phone\n }\n email\n location\n countYearsTogether\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,t)})),e.definitions&&e.definitions.forEach((function(e){i(e,t)}))}var a={};function o(e,t){for(var n=0;n0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var t=a[e]||new Set;t.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(function(){n.definitions.forEach((function(e){if(e.name){var t=new Set;i(e,t),a[e.name.value]=t}}))})(),e.exports=n,e.exports["UpdateContact"]=r(n,"UpdateContact")},"955d":function(e,t,n){},"95f2":function(e,t,n){"use strict";n("4c3e")},"96f1":function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-btn",e._g(e._b({attrs:{color:e.colorValue,outlined:e.isOutlined,width:e.fullWidth?"100%":e.$props.width}},"v-btn",Object.assign({},e.$props,e.$attrs),!1),e.$listeners),[e._t("default")],2)},a=[],o=n("2b0e"),r=n("8336"),l=o["a"].extend({mixins:[r["a"]]}),s=l.extend({name:"Btn",components:{VBtn:r["a"]},props:{colorType:{type:null|String,validator:function(e){return!e||-1!==["primary","secondary","accent"].indexOf(e)},default:"primary"},rounded:{type:Boolean,default:!0},depressed:{type:Boolean,default:!0},fullWidth:{type:Boolean,default:!1}},computed:{colorValue:function(){return"primary"===this.colorType||"accent"===this.colorType?"accent":""},isOutlined:function(){return"accent"===this.colorType}}}),c=s,d=n("2877"),u=n("6544"),m=n.n(u),f=Object(d["a"])(c,i,a,!1,null,null,null);t["a"]=f.exports;m()(f,{VBtn:r["a"]})},9772:function(e,t,n){"use strict";n("4de4");var i=n("2b0e"),a={admin:"Admin",readonly:"Read-Only",viewer:"Viewer",manager:"Manager",user:"User"},o=a;function r(e){return e?o[e]||e:""}i["a"].filter("role",r);t["a"]=r},"9a28":function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FundingSource"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"fundingSource"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:62}};n.loc.source={body:"query FundingSource {\n fundingSource {\n id\n name\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,t)})),e.definitions&&e.definitions.forEach((function(e){i(e,t)}))}var a={};function o(e,t){for(var n=0;n0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var t=a[e]||new Set;t.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(function(){n.definitions.forEach((function(e){if(e.name){var t=new Set;i(e,t),a[e.name.value]=t}}))})(),e.exports=n,e.exports["FundingSource"]=r(n,"FundingSource")},"9ad2":function(e,t,n){},"9b19":function(e,t,n){e.exports=n.p+"img/logo.adb75207.svg"},"9b2c":function(e,t,n){},"9c0c":function(e,t,n){},"9cca":function(e,t,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ComponentsOfNeed"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"planId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"status"}},type:{kind:"NamedType",name:{kind:"Name",value:"STATUS"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"componentsOfNeed"},arguments:[{kind:"Argument",name:{kind:"Name",value:"planId"},value:{kind:"Variable",name:{kind:"Name",value:"planId"}}},{kind:"Argument",name:{kind:"Name",value:"status"},value:{kind:"Variable",name:{kind:"Name",value:"status"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Component"},directives:[]}]}}]}}],loc:{start:0,end:172}};i.loc.source={body:'#import "../fragments/component.gql"\n\nquery ComponentsOfNeed($planId: ID!, $status: STATUS) {\n componentsOfNeed(planId: $planId, status: $status) {\n ...Component\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function o(e){return e.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!a[t]&&(a[t]=!0,!0)}))}function r(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,t)})),e.definitions&&e.definitions.forEach((function(e){r(e,t)}))}i.definitions=i.definitions.concat(o(n("77e6").definitions));var l={};function s(e,t){for(var n=0;n0){var r=o;o=new Set,r.forEach((function(e){if(!a.has(e)){a.add(e);var t=l[e]||new Set;t.forEach((function(e){o.add(e)}))}}))}return a.forEach((function(t){var i=s(e,t);i&&n.definitions.push(i)})),n}(function(){i.definitions.forEach((function(e){if(e.name){var t=new Set;r(e,t),l[e.name.value]=t}}))})(),e.exports=i,e.exports["ComponentsOfNeed"]=c(i,"ComponentsOfNeed")},"9f02":function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));n("caad"),n("2532"),n("5319"),n("ac1f"),n("4de4");var i=n("2b0e"),a=function(e){return e?e.includes("code 400")?"Error... Something went wrong! Please try it later":e.replace("Network error: ","").replace("GraphQL error: ",""):""};i["a"].filter("errorMsg",a)},a151:function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteDocument"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteDocument"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[]}]}}],loc:{start:0,end:64}};n.loc.source={body:"mutation DeleteDocument($id: ID!) {\n deleteDocument(id: $id)\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,t)})),e.definitions&&e.definitions.forEach((function(e){i(e,t)}))}var a={};function o(e,t){for(var n=0;n0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var t=a[e]||new Set;t.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(function(){n.definitions.forEach((function(e){if(e.name){var t=new Set;i(e,t),a[e.name.value]=t}}))})(),e.exports=n,e.exports["DeleteDocument"]=r(n,"DeleteDocument")},a20f:function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"GenerateReports"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NamedType",name:{kind:"Name",value:"InputGenerateReports"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"generateReports"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:106}};n.loc.source={body:"mutation GenerateReports($input: InputGenerateReports) {\n generateReports(input: $input) {\n url\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,t)})),e.definitions&&e.definitions.forEach((function(e){i(e,t)}))}var a={};function o(e,t){for(var n=0;n0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var t=a[e]||new Set;t.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(function(){n.definitions.forEach((function(e){if(e.name){var t=new Set;i(e,t),a[e.name.value]=t}}))})(),e.exports=n,e.exports["GenerateReports"]=r(n,"GenerateReports")},a2f4:function(e,t,n){},a407:function(e,t,n){},a483:function(e,t,n){"use strict";n("99af");var i={positiveNumber:function(e){return null===e||""===e||e>=0&&e<=99999999999||"Please enter a positive number"},integerNumber:function(e){return null===e||""===e||/^\d+$/.test(e)||"Please enter a whole number"},floatNumber:function(e){return function(t){switch(e){case 1:return null===t||""===t||/^\d+(\.\d{1})?$/.test(t)||"Please enter value in the correct format: XX.X";case 2:return null===t||""===t||/^\d+(\.\d{1,2})?$/.test(t)||"Please enter value in the correct format: XX.XX";default:return null===t||""===t||/^\d+(\.\d)?$/.test(t)||"Please enter value in the correct format: XX.X"}}},numberInRange:function(e,t){return function(n){return null===n||""===n||n>=e&&n<=t||"Please enter value between ".concat(e," and ").concat(t)}},email:function(e){return!e||/.+@.+\..+/.test(e)||"Email must be valid"}};t["a"]=i},a8da:function(e,t,n){},a9b0:function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-data-table",e._g(e._b({ref:"table",staticClass:"data-table",attrs:{items:e.filteredItems,hideDefaultHeader:"","fixed-header":"","mobile-breakpoint":"0","group-desc":e.internalGroupDesc,headers:e.$props.headers.map((function(e){return Object.assign({},e,{cellClass:e.fixed?"fixed":""})})),"footer-props":e.$props.footerProps?e.$props.footerProps:{itemsPerPageOptions:[10,20,30,-1]}},on:{"update:items-per-page":e.recalcHeaderStyles},scopedSlots:e._u([{key:"top",fn:function(){return[n("div",{staticClass:"-position-relative"},[e.resetBtn.show?n("btn",{staticClass:"mb-3",class:{"reset-btn-absolute":e.resetBtn.isAbsolute},attrs:{disabled:e.isFilterEmpty},on:{click:e.onResetBtn}},[e._v("Reset filters")]):e._e()],1)]},proxy:!0},{key:"header",fn:function(t){var i=t.props,a=i.someItems,o=i.everyItem,r=i.options.groupBy,l=t.on;return[n("thead",{ref:"thead"},[n("tr",{ref:"header",staticClass:"header"},[e.showSelect?n("th",{attrs:{width:"20px"}},[e.selectLabel?[e._v(e._s(e.selectLabel))]:n("v-checkbox",{attrs:{value:o,indeterminate:a&&!o},on:{change:l["toggle-select-all"]}})],2):e._e(),e._l(e.$props.headers,(function(t){return n("th",e._g(e._b({key:t.value,style:e.headerStyles[t.value]},"th",Object.assign({},t,{class:{fixed:t.fixed}}),!1),t.sortable||void 0===t.sortable?{click:function(){e.onSorting(t)}}:{}),[t.sortable||void 0===t.sortable?n("span",{staticClass:"sortable",class:{active:e.sorting&&t.value===e.sorting.name||r.includes(t.value)}},[e._v(" "+e._s(t.text)+" "),t.sortable||void 0===t.sortable?n("span",{staticClass:"sorting"},[n("v-icon",{staticClass:"icon",class:{active:e.isAscActive(t)},attrs:{dense:""}},[e._v("fa-sort-up")]),n("v-icon",{staticClass:"icon",class:{active:e.isDescActive(t)},attrs:{dense:""}},[e._v("fa-sort-down")])],1):e._e()]):[e._v(" "+e._s(t.text)+" ")],t.width?n("span",{staticClass:"col-spacer",style:{width:t.width}}):e._e()],2)}))],2),e.isFilter?n("tr",{ref:"subHeader",staticClass:"header filter",style:e.subHeaderStyle},[e.showSelect?n("th",{style:e.subHeaderStyle}):e._e(),e._l(e.filters,(function(t){return n("th",e._b({key:t.name,style:e.subHeaderStyle,attrs:{width:t.width}},"th",{class:[{fixed:t.fixed},t.type]},!1),[!t.type||"text"!==t.type&&"number"!==t.type&&"currency"!==t.type?e._e():n("v-text-field",{attrs:{outlined:"",dense:"",clearable:"","full-width":"","hide-details":""},on:{input:function(n){return e.onFilter({name:t.name,value:t.value,type:t.type})}},model:{value:t.value,callback:function(n){e.$set(t,"value",n)},expression:"filter.value"}}),t.type&&"select"===t.type?n("div",{staticClass:"select-wrapper"},[n("v-select",{attrs:{outlined:"",dense:"",multiple:"",items:t.options,"full-width":"","hide-details":"",clearable:""},on:{change:function(n){return e.onFilter({name:t.name,value:t.value,type:t.type,options:t.options})}},scopedSlots:e._u([{key:"selection",fn:function(i){var a=i.index;return[0===a?n("span",{staticClass:"selection"},[e._l(t.value,(function(t,n){return[e._v(e._s(0===n?t:", "+t))]}))],2):e._e()]}},{key:"item",fn:function(t){var i=t.item,a=t.attrs,o=t.on;return[n("v-list-item",e._g(e._b({attrs:{dense:""},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.active;return[n("v-list-item-action",[n("v-checkbox",{attrs:{dense:"","hide-details":"","input-value":a}})],1),n("v-list-item-content",[n("v-list-item-title",[e._v(" "+e._s(i)+" ")])],1)]}}],null,!0)},"v-list-item",a,!1),o))]}}],null,!0),model:{value:t.value,callback:function(n){e.$set(t,"value",n)},expression:"filter.value"}})],1):e._e(),t.type&&"date"===t.type?n("date-picker",{attrs:{placeholder:"Date",dense:"",outlined:"",clearable:"","hide-details":""},on:{change:e.onFilter},model:{value:t.value,callback:function(n){e.$set(t,"value",n)},expression:"filter.value"}}):e._e(),t.type&&"slot"===t.type?e._t("filter."+t.name,null,{callback:e.onFilter,item:t}):e._e()],2)}))],2):e._e()])]}},{key:"group",fn:function(t){var i=t.headers,a=t.group,o=t.items;return[n("tr",{staticClass:"v-row-group__header"},[n("td",{attrs:{colspan:e.$props.headers.length-1}},[n("btn",{attrs:{"color-type":"secondary",icon:""},on:{click:function(t){return e.onGroupToggle(a)}}},[e.isGroupExpanded(a)?n("v-icon",[e._v("fa-chevron-up")]):n("v-icon",[e._v("fa-chevron-down")])],1),e._v(e._s(a)+" ")],1),n("td",{class:i[i.length-1].cellClass},[e._t("group.action",null,{group:a,items:o})],2)]),e.isGroupExpanded(a)?[e.isGroupContainChildren(o,i)?e._l(o,(function(t){return n("tr",{key:t[e.$props.itemKey]},[n("td"),e._l(i,(function(i){return n("td",{key:i.value,class:i.cellClass},[Object.keys(e.$scopedSlots).includes("item."+i.value)?e._t("item."+i.value,null,{item:t}):[e._v(" "+e._s(t[i.value]||"")+" ")]],2)}))],2)})):n("tr",{key:a},[n("td",{staticClass:"empty-group-text",attrs:{colspan:i.length+1}},[e._v(e._s(e.emptyGroupText))])])]:e._e()]}},e._l(e.$props.headers,(function(t){return{key:"item."+t.value,fn:function(i){var a=i.item;return["number"===t.dataType?[e._v(" "+e._s(e._f("number")(a[t.value]))+" ")]:"currency"===t.dataType?[n("span",{key:a[t.value],staticClass:"currency-cell"},[e._v(e._s(e._f("currency")(a[t.value])))])]:"longstring"===t.dataType?[n("truncated-text",{key:a[t.value],attrs:{text:a[t.value]}})]:[e._v(" "+e._s(a[t.value])+" ")]]}}})),e._l(e.$scopedSlots,(function(t,n){return{key:n,fn:function(t){return[e._t(n,null,null,t)]}}}))],null,!0)},"v-data-table",Object.assign({},e.$props,e.$attrs,{class:{"h-scroll":e.hasHScroll}}),!1),e.$listeners))},a=[],o=n("3835"),r=n("53ca"),l=n("2909"),s=(n("a9e3"),n("4de4"),n("159b"),n("7db0"),n("07ac"),n("b0c0"),n("b64b"),n("caad"),n("2532"),n("a434"),n("c7cd"),n("6062"),n("d3b7"),n("3ca3"),n("ddb0"),n("a630"),n("2b0e")),c=n("8fea"),d=n("40a5"),u=n("96f1"),m=n("ea34"),f=n("629d"),p=n("3552"),v=n("2ef0"),h=s["a"].extend({mixins:[c["a"]]}),y=h.extend({name:"DataTable",components:{VDataTable:c["a"],DatePicker:d["a"],Btn:u["a"],TruncatedText:m["a"]},props:{itemsPerPage:{type:Number,default:10},emptyGroupText:{type:String,default:"No items"},selectLabel:{type:String},resetBtnParams:{type:[Object,Boolean],default:!0},enableStoredFilter:{type:Boolean,default:!0}},data:function(){return{filteredItems:Object(l["a"])(this.items)||[],sorting:null,hasHScroll:!1,observer:null,resizeObserver:null,headerHeight:0,headerStyles:{},expandedGroups:[],internalGroupDesc:!1,filters:{},tableVisible:!1,isDefaultFiltersSetted:!1,lastSelectedFilter:null,disableSmartFilter:!0}},mounted:function(){this.initResizeObserver(),this.initScrollHandler(),this.$emit("mounted")},beforeDestroy:function(){this.observer&&this.observer.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect()},watch:{items:{immediate:!0,handler:function(e,t){var n=this;Array.isArray(e)&&(t&&t.length===e.length?(this.itemKey&&this.filteredItems.forEach((function(t,i){var a=e.find((function(e){return e[n.itemKey]===t[n.itemKey]}));if(!a)return n.reset(e),!1;n.filteredItems[i]=a})),this.updateFilters()):(this.updateFilters(),this.filter()),this.recalcHeaderStyles())},deep:!0},tableVisible:function(e){e?this.initObserver():this.observer&&this.observer.disconnect()},filteredItems:function(e){this.isFilterEmpty?this.$emit("filtered",[]):this.$emit("filtered",e,Object(v["cloneDeep"])(Object.values(this.filters))),this.updateFilters(),this.enableStoredFilter&&Object(p["c"])(this.$route.name,this.filters)},headers:{immediate:!0,handler:function(e,t){e&&t&&e.length!==t.length?this.reset(this.items):this.updateFilters()},deep:!0}},computed:{resetBtn:function(){var e={show:!1,isAbsolute:!1};return this.resetBtnParams&&("object"===Object(r["a"])(this.resetBtnParams)?e=Object.assign({},e,this.resetBtnParams):e.show=!0),e},isFilter:function(){return!!this.headers.some((function(e){return e.type}))},selectedFilters:function(){var e=this,t={};return Object.keys(this.filters).forEach((function(n){var i=e.filters[n];!i.value||Array.isArray(i.value)&&!i.value.length||(t[n]=i)})),t},isFilterEmpty:function(){return!Object.keys(this.selectedFilters).length},subHeaderStyle:function(){return{top:this.headerHeight+"px"}}},methods:{filter:function(){var e=this.selectedFilters;this.filteredItems=this.items.filter((function(t){for(var n in e)if(n in t){var i=function(){var i=String(t[n]).toLowerCase(),a=e[n].value;if(Array.isArray(a)){if(!a.filter((function(e){return String(e).toLowerCase()===i})).length)return{v:!1}}else if(!i.includes(String(a).toLowerCase()))return{v:!1}}();if("object"===Object(r["a"])(i))return i.v}return!0}))},sort:function(){if(this.sorting){var e=this.sorting,t=e.name,n=e.order,i=e.type,a=null;switch(i){case"number":case"year":case"currency":a=function(e,n){return e[t]-n[t]};break;case"date":a=function(e,n){return new Date(e[t]).getTime()-new Date(n[t]).getTime()};break;default:a=function(e,n){var i=e?Object(f["a"])(e,t):"",a=n?Object(f["a"])(n,t):"";return i>a?1:i1},isAscActive:function(e){return this.groupBy===e.value&&!this.internalGroupDesc||this.sorting&&this.sorting.name===e.value&&"asc"===this.sorting.order},isDescActive:function(e){return this.groupBy===e.value&&this.internalGroupDesc||this.sorting&&this.sorting.name===e.value&&"desc"===this.sorting.order},onFilter:function(e){this.lastSelectedFilter=e,this.filter(),this.sort(),this.recalcHeaderStyles()},onSorting:function(e){if(this.groupBy&&this.groupBy===e.value)this.internalGroupDesc=!this.internalGroupDesc;else{var t="asc";this.sorting&&e.value===this.sorting.name&&(t="asc"===this.sorting.order?"desc":"asc"),this.sorting={name:e.value,order:t,type:e.dataType||e.type}}this.sort()},onGroupToggle:function(e){var t=this.expandedGroups.indexOf(e);t>-1?this.expandedGroups.splice(t,1):this.expandedGroups.push(e)},initObserver:function(){var e=this,t=this.$refs.header;this.observer&&this.observer.disconnect();var n=new IntersectionObserver((function(t){var n=Object(o["a"])(t,1),i=n[0];e.hasHScroll=i.boundingClientRect.width!==i.intersectionRect.width&&i.intersectionRatio<1}),{threshold:[1],root:this.$refs.thead.parentElement.parentElement});n.observe(t),this.observer=n},initResizeObserver:function(){var e=this,t=this.$refs.header;this.resizeObserver&&this.resizeObserver.disconnect();var n=new ResizeObserver((function(t){t[0]&&(0===t[0].contentRect.width&&0===e.$refs.thead.parentElement.parentElement.offsetWidth&&e.tableVisible?e.tableVisible=!1:t[0].contentRect.width>0&&!e.tableVisible&&(e.tableVisible=!0),e.headerHeight=t[0].contentRect.height,e.recalcHeaderStyles())}));n.observe(t),this.resizeObserver=n},initScrollHandler:function(){if(this.$refs.table&&this.$refs.table.$el){var e=this.$refs.table.$el.querySelector(".v-data-table__wrapper");if(e){var t,n=!0,i=function(){n&&(e.click(),n=!1)},a=function(){i(),clearTimeout(t),t=setTimeout((function(){n=!0}),100)};e.addEventListener("scroll",a)}}},setDefaultFilterValues:function(){var e=this;if(this.enableStoredFilter&&!this.isDefaultFiltersSetted){this.isDefaultFiltersSetted=!0;var t=Object(p["a"])(this.$route.name);if(t&&this.filters){Object.keys(this.filters).forEach((function(n){t[n]&&(e.filters[n].value=t[n].value)})),this.filter();var n=Object.values(this.filters).some((function(e){return""!==e.value&&null!==e.value&&0!==e.value.length}))?this.filteredItems:[];this.$emit("filtered",n,Object.values(Object(v["cloneDeep"])(this.filters)))}}},updateFilters:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isFilter){var n={};this.headers.forEach((function(i){var a=e.generateOptionsForFilter(i),o=e.filters[i.value],r=null;!t&&o&&"value"in o&&(r=o.value),n[i.value]={options:a,value:r,type:i.type,name:i.value,width:i.width,fixed:i.fixed}})),this.filters=n,this.setDefaultFilterValues()}else this.filters={},this.lastSelectedFilter=null},generateOptionsForFilter:function(e){var t,n=this.disableSmartFilter?this.items:this.filteredItems,i=this.disableSmartFilter&&this.lastSelectedFilter;if("select"===e.type){if(e.options)t=Object(v["cloneDeep"])(e.options);else if(n)if(i&&i.value&&i.value.length&&i.name===e.value&&"select"===i.type)t=i.options;else{var a=new Set;n.forEach((function(t){var n=t[e.value];n&&a.add(n)})),t=Array.from(a)}Array.isArray(t)&&!e.noSort&&t.sort(this.sortWithLowerCase)}return t},sortWithLowerCase:function(e,t){var n=e.toLowerCase(),i=t.toLowerCase();return ni?1:0},reset:function(e){this.updateFilters(!0),this.sorting=null,this.filteredItems=Object(l["a"])(e),this.lastSelectedFilter=null},onResetBtn:function(){this.reset(this.items),this.$emit("reset")},recalcHeaderStyles:function(){var e=this;this.$refs.header&&this.$refs.subHeader&&this.$refs.thead&&this.$nextTick((function(){var t=[],n=e.$refs.header.querySelectorAll(":scope>th.fixed"),i=e.$refs.subHeader.querySelectorAll(":scope>th.fixed"),a=e.$refs.thead.parentElement.querySelectorAll("tbody>tr");n.forEach((function(e,i){for(var a=0,o=0;otd.fixed").forEach((function(e,n){t[n]&&(e.style.left=t[n])}))}))}))}}}),b=y,g=(n("2a98"),n("2877")),k=n("6544"),S=n.n(k),C=n("ac7c"),N=n("132d"),_=n("da13"),w=n("1800"),x=n("5d23"),E=n("b974"),F=n("8654"),O=Object(g["a"])(b,i,a,!1,null,null,null);t["a"]=O.exports;S()(O,{VCheckbox:C["a"],VDataTable:c["a"],VIcon:N["a"],VListItem:_["a"],VListItemAction:w["a"],VListItemContent:x["a"],VListItemTitle:x["b"],VSelect:E["a"],VTextField:F["a"]})},a9fc:function(e,t,n){"use strict";n("0fbf")},adf9:function(e,t,n){},aefe:function(e,t,n){},af2a:function(e,t,n){"use strict";n("d020")},af7a:function(e,t,n){e.exports=n.p+"img/CIP360-logo.8c8c9fea.png"},b24e:function(e,t,n){},b410:function(e,t,n){e.exports=n.p+"img/login-logo.57a50e88.png"},b44d:function(e,t,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CloneComponentOfNeed"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"cloneComponentOfNeed"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Component"},directives:[]}]}}]}}],loc:{start:0,end:136}};i.loc.source={body:'#import "../fragments/component.gql"\nmutation CloneComponentOfNeed($id: ID!) {\n cloneComponentOfNeed(id: $id) {\n ...Component\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function o(e){return e.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!a[t]&&(a[t]=!0,!0)}))}function r(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,t)})),e.definitions&&e.definitions.forEach((function(e){r(e,t)}))}i.definitions=i.definitions.concat(o(n("77e6").definitions));var l={};function s(e,t){for(var n=0;n0){var r=o;o=new Set,r.forEach((function(e){if(!a.has(e)){a.add(e);var t=l[e]||new Set;t.forEach((function(e){o.add(e)}))}}))}return a.forEach((function(t){var i=s(e,t);i&&n.definitions.push(i)})),n}(function(){i.definitions.forEach((function(e){if(e.name){var t=new Set;r(e,t),l[e.name.value]=t}}))})(),e.exports=i,e.exports["CloneComponentOfNeed"]=c(i,"CloneComponentOfNeed")},b583:function(e,t,n){"use strict";n("8af6")},b710:function(e,t,n){},b805:function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RefreshToken"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"token"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"refreshToken"},arguments:[{kind:"Argument",name:{kind:"Name",value:"token"},value:{kind:"Variable",name:{kind:"Name",value:"token"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"accessToken"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"refreshToken"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:112}};n.loc.source={body:"mutation RefreshToken($token: String!) {\n refreshToken(token: $token) {\n accessToken\n refreshToken\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,t)})),e.definitions&&e.definitions.forEach((function(e){i(e,t)}))}var a={};function o(e,t){for(var n=0;n0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var t=a[e]||new Set;t.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(function(){n.definitions.forEach((function(e){if(e.name){var t=new Set;i(e,t),a[e.name.value]=t}}))})(),e.exports=n,e.exports["RefreshToken"]=r(n,"RefreshToken")},b891:function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-text-field",e._g(e._b({attrs:{type:"number"},on:{change:e.onChange}},"v-text-field",Object.assign({},e.$props,e.$attrs),!1),e.$listeners))},a=[],o=(n("a9e3"),n("2b0e")),r=n("8654"),l=o["a"].extend({mixins:[r["a"]]}),s=l.extend({name:"NumberTextField",components:{VTextField:r["a"]},methods:{onChange:function(e){var t=""!==e?Number(e):null;this.$emit("input",t),this.$emit("change",t)}}}),c=s,d=(n("d305"),n("2877")),u=n("6544"),m=n.n(u),f=Object(d["a"])(c,i,a,!1,null,null,null);t["a"]=f.exports;m()(f,{VTextField:r["a"]})},b8ea:function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Systems"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"systems"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"category"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"finCode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"components"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"costPerUnit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"unit"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:209}};n.loc.source={body:"query Systems {\n systems {\n id\n name\n category {\n id\n name\n }\n finCode\n components {\n id\n name\n costPerUnit\n unit {\n id\n name\n }\n }\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,t)})),e.definitions&&e.definitions.forEach((function(e){i(e,t)}))}var a={};function o(e,t){for(var n=0;n0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var t=a[e]||new Set;t.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(function(){n.definitions.forEach((function(e){if(e.name){var t=new Set;i(e,t),a[e.name.value]=t}}))})(),e.exports=n,e.exports["Systems"]=r(n,"Systems")},ba7b:function(e,t,n){"use strict";n("609c")},bf8d:function(e,t,n){},c15b:function(e,t,n){},c350:function(e,t,n){"use strict";n("f737")},c3f6:function(e,t,n){"use strict";n("0282")},c6c1:function(e,t,n){},c899:function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ConditionAssessment"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"conditionAssessment"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:74}};n.loc.source={body:"query ConditionAssessment {\n conditionAssessment {\n id\n name\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,t)})),e.definitions&&e.definitions.forEach((function(e){i(e,t)}))}var a={};function o(e,t){for(var n=0;n0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var t=a[e]||new Set;t.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(function(){n.definitions.forEach((function(e){if(e.name){var t=new Set;i(e,t),a[e.name.value]=t}}))})(),e.exports=n,e.exports["ConditionAssessment"]=r(n,"ConditionAssessment")},c90a:function(e,t,n){"use strict";n("43e2")},c982:function(e,t){var n={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"Facility"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Facility"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"squareFootage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"age"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"occupancy"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"capacity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"use"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"siteSize"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"replacementCost"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"summary"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"urlPhotos"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"clientId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}}],loc:{start:0,end:196}};n.loc.source={body:"fragment Facility on Facility {\n id\n name\n squareFootage\n age\n occupancy\n capacity\n use\n siteSize\n replacementCost\n summary\n urlPhotos\n clientId\n createdAt\n updatedAt\n __typename\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};e.exports=n},c9d1:function(e,t,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateComponentsOfNeed"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateComponentOfNeedInput"}}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateComponentsOfNeed"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Component"},directives:[]}]}}]}}],loc:{start:0,end:175}};i.loc.source={body:'#import "../fragments/component.gql"\nmutation UpdateComponentsOfNeed($input: [UpdateComponentOfNeedInput!]) {\n updateComponentsOfNeed(input: $input) {\n ...Component\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function o(e){return e.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!a[t]&&(a[t]=!0,!0)}))}function r(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,t)})),e.definitions&&e.definitions.forEach((function(e){r(e,t)}))}i.definitions=i.definitions.concat(o(n("77e6").definitions));var l={};function s(e,t){for(var n=0;n0){var r=o;o=new Set,r.forEach((function(e){if(!a.has(e)){a.add(e);var t=l[e]||new Set;t.forEach((function(e){o.add(e)}))}}))}return a.forEach((function(t){var i=s(e,t);i&&n.definitions.push(i)})),n}(function(){i.definitions.forEach((function(e){if(e.name){var t=new Set;r(e,t),l[e.name.value]=t}}))})(),e.exports=i,e.exports["UpdateComponentsOfNeed"]=c(i,"UpdateComponentsOfNeed")},cc07:function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ResetPassword"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"email"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"resetPassword"},arguments:[{kind:"Argument",name:{kind:"Name",value:"email"},value:{kind:"Variable",name:{kind:"Name",value:"email"}}}],directives:[]}]}}],loc:{start:0,end:75}};n.loc.source={body:"mutation ResetPassword($email: String!) {\n resetPassword(email: $email)\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,t)})),e.definitions&&e.definitions.forEach((function(e){i(e,t)}))}var a={};function o(e,t){for(var n=0;n0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var t=a[e]||new Set;t.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(function(){n.definitions.forEach((function(e){if(e.name){var t=new Set;i(e,t),a[e.name.value]=t}}))})(),e.exports=n,e.exports["ResetPassword"]=r(n,"ResetPassword")},cd26:function(e,t,n){},cddf:function(e,t,n){"use strict";n("6ed5")},ce1e:function(e,t,n){"use strict";n("1921")},d020:function(e,t,n){},d305:function(e,t,n){"use strict";n("85d0")},d361:function(e,t,n){"use strict";n("6cc7")},d368:function(e,t,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Plan"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"plan"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Plan"},directives:[]}]}}]}}],loc:{start:0,end:92}};i.loc.source={body:'#import "../fragments/plan.gql"\n\nquery Plan($id: ID!) {\n plan(id: $id) {\n ...Plan\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function o(e){return e.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!a[t]&&(a[t]=!0,!0)}))}function r(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,t)})),e.definitions&&e.definitions.forEach((function(e){r(e,t)}))}i.definitions=i.definitions.concat(o(n("89a7").definitions));var l={};function s(e,t){for(var n=0;n0){var r=o;o=new Set,r.forEach((function(e){if(!a.has(e)){a.add(e);var t=l[e]||new Set;t.forEach((function(e){o.add(e)}))}}))}return a.forEach((function(t){var i=s(e,t);i&&n.definitions.push(i)})),n}(function(){i.definitions.forEach((function(e){if(e.name){var t=new Set;r(e,t),l[e.name.value]=t}}))})(),e.exports=i,e.exports["Plan"]=c(i,"Plan")},d715:function(e,t,n){},d739:function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("modal",e._g({attrs:{title:e.title,"max-width":"480"},scopedSlots:e._u([{key:"activator",fn:function(t){return[e._t("default",null,null,t)]}},{key:"default",fn:function(t){var i=t.close;return[n("ApolloMutation",{staticClass:"confirmation-modal-content",attrs:{mutation:e.mutation,variables:e.variables,update:e.update},on:{done:function(t){return e.onDone(i)}},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.mutate,o=t.loading,r=t.error;return[o?e._e():n("alert",{attrs:{error:r}}),n("p",[e._v(e._s(e.message))]),n("div",{staticClass:"mt-8"},[n("div",{staticClass:"zoom-fix"},[n("btn",{attrs:{width:"162","color-type":"accent",disabled:o},on:{click:i}},[e._v(e._s(e.cancelBtn.label))])],1),n("div",{staticClass:"zoom-fix"},[n("btn",{attrs:{width:"162",type:"submit",disabled:o},on:{click:a}},[e._v(e._s(e.okBtn.label))])],1)])]}}],null,!0)})]}}],null,!0)},e.$listeners))},a=[],o=n("96f1"),r=n("4169"),l={name:"ConfirmationModal",components:{Modal:r["a"],Btn:o["a"]},props:{title:{type:String,default:""},message:{type:String,default:""},mutation:{type:Object,default:""},variables:{type:Object,default:null},update:{types:Function},done:{type:Function},okBtn:{type:Object,default:function(){return{label:"Ok"}}},cancelBtn:{type:Object,default:function(){return{label:"Cancel"}}}},methods:{onDone:function(e){e(),this.done&&this.done()}}},s=l,c=(n("2d6a"),n("2877")),d=Object(c["a"])(s,i,a,!1,null,null,null);t["a"]=d.exports},d907:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));n("b0c0");var i=function(e,t){if(e&&t&&"string"===typeof e.name&&"string"===typeof t.name){var n=e.name.toLowerCase(),i=t.name.toLowerCase();return ni?1:0}return 1}},d995:function(e,t,n){"use strict";n("b710")},daee:function(e,t,n){"use strict";n("1fe6")},e194:function(e,t,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AddFacility"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NamedType",name:{kind:"Name",value:"FacilityAddInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"addFacility"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Facility"},directives:[]}]}}]}}],loc:{start:0,end:138}};i.loc.source={body:'#import "../fragments/facility.gql"\nmutation AddFacility($input: FacilityAddInput) {\n addFacility(input: $input) {\n ...Facility\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function o(e){return e.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!a[t]&&(a[t]=!0,!0)}))}function r(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,t)})),e.definitions&&e.definitions.forEach((function(e){r(e,t)}))}i.definitions=i.definitions.concat(o(n("c982").definitions));var l={};function s(e,t){for(var n=0;n0){var r=o;o=new Set,r.forEach((function(e){if(!a.has(e)){a.add(e);var t=l[e]||new Set;t.forEach((function(e){o.add(e)}))}}))}return a.forEach((function(t){var i=s(e,t);i&&n.definitions.push(i)})),n}(function(){i.definitions.forEach((function(e){if(e.name){var t=new Set;r(e,t),l[e.name.value]=t}}))})(),e.exports=i,e.exports["AddFacility"]=c(i,"AddFacility")},e33e:function(e,t,n){"use strict";n("1b03")},e36a:function(e,t,n){"use strict";n("9b2c")},e3c2:function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-expansion-panel-header",e._g(e._b({staticClass:"expansion-panel-header",scopedSlots:e._u([{key:"actions",fn:function(){return[n("v-icon",{staticClass:"icon"},[e._v("$expand")])]},proxy:!0}])},"v-expansion-panel-header",Object.assign({},e.$props,e.$attrs),!1),e.$listeners),[n("span",{staticClass:"header"},[e._t("default")],2)])},a=[],o=n("2b0e"),r=n("c865"),l=o["a"].extend({mixins:[r["a"]]}),s=l.extend({name:"ExpansionPanelHeader",components:{VExpansionPanelHeader:r["a"]}}),c=s,d=(n("72e8"),n("2877")),u=n("6544"),m=n.n(u),f=n("132d"),p=Object(d["a"])(c,i,a,!1,null,null,null);t["a"]=p.exports;m()(p,{VExpansionPanelHeader:r["a"],VIcon:f["a"]})},e4f2:function(e,t,n){},e6fe:function(e,t,n){"use strict";n("222f")},e78c:function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"CurrentUser"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentUser"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"role"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"client"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"permissions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"group"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:168}};n.loc.source={body:"query CurrentUser {\n currentUser {\n username\n role {\n name\n }\n client {\n id\n name\n }\n permissions {\n group\n key\n }\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,t)})),e.definitions&&e.definitions.forEach((function(e){i(e,t)}))}var a={};function o(e,t){for(var n=0;n0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var t=a[e]||new Set;t.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(function(){n.definitions.forEach((function(e){if(e.name){var t=new Set;i(e,t),a[e.name.value]=t}}))})(),e.exports=n,e.exports["CurrentUser"]=r(n,"CurrentUser")},e845:function(e,t,n){},ea34:function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-tooltip",{attrs:{"max-width":"300",top:"","nudge-top":"-10",disabled:!e.truncated,"open-delay":"600"},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on,a=t.attrs;return[n("p",e._g(e._b({ref:"text",staticClass:"truncated-text"},"p",a,!1),i),[n("span",[e._v(e._s(e.text))])])]}}])},[e._v(" "+e._s(e.text)+" ")])},a=[],o=n("3835"),r=n("96f1"),l={name:"TruncatedText",components:{Btn:r["a"]},props:{text:{type:String}},mounted:function(){this.initObserver()},beforeDestroy:function(){this.observer&&this.observer.disconnect()},data:function(){return{truncated:!1,observer:null}},methods:{initObserver:function(){var e=this;if(this.$refs.text){var t=this.$refs.text.querySelector("span"),n=new IntersectionObserver((function(t){var n=Object(o["a"])(t,1),i=n[0];e.truncated=i.intersectionRatio<1}),{threshold:[1],root:this.$refs.text});n.observe(t),this.observer=n}}}},s=l,c=(n("d995"),n("2877")),d=n("6544"),u=n.n(d),m=n("3a2f"),f=Object(c["a"])(s,i,a,!1,null,null,null);t["a"]=f.exports;u()(f,{VTooltip:m["a"]})},ec0b:function(e,t,n){"use strict";n("0e21")},ec2a:function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"PhoneTypes"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"phoneTypes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:56}};n.loc.source={body:"query PhoneTypes {\n phoneTypes {\n id\n name\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,t)})),e.definitions&&e.definitions.forEach((function(e){i(e,t)}))}var a={};function o(e,t){for(var n=0;n0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var t=a[e]||new Set;t.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(function(){n.definitions.forEach((function(e){if(e.name){var t=new Set;i(e,t),a[e.name.value]=t}}))})(),e.exports=n,e.exports["PhoneTypes"]=r(n,"PhoneTypes")},ef63:function(e,t,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateClient"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NamedType",name:{kind:"Name",value:"ClientUpdateInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateClient"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"district"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"address"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"city"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"zip"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"county"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logoUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"creator"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"icsOffice"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"clientType"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"contacts"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"jobTitle"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"phones"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"phone"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"location"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"countYearsTogether"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"clientId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"facilities"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Facility"},directives:[]}]}}]}}]}}],loc:{start:0,end:649}};i.loc.source={body:'#import "../fragments/facility.gql"\nmutation UpdateClient($input: ClientUpdateInput) {\n updateClient(input: $input) {\n id\n name\n district\n address\n city\n state\n zip\n county\n description\n logoUrl\n creator {\n username\n }\n icsOffice {\n id\n name\n }\n clientType {\n id\n name\n }\n contacts {\n id\n name\n jobTitle\n phones {\n id\n type {\n id\n name\n }\n phone\n }\n email\n location\n countYearsTogether\n clientId\n createdAt\n updatedAt\n }\n facilities {\n ...Facility\n }\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function o(e){return e.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!a[t]&&(a[t]=!0,!0)}))}function r(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,t)})),e.definitions&&e.definitions.forEach((function(e){r(e,t)}))}i.definitions=i.definitions.concat(o(n("c982").definitions));var l={};function s(e,t){for(var n=0;n0){var r=o;o=new Set,r.forEach((function(e){if(!a.has(e)){a.add(e);var t=l[e]||new Set;t.forEach((function(e){o.add(e)}))}}))}return a.forEach((function(t){var i=s(e,t);i&&n.definitions.push(i)})),n}(function(){i.definitions.forEach((function(e){if(e.name){var t=new Set;r(e,t),l[e.name.value]=t}}))})(),e.exports=i,e.exports["UpdateClient"]=c(i,"UpdateClient")},f2c1:function(e,t,n){"use strict";n("f552")},f552:function(e,t,n){},f5e0:function(e,t,n){"use strict";n("4ced")},f737:function(e,t,n){},f7e4:function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteContact"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteContact"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[]}]}}],loc:{start:0,end:62}};n.loc.source={body:"mutation DeleteContact($id: ID!) {\n deleteContact(id: $id)\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,t)})),e.definitions&&e.definitions.forEach((function(e){i(e,t)}))}var a={};function o(e,t){for(var n=0;n0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var t=a[e]||new Set;t.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(function(){n.definitions.forEach((function(e){if(e.name){var t=new Set;i(e,t),a[e.name.value]=t}}))})(),e.exports=n,e.exports["DeleteContact"]=r(n,"DeleteContact")},f85a:function(e,t,n){"use strict";n("e4f2")},f870:function(e,t,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AddFinancialInfo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NamedType",name:{kind:"Name",value:"FinancialInfoAddInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"addFinancialInfo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"FinancialInfo"},directives:[]}]}}]}}],loc:{start:0,end:163}};i.loc.source={body:'#import "../fragments/financialInfo.gql"\nmutation AddFinancialInfo($input: FinancialInfoAddInput) {\n addFinancialInfo(input: $input) {\n ...FinancialInfo\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function o(e){return e.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!a[t]&&(a[t]=!0,!0)}))}function r(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,t)})),e.definitions&&e.definitions.forEach((function(e){r(e,t)}))}i.definitions=i.definitions.concat(o(n("7672").definitions));var l={};function s(e,t){for(var n=0;n0){var r=o;o=new Set,r.forEach((function(e){if(!a.has(e)){a.add(e);var t=l[e]||new Set;t.forEach((function(e){o.add(e)}))}}))}return a.forEach((function(t){var i=s(e,t);i&&n.definitions.push(i)})),n}(function(){i.definitions.forEach((function(e){if(e.name){var t=new Set;r(e,t),l[e.name.value]=t}}))})(),e.exports=i,e.exports["AddFinancialInfo"]=c(i,"AddFinancialInfo")},f8fb:function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteComponentOfNeed"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteComponentOfNeed"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[]}]}}],loc:{start:0,end:78}};n.loc.source={body:"mutation DeleteComponentOfNeed($id: ID!) {\n deleteComponentOfNeed(id: $id)\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,t)})),e.definitions&&e.definitions.forEach((function(e){i(e,t)}))}var a={};function o(e,t){for(var n=0;n0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var t=a[e]||new Set;t.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(t){var i=o(e,t);i&&n.definitions.push(i)})),n}(function(){n.definitions.forEach((function(e){if(e.name){var t=new Set;i(e,t),a[e.name.value]=t}}))})(),e.exports=n,e.exports["DeleteComponentOfNeed"]=r(n,"DeleteComponentOfNeed")},fc4b:function(e,t,n){"use strict";n("79ea")},fdca:function(e,t,n){}}); //# sourceMappingURL=app.3d48c180.js.map