(function(e){function n(n){for(var i,a,l=n[0],s=n[1],c=n[2],d=0,u=[];d0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["DeleteFacility"]=r(t,"DeleteFacility")},"082b":function(e,n,t){"use strict";t("3d49")},"0932":function(e,n){var t={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}};t.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,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function o(e,n){for(var t=0;t0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["SignIn"]=r(t,"SignIn")},"0af4":function(e,n){var t={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}};t.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,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function o(e,n){for(var t=0;t0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["AddDocument"]=r(t,"AddDocument")},"0c10":function(e,n){var t={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}};t.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,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function o(e,n){for(var t=0;t0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["IcsOffices"]=r(t,"IcsOffices")},"0c31":function(e,n,t){"use strict";t("9ad2")},"0e21":function(e,n,t){},"0fbf":function(e,n,t){},"10a5":function(e,n,t){},1182:function(e,n,t){"use strict";var i=t("2b0e"),a=new i["a"];n["a"]=a},"134d":function(e,n){var t={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}};t.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,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function o(e,n){for(var t=0;t0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["PlanTypes"]=r(t,"PlanTypes")},"15e1":function(e,n,t){"use strict";t("a2f4")},"169a":function(e,n,t){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 n=e.name.value;return!a[n]&&(a[n]=!0,!0)}))}function r(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,n)})),e.definitions&&e.definitions.forEach((function(e){r(e,n)}))}i.definitions=i.definitions.concat(o(t("89a7").definitions));var l={};function s(e,n){for(var t=0;t0){var r=o;o=new Set,r.forEach((function(e){if(!a.has(e)){a.add(e);var n=l[e]||new Set;n.forEach((function(e){o.add(e)}))}}))}return a.forEach((function(n){var i=s(e,n);i&&t.definitions.push(i)})),t}(function(){i.definitions.forEach((function(e){if(e.name){var n=new Set;r(e,n),l[e.name.value]=n}}))})(),e.exports=i,e.exports["UpdatePlan"]=c(i,"UpdatePlan")},1797:function(e,n,t){},"17a3":function(e,n){var t={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}};t.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,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function o(e,n){for(var t=0;t0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["AddContact"]=r(t,"AddContact")},1863:function(e,n,t){"use strict";t("2f70")},1921:function(e,n,t){},"1a80":function(e,n,t){"use strict";t("7db0");var i=function(e,n){return!(!n||!n.permissions.find((function(n){return e===n.key})))};n["a"]=i},"1c07":function(e,n,t){},"1e67":function(e,n,t){},"1ea3":function(e,n,t){"use strict";t("715c")},"1fe6":function(e,n,t){},"20fc":function(e,n,t){"use strict";t("a8da")},"222f":function(e,n,t){},2310:function(e,n,t){"use strict";t("adf9")},"24b2":function(e,n,t){"use strict";t.d(n,"b",(function(){return r})),t.d(n,"a",(function(){return l}));var i,a=t("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"};n["c"]=o},"28e7":function(e,n){var t={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}};t.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,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function o(e,n){for(var t=0;t0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["Clients"]=r(t,"Clients")},"2a98":function(e,n,t){"use strict";t("866b")},"2bd3":function(e,n,t){"use strict";t("cd26")},"2d6a":function(e,n,t){"use strict";t("544f")},"2f26":function(e,n,t){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:"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:934}};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 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 n=e.name.value;return!a[n]&&(a[n]=!0,!0)}))}function r(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,n)})),e.definitions&&e.definitions.forEach((function(e){r(e,n)}))}i.definitions=i.definitions.concat(o(t("c982").definitions));var l={};function s(e,n){for(var t=0;t0){var r=o;o=new Set,r.forEach((function(e){if(!a.has(e)){a.add(e);var n=l[e]||new Set;n.forEach((function(e){o.add(e)}))}}))}return a.forEach((function(n){var i=s(e,n);i&&t.definitions.push(i)})),t}(function(){i.definitions.forEach((function(e){if(e.name){var n=new Set;r(e,n),l[e.name.value]=n}}))})(),e.exports=i,e.exports["Client"]=c(i,"Client")},"2f70":function(e,n,t){},3010:function(e,n){var t={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}};t.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,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function o(e,n){for(var t=0;t0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["UpdateDocument"]=r(t,"UpdateDocument")},"30f0":function(e,n){var t={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}};t.loc.source={body:"mutation DeletePlan($id: ID!) {\n deletePlan(id: $id)\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function o(e,n){for(var t=0;t0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["DeletePlan"]=r(t,"DeletePlan")},3552:function(e,n,t){"use strict";t.d(n,"d",(function(){return o})),t.d(n,"b",(function(){return r})),t.d(n,"c",(function(){return l})),t.d(n,"a",(function(){return s}));var i="headers",a="filters",o=function(e,n){c(e,n,i)},r=function(e){return d(e,i)},l=function(e,n){c(e,n,a,sessionStorage)},s=function(e){return d(e,a,sessionStorage)},c=function(e,n,t){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:localStorage;try{var a=i.getItem(t);a=a?JSON.parse(a):{},a[e]=n,i.setItem(t,JSON.stringify(a))}catch(o){console.warn("set ".concat(t," to Storage error"),o)}},d=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:localStorage,i={};try{i=JSON.parse(t.getItem(n))}catch(a){console.warn("get ".concat(n," from Storage error"),a)}return i&&i[e]}},"358f":function(e,n,t){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 n=e.name.value;return!a[n]&&(a[n]=!0,!0)}))}function r(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,n)})),e.definitions&&e.definitions.forEach((function(e){r(e,n)}))}i.definitions=i.definitions.concat(o(t("89a7").definitions));var l={};function s(e,n){for(var t=0;t0){var r=o;o=new Set,r.forEach((function(e){if(!a.has(e)){a.add(e);var n=l[e]||new Set;n.forEach((function(e){o.add(e)}))}}))}return a.forEach((function(n){var i=s(e,n);i&&t.definitions.push(i)})),t}(function(){i.definitions.forEach((function(e){if(e.name){var n=new Set;r(e,n),l[e.name.value]=n}}))})(),e.exports=i,e.exports["CreatePlan"]=c(i,"CreatePlan")},"36f4":function(e,n,t){"use strict";t("bf8d")},"3d11":function(e,n,t){"use strict";t("7a10")},"3d49":function(e,n,t){},"3e74":function(e,n,t){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 n=e.name.value;return!a[n]&&(a[n]=!0,!0)}))}function r(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,n)})),e.definitions&&e.definitions.forEach((function(e){r(e,n)}))}i.definitions=i.definitions.concat(o(t("7672").definitions));var l={};function s(e,n){for(var t=0;t0){var r=o;o=new Set,r.forEach((function(e){if(!a.has(e)){a.add(e);var n=l[e]||new Set;n.forEach((function(e){o.add(e)}))}}))}return a.forEach((function(n){var i=s(e,n);i&&t.definitions.push(i)})),t}(function(){i.definitions.forEach((function(e){if(e.name){var n=new Set;r(e,n),l[e.name.value]=n}}))})(),e.exports=i,e.exports["UpdateFinancialInfo"]=c(i,"UpdateFinancialInfo")},"3e9c":function(e,n,t){},"40a5":function(e,n,t){"use strict";var i=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-menu",{ref:"menu",attrs:{transition:"scale-transition","nudge-bottom":e.nudgeBottom,"min-width":e.minWidth},scopedSlots:e._u([{key:"activator",fn:function(n){var i=n.on,a=n.attrs;return[t("div",e._g(e._b({staticClass:"picker-text-field"},"div",a,!1),i),[t("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(n){e.formattedDate=n},expression:"formattedDate"}})],1)]}}]),model:{value:e.menu,callback:function(n){e.menu=n},expression:"menu"}},[t("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=t("2b0e"),r=t("2e4b"),l=t("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=(t("e36a"),t("2877")),m=t("6544"),f=t.n(m),p=t("e449"),v=t("8654"),h=Object(u["a"])(d,i,a,!1,null,null,null);n["a"]=h.exports;f()(h,{VDatePicker:r["a"],VMenu:p["a"],VTextField:v["a"]})},"40be":function(e,n,t){"use strict";t("aefe")},4169:function(e,n,t){"use strict";var i=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-dialog",e._b({attrs:{scrollable:""},scopedSlots:e._u([e._l(e.$scopedSlots,(function(n,i){return{key:i,fn:function(n){return["default"===i?[t("v-card",{key:i},[t("v-card-actions",{staticClass:"modal-header"},[e.modalOpen?e._t("modal-header",null,{close:e.close}):e._e(),e.noClose?e._e():t("btn",{staticClass:"modal-close-btn",attrs:{"color-type":"secondary",icon:""},on:{click:function(n){return e.close(n)}}},[t("v-icon",{attrs:{small:""}},[e._v("fa-times")])],1)],2),t("v-card-text",{staticClass:"modal-content"},[e.title?t("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,n)]}}}))],null,!0),model:{value:e.modalOpen,callback:function(n){e.modalOpen=n},expression:"modalOpen"}},"v-dialog",Object.assign({},e.$props,e.$attrs),!1))},a=[],o=t("2b0e"),r=t("169a9"),l=t("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){e||this.$emit("close")}},methods:{close:function(e){"function"===typeof this.closeFunction?this.closeFunction(e):this.modalOpen=!1}}}),d=c,u=(t("20fc"),t("2877")),m=t("6544"),f=t.n(m),p=t("b0af"),v=t("99d9"),h=t("132d"),k=Object(u["a"])(d,i,a,!1,null,null,null);n["a"]=k.exports;f()(k,{VCard:p["a"],VCardActions:v["a"],VCardText:v["b"],VDialog:r["a"],VIcon:h["a"]})},4230:function(e,n,t){"use strict";t("1e67")},"43e2":function(e,n,t){},4447:function(e,n,t){"use strict";t("fdca")},"45ae":function(e,n,t){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 n=e.name.value;return!a[n]&&(a[n]=!0,!0)}))}function r(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,n)})),e.definitions&&e.definitions.forEach((function(e){r(e,n)}))}i.definitions=i.definitions.concat(o(t("77e6").definitions));var l={};function s(e,n){for(var t=0;t0){var r=o;o=new Set,r.forEach((function(e){if(!a.has(e)){a.add(e);var n=l[e]||new Set;n.forEach((function(e){o.add(e)}))}}))}return a.forEach((function(n){var i=s(e,n);i&&t.definitions.push(i)})),t}(function(){i.definitions.forEach((function(e){if(e.name){var n=new Set;r(e,n),l[e.name.value]=n}}))})(),e.exports=i,e.exports["CompletedComponentOfNeed"]=c(i,"CompletedComponentOfNeed")},4910:function(e,n){var t={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}};t.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,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function o(e,n){for(var t=0;t0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["AddFundingSource"]=r(t,"AddFundingSource")},"4c95":function(e,n,t){"use strict";t("e845")},"4ced":function(e,n,t){},"4eed":function(e,n,t){},"502f":function(e,n,t){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 n=e.name.value;return!a[n]&&(a[n]=!0,!0)}))}function r(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,n)})),e.definitions&&e.definitions.forEach((function(e){r(e,n)}))}i.definitions=i.definitions.concat(o(t("c982").definitions));var l={};function s(e,n){for(var t=0;t0){var r=o;o=new Set,r.forEach((function(e){if(!a.has(e)){a.add(e);var n=l[e]||new Set;n.forEach((function(e){o.add(e)}))}}))}return a.forEach((function(n){var i=s(e,n);i&&t.definitions.push(i)})),t}(function(){i.definitions.forEach((function(e){if(e.name){var n=new Set;r(e,n),l[e.name.value]=n}}))})(),e.exports=i,e.exports["UpdateFacility"]=c(i,"UpdateFacility")},"510e":function(e,n,t){"use strict";t("4eed")},"51e6":function(e,n){var t={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:"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:"urlPhotos"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"summary"},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:"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:883}};t.loc.source={body:"mutation 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 id\n name\n squareFootage\n age\n occupancy\n capacity\n use\n siteSize\n replacementCost\n urlPhotos\n summary\n clientId\n createdAt\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}};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function o(e,n){for(var t=0;t0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["AddClient"]=r(t,"AddClient")},"544f":function(e,n,t){},"54fc":function(e,n,t){"use strict";t.d(n,"a",(function(){return i})),t.d(n,"c",(function(){return a})),t.d(n,"b",(function(){return o}));var i=function(e){var n=e&&new Date(e);return n?n.toLocaleDateString("en-US"):""},a=function(e){var n=e&&new Date(e),t={timeZone:"UTC"},i=new Intl.DateTimeFormat("en-US",t);return n?i.format(n):""},o=function(e){var n=e&&new Date(e);return n?n.toISOString():""}},"56d7":function(e,n,t){"use strict";t.r(n);t("e260"),t("e6cf"),t("cca6"),t("a79d");var i=t("2b0e"),a=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-app",[t("app-layout",[t("app-notification"),t("router-view")],1)],1)},o=[],r=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",[e.$route.meta&&(void 0===e.$route.meta.requiresAuth||e.$route.meta.requiresAuth)?[t("v-app-bar",{staticClass:"app-bar",attrs:{app:"",flat:""}},[t("app-header")],1),t("app-navigation-drawer"),t("v-main",[t("section",{staticClass:"main-content"},[e._t("default")],2)])]:[e._t("default")]],2)},l=[],s=function(){var e=this,n=e.$createElement,i=e._self._c||n;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(n){e.drawer=n},expression:"drawer"}},[i("div",{staticClass:"d-flex logo"},[i("v-btn",{attrs:{to:"/",icon:"",width:e.mini?60:100,height:e.mini?60:100}},[i("v-img",{staticClass:"shrink",attrs:{alt:"ICS logo",contain:"",src:t("9b19"),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(n){n.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,n=e.$createElement,t=e._self._c||n;return t("v-list",{staticClass:"primary-nav"},e._l(e.displayedItems,(function(n){return t("v-list-item",{key:n.title,attrs:{link:"",to:n.to}},[t("v-list-item-icon",[t("v-icon",[e._v(e._s(n.icon))])],1),t("v-list-item-content",[t("v-list-item-title",[e._v(e._s(n.title))])],1)],1)})),1)},u=[],m=t("5530"),f=(t("4de4"),t("7db0"),t("b0c0"),t("13d5"),t("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=t("e78c"),k=t.n(h),y=t("1a80"),b={name:"PrimaryNav",apollo:{currentUser:{query:k.a,fetchPolicy:"cache-first"}},data:function(){return{items:v,displayedItems:[],currentUser:null}},watch:{currentUser:function(e){e&&(this.displayedItems=this.items.filter((function(n){var t=!n.permission||Object(y["a"])(n.permission,e),i=!n.roles||n.roles.find((function(n){return e.role.name===n}));if(n.params){var a=n.params.reduce((function(n,t){var i=e[t];return"clientId"===t&&(i=e.client?e.client.id:""),n[t]=i,n}),{});n.to=Object(m["a"])(Object(m["a"])({},n.to),{},{params:a})}return t&&i})))}}},g=b,S=(t("8ab8"),t("2877")),C=t("6544"),N=t.n(C),_=t("132d"),w=t("8860"),E=t("da13"),O=t("5d23"),F=t("34c3"),x=Object(S["a"])(g,d,u,!1,null,null,null),I=x.exports;N()(x,{VIcon:_["a"],VList:w["a"],VListItem:E["a"],VListItemContent:O["a"],VListItemIcon:F["a"],VListItemTitle:O["b"]});var T={name:"AppNavigationDrawer",components:{PrimaryNav:I},data:function(){return{drawer:!0,mini:!0}}},D=T,A=(t("510e"),t("8336")),P=t("adda"),$=t("f774"),j=Object(S["a"])(D,s,c,!1,null,null,null),L=j.exports;N()(j,{VBtn:A["a"],VIcon:_["a"],VImg:P["a"],VNavigationDrawer:$["a"]});var V=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-toolbar-items",{staticClass:"app-bar-items"},[t("ApolloQuery",{staticClass:"profile",attrs:{query:e.CURRENT_USER_QUERY,"fetch-policy":"cache-only"},scopedSlots:e._u([{key:"default",fn:function(n){var i=n.result,a=i.loading,o=(i.error,i.data);return[t("div",{staticClass:"d-flex align-center mr-1"},[t("v-switch",{attrs:{label:"Dark Mode","hide-details":""},on:{change:e.setToStorage},model:{value:e.$vuetify.theme.dark,callback:function(n){e.$set(e.$vuetify.theme,"dark",n)},expression:"$vuetify.theme.dark"}})],1),t("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,n=e.$createElement,t=e._self._c||n;return t("v-menu",{attrs:{bottom:"","min-width":"150px",rounded:"","offset-y":""},scopedSlots:e._u([{key:"activator",fn:function(n){var i=n.on;return[t("v-btn",e._g({staticClass:"profile-btn",attrs:{text:""}},i),[t("v-avatar",{attrs:{size:"44",color:"primary"}},[t("span",{staticClass:"white--text headline"},[e._v(e._s(e.userInitials))])]),t("v-icon",{staticClass:"ml-2"},[e._v("fa-sort-down")])],1)]}}])},[t("v-card",{staticClass:"user-actions-container"},[t("v-list",{staticClass:"user-actions",attrs:{dense:"",nav:""}},[t("v-subheader",{staticClass:"username"},[e._v(e._s(e.username))]),t("v-divider",{staticClass:"divider"}),t("v-list-item",{staticClass:"user-action",on:{click:e.logout}},[t("v-list-item-content",[t("v-list-item-title",[e._v(" Logout ")])],1)],1)],1)],1)],1)},q=[],B=(t("a15b"),t("d81d"),t("1276"),t("ac1f"),t("53ca")),M=t("1da1"),Y=t("b85c"),G=(t("96cf"),t("522d")),z=t("1ee4"),Q=t("0225"),H=t("efe7"),W=t("b805"),J=t.n(W),X=t("8c4f"),Z=(t("d3b7"),t("3ca3"),t("ddb0"),function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("unauth-app-layout",[t("h1",[e._v("Login")]),t("login")],1)}),K=[],ee=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("ApolloMutation",{attrs:{mutation:e.SIGNIN_MUTATION,variables:{email:e.email,password:e.password}},on:{done:e.onDone},scopedSlots:e._u([{key:"default",fn:function(n){var i=n.mutate,a=n.loading,o=n.error;return[a?e._e():t("alert",{attrs:{align:"center",error:o}}),t("v-form",{ref:"form",attrs:{"lazy-validation":"",autocomplete:"off","aria-busy":a,disabled:a},on:{submit:function(n){n.preventDefault(),e.validate()&&i()}}},[t("v-text-field",{attrs:{rules:e.emailRules,label:"Email",required:"",name:"username",autocomplete:"username","validate-on-blur":""},model:{value:e.email,callback:function(n){e.email=n},expression:"email"}}),t("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(n){e.password=n},expression:"password"}}),t("v-row",{attrs:{"no-gutters":"",justify:"end"}},[t("router-link",{attrs:{to:{name:"forgot-password"}}},[e._v("Forgot password")])],1),t("div",{staticClass:"mt-16"},[t("btn",{staticClass:"login-btn",attrs:{type:"submit","color-type":"primary","full-width":"",disabled:a}},[e._v("Login")])],1)],1)]}}])})},ne=[],te=(t("159b"),t("96f1")),ie=t("0932"),ae=t.n(ie),oe=t("a483"),re={name:"Login",components:{Btn:te["a"]},data:function(){return{SIGNIN_MUTATION:ae.a,password:"",passwordRules:[function(e){return!!e||"Password is Required"}],email:null,emailRules:[function(e){return!!e||"Email is Required"},oe["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)},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(n){var t,i,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.data.signIn,i=t.accessToken,a=t.refreshToken,e.next=3,au(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 n(n){return e.apply(this,arguments)}return n}()}},le=re,se=t("4bd4"),ce=t("0fd9"),de=t("8654"),ue=Object(S["a"])(le,ee,ne,!1,null,null,null),me=ue.exports;N()(ue,{VForm:se["a"],VRow:ce["a"],VTextField:de["a"]});var fe=function(){var e=this,n=e.$createElement,i=e._self._c||n;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:"login-logo"},[i("v-img",{staticClass:"shrink logo",attrs:{alt:"ICS logo",contain:"",src:t("9b19"),transition:"scale-transition"}})],1),i("h2",[e._v("Welcome to CIP-360")]),i("p",[e._v("To keep connected with us please enter your email and password")])])],1),i("v-main",{staticClass:"page-layout"},[i("v-container",[i("v-card",{staticClass:"page-content-container",attrs:{flat:""}},[e._t("default")],2)],1)],1)],1)},pe=[],ve={name:"UnAuthAppLayout",components:{Login:me},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}}}},he=ve,ke=(t("7d3b"),t("b0af")),ye=t("a523"),be=t("f6c4"),ge=Object(S["a"])(he,fe,pe,!1,null,"48f306df",null),Se=ge.exports;N()(ge,{VCard:ke["a"],VContainer:ye["a"],VImg:P["a"],VMain:be["a"],VNavigationDrawer:$["a"]});var Ce={components:{Login:me,UnauthAppLayout:Se}},Ne=Ce,_e=Object(S["a"])(Ne,Z,K,!1,null,null,null),we=_e.exports,Ee=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{staticClass:"plan-list"},[t("v-row",{staticClass:"mb-6"},[t("v-col",[t("h1",[e._v("Plans")])])],1),t("v-row",[t("plans")],1)],1)},Oe=[],Fe=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("ApolloQuery",{staticClass:"plans-container",attrs:{query:e.PLANS_QUERY},scopedSlots:e._u([{key:"default",fn:function(n){var i=n.result,a=i.loading,o=i.error,r=i.data;return[t("alert",{attrs:{error:o}}),t("plan-list",{attrs:{plans:r&&r.plans||[],loading:a,selected:e.selected,"show-select":e.showGenerateReportBtn},on:{select:e.onSelect}}),t("v-row",{staticClass:"mt-6",attrs:{"no-gutters":"",justify:"end"}},[t("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?t("modal",{attrs:{title:"Generate Report",width:"440px"},scopedSlots:e._u([{key:"activator",fn:function(n){var i=n.on,o=n.attrs;return[t("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(n){var i=n.close;return[t("plans-report",{attrs:{plans:e.selected},on:{done:i}})]}}],null,!0)}):e._e()],1)]}}])})},xe=[],Ie=t("4169"),Te=t("8a75"),De=t.n(Te),Ae=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",[t("alert",{attrs:{error:e.error}}),t("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(n){var i=n.item;return[i.canViewDetails?t("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(n){var i=n.item;return[t("span",{staticClass:"date-cell"},[t("span",{staticClass:"date"},[e._v(e._s(e._f("utcDate")(i.dateOfCreation)))])])]}},{key:"item.updatedAt",fn:function(n){var i=n.item;return[t("span",{staticClass:"date-cell"},[t("span",{staticClass:"date"},[e._v(e._s(e._f("date")(i.updatedAt)))]),e._v(" "),t("span",{staticClass:"time"},[e._v(e._s(e._f("time")(i.updatedAt)))])])]}},{key:"item.actions",fn:function(e){var n=e.item;return[t("actions-menu",{attrs:{actions:n.actions}})]}}]),model:{value:e.selectedState,callback:function(n){e.selectedState=n},expression:"selectedState"}})],1)},Pe=[],$e=t("a9b0"),je=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-menu",{attrs:{bottom:"","min-width":"150px",rounded:"","offset-y":""},scopedSlots:e._u([{key:"activator",fn:function(n){var i=n.on;return[t("v-btn",e._g({attrs:{icon:"",text:""}},i),[t("v-icon",[e._v("fa-ellipsis-v")])],1)]}}]),model:{value:e.menuOpen,callback:function(n){e.menuOpen=n},expression:"menuOpen"}},[t("v-card",{staticClass:"actions-container"},[t("v-list",{staticClass:"actions",attrs:{dense:"",nav:""}},[e._l(e.actions,(function(n,i){return[n.modal?"common"===n.modal.type?t("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[t("v-list-item",e._g(e._b({staticClass:"action",attrs:{"active-class":"action-active"}},"v-list-item",o,!1),a),[t("v-list-item-content",[t("v-list-item-title",[e._v(e._s(n.name))])],1)],1)]}},{key:"default",fn:function(i){var a=i.close;return[t(n.modal.content.componentName,e._b({tag:"component",on:{done:a}},"component",Object.assign({},n.modal.content.props),!1))]}}],null,!0)},"modal",Object.assign({},n.modal.props),!1)):t("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[t("v-list-item",e._g(e._b({staticClass:"action",attrs:{"active-class":"action-active"}},"v-list-item",o,!1),a),[t("v-list-item-content",[t("v-list-item-title",[e._v(e._s(n.name))])],1)],1)]}}],null,!0)},"confirmation-modal",Object.assign({},n.modal.props),!1)):t("v-list-item",{key:i,staticClass:"action",attrs:{link:!!n.to,to:n.to,"active-class":"action-active"},on:{click:function(t){return e.onItemClick(n)}}},[t("v-list-item-content",[t("v-list-item-title",[e._v(" "+e._s(n.name)+" ")])],1)],1)]}))],2)],1)],1)},Le=[],Ve=t("d739"),Re={name:"ActionsMenu",components:{ConfirmationModal:Ve["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=(t("ce1e"),t("e449")),Be=Object(S["a"])(Ue,je,Le,!1,null,null,null),Me=Be.exports;N()(Be,{VBtn:A["a"],VCard:ke["a"],VIcon:_["a"],VList:w["a"],VListItem:E["a"],VListItemContent:O["a"],VListItemTitle:O["b"],VMenu:qe["a"]});var Ye,Ge=t("30f0"),ze=t.n(Ge),Qe=t("1182"),He=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("ApolloMutation",e._g({staticClass:"components-report",attrs:{mutation:e.GENERATE_REPORTS,variables:{input:{planId:e.plan?e.plan.id:null,name:e.reportInfo.name,reports:e.reportInfo.reports&&e.reportInfo.reports.reduce((function(e,n){return e[n]=!0,e}),{}),data:e.inputComponents}},update:e.downloadFile},scopedSlots:e._u([{key:"default",fn:function(n){var i=n.mutate,a=n.loading,o=n.error;return[a?e._e():t("alert",{attrs:{align:"center",error:o}}),t("v-overlay",{attrs:{"z-index":1e4,value:a}},[t("v-row",{attrs:{align:"center",justify:"center"}},[t("p",[e._v("Generating report... Please do not refresh or close the tab.")])]),t("v-row",{attrs:{align:"center",justify:"center"}},[t("v-progress-circular",{attrs:{indeterminate:"",size:"50"}})],1)],1),t("components-report-form",e._b({on:{submit:function(e){return i()}}},"components-report-form",{loading:a,reportInfo:e.reportInfo},!1))]}}])},e.$listeners))},We=[],Je=(t("a4d3"),t("e01a"),t("a20f")),Xe=t.n(Je),Ze=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-form",{ref:"form",staticClass:"components-report-form",attrs:{"lazy-validation":"","aria-busy":e.loading,disabled:e.loading,autocomplete:"off"},on:{submit:function(n){return n.preventDefault(),e.onSubmit(n)}}},[t("v-row",{attrs:{"no-gutters":"",justify:"center"}},[t("v-col",[t("v-text-field",{attrs:{rules:e.nameRules,label:"Report Name",autocomplete:"off",required:"","validate-on-blur":""},model:{value:e.reportInfo.name,callback:function(n){e.$set(e.reportInfo,"name",n)},expression:"reportInfo.name"}}),t("v-list",[t("v-list-item-group",{attrs:{multiple:""},model:{value:e.reportInfo.reports,callback:function(n){e.$set(e.reportInfo,"reports",n)},expression:"reportInfo.reports"}},[e._l(e.reportTypes,(function(n){return[t("v-list-item",{key:n.value,attrs:{value:n.value},scopedSlots:e._u([{key:"default",fn:function(i){var a=i.active;return[t("v-list-item-action",[t("v-checkbox",{attrs:{"input-value":a}})],1),t("v-list-item-content",[t("v-list-item-title",{domProps:{textContent:e._s(n.name)}})],1)]}}],null,!0)})]}))],2)],1)],1)],1),t("div",{staticClass:"mt-8 btns-bar"},[t("btn",{attrs:{type:"submit",width:"300",disabled:e.loading}},[e._v("Generate")])],1)],1)},Ke=[],en=t("ade3"),nn={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"},tn=(Ye={},Object(en["a"])(Ye,nn.ITEMIZED_LIST_OF_FACILITY_COSTS,"Itemized List of Facility Costs"),Object(en["a"])(Ye,nn.SUMMARY_BY_FISCAL_YEAR,"Summary by Fiscal Year"),Object(en["a"])(Ye,nn.DETAILED_SUMMARY_OF_FACILITY_COSTS,"Detailed Summary of Facility Costs"),Object(en["a"])(Ye,nn.SUMMARY_BY_FACILITY,"Summary by Facility"),Object(en["a"])(Ye,nn.EXPENDITURE_SPREADSHEET,"Expenditure Spreadsheet"),Object(en["a"])(Ye,nn.GAPS_ANALYSIS,"Graphs - Gaps Analysis (Funding vs. needs)"),Object(en["a"])(Ye,nn.SUMMARY_BY_FUNDING_SOURCE,"Summary by Funding source"),Ye),an=t("d907"),on={name:"ComponentsReportForm",components:{Btn:te["a"]},props:{loading:{type:Boolean,default:!1},reportInfo:{type:Object,default:{name:null,reports:null}}},data:function(){return{reportTypes:[{name:tn[nn.EXPENDITURE_SPREADSHEET],value:nn.EXPENDITURE_SPREADSHEET},{name:tn[nn.SUMMARY_BY_FACILITY],value:nn.SUMMARY_BY_FACILITY},{name:tn[nn.SUMMARY_BY_FISCAL_YEAR],value:nn.SUMMARY_BY_FISCAL_YEAR},{name:tn[nn.DETAILED_SUMMARY_OF_FACILITY_COSTS],value:nn.DETAILED_SUMMARY_OF_FACILITY_COSTS},{name:tn[nn.ITEMIZED_LIST_OF_FACILITY_COSTS],value:nn.ITEMIZED_LIST_OF_FACILITY_COSTS},{name:tn[nn.GAPS_ANALYSIS],value:nn.GAPS_ANALYSIS},{name:tn[nn.SUMMARY_BY_FUNDING_SOURCE],value:nn.SUMMARY_BY_FUNDING_SOURCE}].sort(an["a"]),nameRules:[function(e){return!!e||"Report Name is Required"}],reportsRules:[function(e){return!!e||"Report Type is Required"}]}},methods:{validate:function(){return this.$refs.form.validate()},onSubmit:function(){this.validate()&&this.$emit("submit")}}},rn=on,ln=(t("0730"),t("ac7c")),sn=t("62ad"),cn=t("1800"),dn=t("1baa"),un=Object(S["a"])(rn,Ze,Ke,!1,null,null,null),mn=un.exports;N()(un,{VCheckbox:ln["a"],VCol:sn["a"],VForm:se["a"],VList:w["a"],VListItem:E["a"],VListItemAction:cn["a"],VListItemContent:O["a"],VListItemGroup:dn["a"],VListItemTitle:O["b"],VRow:ce["a"],VTextField:de["a"]});var fn=function(e,n,t){return null!==e&&null!==n&&null!==t?Math.round(e*n*t/100):0},pn=function(e,n,t,i){if(null!==e&&null!==n&&null!==t&&null!==i){var a=Math.pow(1+i/100,parseInt(t)-parseInt(n));return Math.round(e*a)}return 0},vn=function(e,n,t){return null!==e&&null!==n?t?Math.round(e*(1+n/100)):e:0},hn=function(e,n,t,i){var a=Math.pow(1+n/100,parseInt(t)-parseInt(i));return Math.round(e*a)},kn=function(e,n){var t=e.quantityOfComponents,i=e.costPerUnit,a=e.yearForImprovement,o=e.softCost,r=n&&n.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=fn(t,i,s),h=pn(v,d,a,m),k=vn(h,p,o);return{baseAmount:v,componentSubtotal:h,budgetAmount:k}};function yn(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,t=document.createElement("a");t.href=e,t.setAttribute("download",n),t.click()}var bn={name:"ComponentsReport",components:{ComponentsReportForm:mn},props:{plan:{type:Object},components:{type:Array,default:null}},data:function(e){return{GENERATE_REPORTS:Xe.a,reportInfo:{name:null,reports:[]},inputComponents:e.getInputComponents(e.components)}},watch:{components:{immediate:!0,handler:function(e){null!==e&&(this.inputComponents=this.getInputComponents(e))},deep:!0}},methods:{downloadFile:function(e,n){var t=n.data.generateReports;t?(yn(t.url,this.name),Qe["a"].$emit("show-snackbar",{color:"success",text:"Reports were generated successfully!"}),this.$emit("done")):Qe["a"].$emit("show-snackbar",{color:"error",text:"Error! Something went wrong... Please try later!"})},getInputComponents:function(e){var n=this;return e?e.map((function(e){var t=kn(e,n.plan);return Object(m["a"])(Object(m["a"])({id:e.id,planId:n.plan&&n.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},t),{},{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}}},gn=bn,Sn=t("a797"),Cn=t("490a"),Nn=Object(S["a"])(gn,He,We,!1,null,null,null),_n=Nn.exports;N()(Nn,{VOverlay:Sn["a"],VProgressCircular:Cn["a"],VRow:ce["a"]});var wn=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("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(n){var i=n.mutate,a=n.loading,o=n.error;return[a?e._e():t("alert",{attrs:{align:"center",error:o}}),t("v-text-field",{attrs:{label:"Plan Name",rules:e.nameRules,autofocus:"",autocomplete:"off","validate-on-blur":"",required:""},model:{value:e.name,callback:function(n){e.name=n},expression:"name"}}),t("btn",{attrs:{width:"200",disabled:e.isNameValid},on:{click:function(e){return i()}}},[e._v("Clone")])]}}])},e.$listeners))},En=[],On=t("8810"),Fn=t.n(On),xn={name:"ClonePlanModal",components:{Btn:te["a"]},props:{plan:{type:Object}},data:function(){return{CLONE_PLAN_MUTATION:Fn.a,name:null,nameRules:[function(e){return!!e||"Name is Required"}]}},computed:{isNameValid:function(){return null===this.name||""===this.name}},methods:{onClonePlan:function(e,n){var t=n.data.clonePlan;if(t){var i=e.readQuery({query:De.a});i.plans.unshift(t),e.writeQuery({query:De.a,data:i}),Qe["a"].$emit("show-snackbar",{color:"success",text:"Plan was cloned successfully!"})}}}},In=xn,Tn=Object(S["a"])(In,wn,En,!1,null,null,null),Dn=Tn.exports;N()(Tn,{VTextField:de["a"]});var An={name:"PlanList",components:{Btn:te["a"],DataTable:$e["a"],ConfirmationModal:Ve["a"],ActionsMenu:Me},props:{plans:{type:Array,default:[]},loading:{type:Boolean},selected:{type:Array},showSelect:{type:Boolean,default:!1}},apollo:{currentUser:{query:k.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:"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(n){return Object(m["a"])(Object(m["a"])({},n),{},{clientName:n.client&&n.client.name||"",creatorName:n.createdBy&&n.createdBy.username||"",icsOfficeName:n.client&&n.client.icsOffice&&n.client.icsOffice.name||"",clientTypeName:n.client&&n.client.clientType&&n.client.clientType.name||"",planType:n.financialInfo&&n.financialInfo.typeOfPlan&&n.financialInfo.typeOfPlan.name||"",editorName:n.editedBy&&n.editedBy.username||"",canViewDetails:Object(y["a"])(f["c"].VIEW_PLAN,e.currentUser),actions:[Object(y["a"])(f["c"].GENERATE_REPORT,e.currentUser)&&{name:"Generate Report",modal:{type:"common",props:{title:"Generate Report",width:"380px"},content:{componentName:_n,props:{plan:n}}}},Object(y["a"])(f["c"].EDIT_PLAN,e.currentUser)&&{name:"Edit",to:{name:"plan",params:{planId:n.id}}},Object(y["a"])(f["c"].CLONE_PLAN,e.currentUser)&&{name:"Clone",modal:{type:"common",props:{title:"Clone Plan",width:"380px"},content:{componentName:Dn,props:{plan:n}}}},Object(y["a"])(f["c"].DELETE_PLAN,e.currentUser)&&{name:"Delete",modal:{props:{mutation:ze.a,variables:{id:n.id},title:"Delete Plan",message:"Are you sure you want to delete plan?",okBtn:{label:"Delete"},update:e.onDelete(n)}}}]})})):[]},displayedHeaders:function(){var e=this;return this.headers.filter((function(n){return!n.permissions||n.permissions.some((function(n){return Object(y["a"])(n,e.currentUser)}))}))},selectedState:{get:function(){return this.selected},set:function(e){this.$emit("select",e)}}},methods:{onDelete:function(e){return function(n,t){var i=t.data.deletePlan;if(i){var a=n.readQuery({query:De.a});a.plans=a.plans.filter((function(n){return n.id!==e.id})),n.writeQuery({query:De.a,data:a}),Qe["a"].$emit("show-snackbar",{color:"success",text:"Plan was deleted from the system successfully!"})}}}}},Pn=An,$n=Object(S["a"])(Pn,Ae,Pe,!1,null,null,null),jn=$n.exports,Ln=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("ApolloMutation",e._g({staticClass:"components-report",attrs:{mutation:e.GENERATE_REPORT,variables:{input:{name:e.reportInfo.name,planIds:e.inputPlans}},update:e.downloadFile},scopedSlots:e._u([{key:"default",fn:function(n){var i=n.mutate,a=n.loading,o=n.error;return[a?e._e():t("alert",{attrs:{align:"center",error:o}}),t("v-overlay",{attrs:{"z-index":1e4,value:a}},[t("v-row",{attrs:{align:"center",justify:"center"}},[t("p",[e._v("Generating report... Please do not refresh or close the tab.")])]),t("v-row",{attrs:{align:"center",justify:"center"}},[t("v-progress-circular",{attrs:{indeterminate:"",size:"50"}})],1)],1),t("plans-report-form",e._b({on:{submit:function(e){return i()}}},"plans-report-form",{loading:a,reportInfo:e.reportInfo},!1))]}}])},e.$listeners))},Vn=[],Rn=t("87bb"),Un=t.n(Rn),qn=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-form",{ref:"form",staticClass:"plans-report-form",attrs:{"lazy-validation":"","aria-busy":e.loading,disabled:e.loading,autocomplete:"off"},on:{submit:function(n){return n.preventDefault(),e.onSubmit(n)}}},[t("v-row",{attrs:{"no-gutters":"",justify:"center"}},[t("v-col",[t("v-text-field",{attrs:{rules:e.nameRules,label:"Report Name",autofocus:"",autocomplete:"off",required:"","validate-on-blur":""},model:{value:e.reportInfo.name,callback:function(n){e.$set(e.reportInfo,"name",n)},expression:"reportInfo.name"}}),t("h3",{staticClass:"mt-1"},[e._v("Selected Plans ("+e._s(e.reportInfo.plans.length)+"):")]),t("ul",{staticClass:"plans"},e._l(e.reportInfo.plans,(function(n){return t("li",{key:n.id,staticClass:"plan"},[t("span",{staticClass:"plan-name"},[e._v(e._s(n.name))]),t("span",{staticClass:"plan-client-name"},[e._v(e._s(n.client&&n.client.name))])])})),0)],1)],1),t("div",{staticClass:"mt-8 btns-bar"},[t("btn",{attrs:{type:"submit","full-width":"",disabled:e.loading}},[e._v("Generate")])],1)],1)},Bn=[],Mn={name:"PlansReportForm",components:{Btn:te["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"}]}},methods:{validate:function(){return this.$refs.form.validate()},onSubmit:function(){this.validate()&&this.reportInfo.plans&&this.reportInfo.plans.length>0&&this.$emit("submit")}}},Yn=Mn,Gn=(t("15e1"),Object(S["a"])(Yn,qn,Bn,!1,null,null,null)),zn=Gn.exports;N()(Gn,{VCol:sn["a"],VForm:se["a"],VRow:ce["a"],VTextField:de["a"]});var Qn={name:"PlansReport",components:{PlansReportForm:zn},props:{plans:{type:Array,default:null}},data:function(e){return{GENERATE_REPORT:Un.a,reportInfo:{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,n){var t=n.data.generateAllClientsReport;t?(yn(t.url,this.name),Qe["a"].$emit("show-snackbar",{color:"success",text:"Report was generated successfully!"}),this.$emit("done")):Qe["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}}},Hn=Qn,Wn=Object(S["a"])(Hn,Ln,Vn,!1,null,null,null),Jn=Wn.exports;N()(Wn,{VOverlay:Sn["a"],VProgressCircular:Cn["a"],VRow:ce["a"]});var Xn={name:"Plans",components:{Btn:te["a"],PlanList:jn,Modal:Ie["a"],PlansReport:Jn},apollo:{currentUser:{query:k.a,fetchPolicy:"cache-first"}},data:function(){return{PLANS_QUERY:De.a,selected:[],currentUser:null}},computed:{showGenerateReportBtn:function(){return Object(y["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=[]}}},Zn=Xn,Kn=(t("f2c1"),Object(S["a"])(Zn,Fe,xe,!1,null,null,null)),et=Kn.exports;N()(Kn,{VRow:ce["a"]});var nt={components:{Plans:et,Btn:te["a"]}},tt=nt,it=Object(S["a"])(tt,Ee,Oe,!1,null,null,null),at=it.exports;N()(it,{VCol:sn["a"],VRow:ce["a"]});var ot=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{staticClass:"client-list"},[t("v-row",{staticClass:"mb-6"},[t("v-col",[t("h1",[e._v("Clients")])]),t("v-col",{attrs:{cols:"auto"}},[e.showAddClient?t("btn",{attrs:{link:"",to:{name:"add-client"},width:"180"}},[e._v("Add Client")]):e._e()],1)],1),t("v-row",[t("clients")],1)],1)},rt=[],lt=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("ApolloQuery",{staticClass:"clients-container",attrs:{query:e.CLIENTS_QUERY},scopedSlots:e._u([{key:"default",fn:function(e){var n=e.result,i=n.loading,a=n.error,o=n.data;return[t("alert",{attrs:{error:a}}),t("client-list",{attrs:{clients:o&&o.clients||[],loading:i}})]}}])})},st=[],ct=t("28e7"),dt=t.n(ct),ut=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("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(n){var i=n.item;return[i.canViewDetails?t("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(n){var i=n.item;return[t("div",{staticClass:"table-actions-bar"},[e.showEditBtn?t("btn",{staticClass:"action edit mr-2",attrs:{icon:"",link:"",to:{name:"client",params:{clientId:i.id}},"color-type":null}},[t("v-icon",{attrs:{small:""}},[e._v(" far fa-edit ")])],1):e._e(),e.showDeleteBtn?t("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(n){var a=n.on,o=n.attrs;return[t("v-tooltip",{attrs:{"max-width":"300",top:"","nudge-top":"-10",disabled:i.canDelete,"open-delay":"700"},scopedSlots:e._u([{key:"activator",fn:function(n){var r=n.on,l=n.attrs;return[t("span",e._g(e._b({},"span",l,!1),r),[t("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)]}}])})},mt=[],ft=t("7fff"),pt=t.n(ft),vt={name:"ClientList",components:{Btn:te["a"],DataTable:$e["a"],ConfirmationModal:Ve["a"]},props:{clients:{type:Array,default:[]},loading:{type:Boolean}},apollo:{currentUser:{query:k.a,fetchPolicy:"cache-only"}},data:function(){return{DELETE_CLIENT_MUTATION:pt.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(n){return Object(m["a"])(Object(m["a"])({},n),{},{icsOfficeName:n.icsOffice&&n.icsOffice.name||"",clientTypeName:n.clientType&&n.clientType.name||"",creatorUsername:n.creator&&n.creator.username||"",canViewDetails:Object(y["a"])(f["c"].VIEW_CLIENT,e.currentUser),canDelete:!n.plans||0===n.plans.length})})):[]},displayedHeaders:function(){var e=this;return this.headers.filter((function(n){return!n.permissions||n.permissions.some((function(n){return Object(y["a"])(n,e.currentUser)}))}))},showEditBtn:function(){return Object(y["a"])(f["c"].EDIT_CLIENT,this.currentUser)},showDeleteBtn:function(){return Object(y["a"])(f["c"].DELETE_CLIENT,this.currentUser)}},methods:{onDelete:function(e){return function(n,t){var i=t.data.deleteClient;if(i){var a=n.readQuery({query:dt.a});a.clients=a.clients.filter((function(n){return n.id!==e.id})),n.writeQuery({query:dt.a,data:a}),Qe["a"].$emit("show-snackbar",{color:"success",text:"Client was deleted from the system successfully!"})}}}}},ht=vt,kt=t("3a2f"),yt=Object(S["a"])(ht,ut,mt,!1,null,null,null),bt=yt.exports;N()(yt,{VIcon:_["a"],VTooltip:kt["a"]});var gt={name:"Clients",components:{Btn:te["a"],ClientList:bt},data:function(){return{CLIENTS_QUERY:dt.a}}},St=gt,Ct=(t("ec0b"),Object(S["a"])(St,lt,st,!1,null,null,null)),Nt=Ct.exports,_t={components:{Clients:Nt,Btn:te["a"]},apollo:{currentUser:{query:k.a,fetchPolicy:"cache-first"}},data:function(){return{currentUser:null}},computed:{showAddClient:function(){return Object(y["a"])(f["c"].ADD_CLIENT,this.currentUser)}}},wt=_t,Et=Object(S["a"])(wt,ot,rt,!1,null,null,null),Ot=Et.exports;N()(Et,{VCol:sn["a"],VRow:ce["a"]});var Ft=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{staticClass:"add-client"},[t("client")],1)},xt=[],It=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",[t("v-row",{staticClass:"mb-1"},[t("v-col",[t("breadcrumbs",{attrs:{items:e.breadcrumbs}})],1)],1),t("client-form",{attrs:{client:e.client},on:{submit:e.onSubmit}})],1)},Tt=[],Dt=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("stepper",{model:{value:e.step,callback:function(n){e.step=n},expression:"step"}},[t("v-stepper-header",[t("stepper-step",{attrs:{step:"1"}},[e._v(" General Information ")]),t("v-divider"),t("stepper-step",{attrs:{editable:e.lastCompleted>=1&&!e.lock,step:"2"}},[e._v(" Contacts ")]),t("v-divider"),t("stepper-step",{attrs:{editable:e.lastCompleted>=2&&!e.lock,step:"3"}},[e._v(" Facilities ")]),t("v-divider"),t("stepper-step",{attrs:{editable:e.lastCompleted>=3&&!e.lock,step:"4"}},[e._v(" Documents ")]),t("v-divider"),t("stepper-step",{attrs:{editable:e.lastCompleted>=4&&!e.lock,step:"5"}},[e._v(" Done ")])],1),t("v-stepper-items",{attrs:{flat:""}},[t("v-stepper-content",{attrs:{step:"1"}},[t("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),t("v-stepper-content",{attrs:{step:"2"}},[t("contacts",{attrs:{client:e.client,loading:e.loading},on:{back:function(n){e.step=1},done:e.onUpdateContacts}})],1),t("v-stepper-content",{attrs:{step:"3"}},[t("facilities",{attrs:{client:e.client,loading:e.loading},on:{back:function(n){e.step=2},done:e.onUpdateFacilities}})],1),t("v-stepper-content",{attrs:{step:"4"}},[t("documents",{attrs:{client:e.client,loading:e.loading},on:{back:function(n){e.step=3},done:e.onUpdateDocuments}})],1),t("v-stepper-content",{attrs:{step:"5"}},[t("client-summary",{attrs:{client:e.client},on:{back:function(n){e.step=4}}})],1)],1)],1)},At=[],Pt=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("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)},$t=[],jt=t("7e85"),Lt=i["a"].extend({mixins:[jt["a"]]}),Vt=Lt.extend({name:"Stepper",components:{VStepper:jt["a"]},props:{nonLinear:{type:Boolean,default:!0}}}),Rt=Vt,Ut=(t("3d11"),Object(S["a"])(Rt,Pt,$t,!1,null,null,null)),qt=Ut.exports;N()(Ut,{VStepper:jt["a"]});var Bt=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("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)},Mt=[],Yt=t("56a4"),Gt=i["a"].extend({mixins:[Yt["a"]]}),zt=Gt.extend({name:"StepperStep",components:{VStepperStep:Yt["a"]},props:{editable:{type:Boolean,default:!0}}}),Qt=zt,Ht=(t("2310"),Object(S["a"])(Qt,Bt,Mt,!1,null,null,null)),Wt=Ht.exports;N()(Ht,{VStepperStep:Yt["a"]});var Jt=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("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(n){return n.preventDefault(),e.onSubmit(n)}}},[e.loading?e._e():t("alert",{attrs:{error:e.error}}),e.loading?t("v-row",{attrs:{"no-gutters":"",justify:"center"}},[t("v-progress-circular",{attrs:{indeterminate:"",color:"primary"}})],1):e._e(),e.form?t("v-row",{attrs:{"no-gutters":""}},[t("v-col",{staticClass:"col"},[t("v-text-field",{attrs:{rules:e.nameRules,label:"Name",required:"","validate-on-blur":"",autofocus:"",autocomplete:"off"},on:{input:function(n){return e.onChange("name",e.form.name)}},model:{value:e.form.name,callback:function(n){e.$set(e.form,"name",n)},expression:"form.name"}}),t("v-text-field",{staticClass:"mt-1",attrs:{label:"District/Department Number",autocomplete:"off","validate-on-blur":""},on:{input:function(n){return e.onChange("district",e.form.district)}},model:{value:e.form.district,callback:function(n){e.$set(e.form,"district",n)},expression:"form.district"}}),t("v-text-field",{staticClass:"mt-1",attrs:{label:"Address Line",rules:e.addressRules,required:"",autocomplete:"off","validate-on-blur":""},on:{input:function(n){return e.onChange("address",e.form.address)}},model:{value:e.form.address,callback:function(n){e.$set(e.form,"address",n)},expression:"form.address"}}),t("v-text-field",{staticClass:"mt-1",attrs:{label:"City",rules:e.cityRules,required:"",autocomplete:"off","validate-on-blur":""},on:{input:function(n){return e.onChange("city",e.form.city)}},model:{value:e.form.city,callback:function(n){e.$set(e.form,"city",n)},expression:"form.city"}}),t("v-text-field",{staticClass:"mt-1",attrs:{label:"State",rules:e.stateRules,required:"",autocomplete:"off","validate-on-blur":""},on:{input:function(n){return e.onChange("state",e.form.state)}},model:{value:e.form.state,callback:function(n){e.$set(e.form,"state",n)},expression:"form.state"}}),t("number-text-field",{staticClass:"mt-1",attrs:{label:"Zip Code",rules:e.zipRules,required:"",autocomplete:"off","validate-on-blur":""},on:{input:function(n){return e.onChange("zip",e.form.zip)}},model:{value:e.form.zip,callback:function(n){e.$set(e.form,"zip",e._n(n))},expression:"form.zip"}}),t("v-text-field",{staticClass:"mt-1",attrs:{label:"County",autocomplete:"off","validate-on-blur":""},on:{input:function(n){return e.onChange("county",e.form.county)}},model:{value:e.form.county,callback:function(n){e.$set(e.form,"county",n)},expression:"form.county"}}),t("v-textarea",{staticClass:"mt-1",attrs:{rows:"1","auto-grow":"",label:"Client Summary",autocomplete:"off","validate-on-blur":""},on:{input:function(n){return e.onChange("description",e.form.description)}},model:{value:e.form.description,callback:function(n){e.$set(e.form,"description",n)},expression:"form.description"}})],1),t("v-col",{staticClass:"col",attrs:{offset:"1"}},[t("v-select",{staticClass:"mt-1",attrs:{"item-text":"name",rules:e.icsOfficeRules,items:e.icsOffices,label:"ICS Responsible Office",required:""},on:{input:function(n){return e.form.icsOffice=e.icsOffices.find((function(e){return e.name===n}))},change:function(n){return e.onChange("icsOffice",e.form.icsOffice)}},model:{value:e.form.icsOffice,callback:function(n){e.$set(e.form,"icsOffice",n)},expression:"form.icsOffice"}}),t("v-select",{staticClass:"mt-1",attrs:{"item-text":"name",items:e.clientTypes,rules:e.clientTypeRules,label:"Client Type",required:""},on:{input:function(n){return e.form.clientType=e.clientTypes.find((function(e){return e.name===n}))},change:function(n){return e.onChange("clientType",e.form.clientType)}},model:{value:e.form.clientType,callback:function(n){e.$set(e.form,"clientType",n)},expression:"form.clientType"}}),t("upload",{staticClass:"mt-4",attrs:{placeholder:"Upload Client Logo",accept:"image/*"},on:{change:function(n){return e.onChange("upload",e.form.upload)}},model:{value:e.form.upload,callback:function(n){e.$set(e.form,"upload",n)},expression:"form.upload"}})],1)],1):e._e(),t("div",{staticClass:"mt-8 btns-bar"},[t("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")]),t("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)},Xt=[],Zt=(t("b64b"),t("25f0"),t("6062"),t("6fda")),Kt=t.n(Zt),ei=t("0c10"),ni=t.n(ei),ti=t("51e6"),ii=t.n(ti),ai=t("ef63"),oi=t.n(ai),ri=t("2ef0"),li=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("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(n,t){return{key:t,fn:function(n){return[e._t(t,null,null,n)]}}}))],null,!0)},"v-file-input",Object.assign({},e.$props,e.$attrs),!1),e.$listeners))},si=[],ci=t("23a7"),di={name:"Upload",components:{VFileInput:ci["a"]},model:{prop:"value",event:"change"},props:{value:File|Array|null}},ui=di,mi=Object(S["a"])(ui,li,si,!1,null,null,null),fi=mi.exports;N()(mi,{VFileInput:ci["a"]});var pi=t("b891"),vi=function(e,n){return Object.keys(e).reduce((function(e,t){return Object(m["a"])(Object(m["a"])({},e),{},Object(en["a"])({},t,void 0!==n[t]?n[t]:null))}),{})},hi={name:"ClientGeneralInfoForm",components:{Btn:te["a"],Upload:fi,NumberTextField:pi["a"]},props:{loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},client:{type:Object}},apollo:{clientTypes:{query:Kt.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:ni.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"])({},vi(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,n){this.client?!Object(ri["isEqual"])(this.client[e],n)||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,n=e.name,t=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:n,district:t,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"])({},vi(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 n=this;this.internalLoading=!0,this.$apollo.mutate({mutation:ii.a,variables:{input:e}}).then((function(e){var t=e.data.addClient;Qe["a"].$emit("show-snackbar",{color:"success",text:"Client ".concat(t.name," was added successfully!")}),n.$emit("submit",t)})).catch((function(e){n.error=e})).finally((function(){n.internalLoading=!1}))},updateClient:function(e){var n=this;this.internalLoading=!0,this.$apollo.mutate({mutation:oi.a,variables:{input:e}}).then((function(e){var t=e.data.updateClient;Qe["a"].$emit("show-snackbar",{color:"success",text:"Client was updated successfully!"}),n.$emit("submit",t)})).catch((function(e){n.error=e})).finally((function(){n.internalLoading=!1}))}}},ki=hi,yi=(t("4447"),t("b974")),bi=t("a844"),gi=Object(S["a"])(ki,Jt,Xt,!1,null,"737dad3a",null),Si=gi.exports;N()(gi,{VCol:sn["a"],VForm:se["a"],VProgressCircular:Cn["a"],VRow:ce["a"],VSelect:yi["a"],VTextField:de["a"],VTextarea:bi["a"]});var Ci=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",[t("v-row",{staticClass:"mb-6",attrs:{"no-gutters":"",justify:"end"}},[t("modal",{attrs:{title:"Add Contact",width:"840px"},scopedSlots:e._u([{key:"activator",fn:function(n){var i=n.on,a=n.attrs;return[t("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(n){var i=n.close;return[t("add-contact",{attrs:{client:e.client},on:{done:i}})]}}])})],1),t("v-row",{attrs:{"no-gutters":""}},[t("contact-list",{attrs:{client:e.client,contacts:e.client&&e.client.contacts||[],loadiing:e.loading}})],1),t("v-row",{staticClass:"mt-12",attrs:{"no-gutters":"",justify:"end"}},[t("v-col",{attrs:{"justify-self":"start"}},[t("btn",{attrs:{width:"100","color-type":"accent"},on:{click:e.onBackClick}},[e._v("Back")])],1),t("v-col",{attrs:{cols:"auto"}},[t("btn",{attrs:{width:"100","color-type":"accent"},on:{click:e.onNextClick}},[e._v("Next")])],1)],1)],1)},Ni=[],_i=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("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(n){var i=n.mutate,a=n.loading,o=n.error;return[a?e._e():t("alert",{attrs:{align:"center",error:o}}),t("contact-form",e._b({on:{submit:function(e){return i()}}},"contact-form",{btnLabel:"Add",loading:a,contact:e.contact},!1))]}}])},e.$listeners))},wi=[],Ei=t("2909"),Oi=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-form",{ref:"form",staticClass:"contact-form",attrs:{"lazy-validation":"","aria-busy":e.loading,disabled:e.loading,autocomplete:"off"},on:{submit:function(n){return n.preventDefault(),e.onSubmit(n)}}},[t("alert",{attrs:{error:e.error}}),t("v-row",{attrs:{"no-gutters":""}},[t("v-col",{staticClass:"contact-general-form"},[t("h3",[e._v("GENERAL INFO")]),t("v-text-field",{attrs:{rules:e.nameRules,label:"Name",required:"","validate-on-blur":"",autofocus:"",autocomplete:"off"},model:{value:e.contact.name,callback:function(n){e.$set(e.contact,"name",n)},expression:"contact.name"}}),t("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(n){e.$set(e.contact,"jobTitle",n)},expression:"contact.jobTitle"}}),t("v-text-field",{staticClass:"mt-1",attrs:{rules:e.emailRules,label:"Email",autocomplete:"off","validate-on-blur":""},model:{value:e.contact.email,callback:function(n){e.$set(e.contact,"email",n)},expression:"contact.email"}}),t("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(n){e.$set(e.contact,"location",n)},expression:"contact.location"}}),t("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(n){e.$set(e.contact,"countYearsTogether",n)},expression:"contact.countYearsTogether"}})],1),t("v-col",{staticClass:"contact-phones-container",attrs:{offset:"2"}},[t("h3",[e._v("Phone Numbers")]),t("div",{staticClass:"contact-phones"},[e._l(e.contact.phones,(function(n,i){return[t("v-row",{key:i,attrs:{"no-gutters":""}},[t("v-col",[t("v-select",{attrs:{clearable:"","item-text":"name",items:e.phoneTypes,rules:e.phoneTypeRules(n),label:"Phone Number Type"},on:{input:function(t){return n.type=e.phoneTypes.find((function(e){return e.name===t}))||null}},model:{value:n.type,callback:function(t){e.$set(n,"type",t)},expression:"item.type"}}),t("v-text-field",{attrs:{rules:e.phoneRules(n),label:"Phone",autocomplete:"off","validate-on-blur":""},model:{value:n.phone,callback:function(t){e.$set(n,"phone",t)},expression:"item.phone"}})],1),t("v-col",{attrs:{offset:"1",cols:"auto"}},[t("btn",{staticClass:"mt-2",attrs:{icon:"","color-type":"secondary"},on:{click:function(n){return e.onPhoneClick(i)}}},[t("v-icon",0===i?[e._v("fa-plus")]:[e._v("fa-minus")])],1)],1)],1)]}))],2)])],1),t("div",{staticClass:"mt-8 btns-bar"},[t("btn",{attrs:{type:"submit",width:"300",disabled:e.loading}},[e._v(e._s(e.btnLabel))])],1)],1)},Fi=[],xi=(t("a434"),t("ec2a")),Ii=t.n(xi),Ti={name:"ContactForm",components:{Btn:te["a"],NumberTextField:pi["a"]},props:{btnLabel:{type:String,required:!0},loading:{type:Boolean,default:!1},contact:{type:Object}},apollo:{phoneTypes:{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 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:[oe["a"].email],phoneTypes:[],error:null}},methods:{phoneTypeRules:function(e){return[function(n){return null===n&&(null===e.phone||""===e.phone)||null!==n||"Phone Type is Required"}]},phoneRules:function(e){return[function(n){return(null===n||""===n)&&(null===e.type||""===e.type)||null!==n&&""!==n||"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)}}},Di=Ti,Ai=(t("5b6e"),Object(S["a"])(Di,Oi,Fi,!1,null,null,null)),Pi=Ai.exports;N()(Ai,{VCol:sn["a"],VForm:se["a"],VIcon:_["a"],VRow:ce["a"],VSelect:yi["a"],VTextField:de["a"],VTextarea:bi["a"]});var $i=t("17a3"),ji=t.n($i),Li={name:"AddContact",components:{ContactForm:Pi},props:{client:{type:Object,default:null}},data:function(){return{ADD_CONTACT_MUTATION:ji.a,contact:{name:null,jobTitle:null,phones:[{type:null,phone:null}],email:null,location:null,countYearsTogether:null}}},methods:{updateContacts:function(e,n){var t=n.data.addContact;if(t){var i=Object(Ei["a"])(this.client.contacts);i.push(t),this.client.contacts=i,Qe["a"].$emit("show-snackbar",{color:"success",text:"Contact ".concat(t.name," was added successfully!")})}else Qe["a"].$emit("show-snackbar",{color:"error",text:"Error! Something went wrong... Please try later!"})}}},Vi=Li,Ri=(t("d361"),Object(S["a"])(Vi,_i,wi,!1,null,null,null)),Ui=Ri.exports,qi=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("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(n){var i=n.item;return[t("div",{staticClass:"table-actions-bar"},[t("modal",{attrs:{title:"Edit Contact",width:"840px"},scopedSlots:e._u([{key:"activator",fn:function(n){var i=n.on,a=n.attrs;return[e.showEditBtn?t("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(n){var a=n.close;return[t("edit-contact",{attrs:{client:e.client,data:i},on:{done:a}})]}}],null,!0)}),e.showDeleteBtn?t("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(n){var i=n.on,a=n.attrs;return[t("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)]}}])})},Bi=[],Mi=t("f7e4"),Yi=t.n(Mi),Gi=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("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(n){var i=n.mutate,a=n.loading,o=n.error;return[a?e._e():t("alert",{attrs:{align:"center",error:o}}),t("contact-form",e._b({on:{submit:function(e){return i()}}},"contact-form",{btnLabel:"Update",loading:a,contact:e.contact},!1))]}}])},e.$listeners))},zi=[],Qi=(t("c740"),t("94e1")),Hi=t.n(Qi),Wi={name:"EditContact",components:{ContactForm:Pi},props:{client:{type:Object,default:null},data:{type:Object,default:null}},data:function(){return{UPDATE_CONTACT_MUTATION:Hi.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,n){var t=n.data.updateContact;if(t){var i=this.client.contacts.findIndex((function(e){return e.id===t.id}));-1!==i&&(this.client.contacts[i]=t,this.client.contacts=Object(Ei["a"])(this.client.contacts)),Qe["a"].$emit("show-snackbar",{color:"success",text:"Contact ".concat(t.name," was updated successfully!")})}else Qe["a"].$emit("show-snackbar",{color:"error",text:"Error! Something went wrong... Please try later!"})}}},Ji=Wi,Xi=(t("2bd3"),Object(S["a"])(Ji,Gi,zi,!1,null,null,null)),Zi=Xi.exports,Ki={name:"ContactList",components:{Btn:te["a"],DataTable:$e["a"],ConfirmationModal:Ve["a"],Modal:Ie["a"],EditContact:Zi},props:{client:{type:Object,default:null},contacts:{type:Array,default:[]},loading:{type:Boolean}},apollo:{currentUser:{query:k.a,fetchPolicy:"cache-only"}},data:function(){return{DELETE_CONTACT_MUTATION:Yi.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(n){return!n.permissions||n.permissions.some((function(n){return Object(y["a"])(n,e.currentUser)}))}))},showEditBtn:function(){return Object(y["a"])(f["c"].EDIT_CONTACT,this.currentUser)},showDeleteBtn:function(){return Object(y["a"])(f["c"].DELETE_CONTACT,this.currentUser)}},methods:{onDelete:function(e){var n=this;return function(t,i){var a=i.data.deleteContact;a&&(n.client.contacts=n.client.contacts.filter((function(n){return n.id!==e.id})),Qe["a"].$emit("show-snackbar",{color:"success",text:"Contact was deleted successfully!"}))}}}},ea=Ki,na=Object(S["a"])(ea,qi,Bi,!1,null,null,null),ta=na.exports;N()(na,{VIcon:_["a"]});var ia={name:"Contacts",components:{Btn:te["a"],Modal:Ie["a"],AddContact:Ui,ContactList:ta},props:{client:{type:Object,default:null},loading:{type:Boolean}},apollo:{currentUser:{query:k.a,fetchPolicy:"cache-only"}},data:function(){return{currentUser:null}},computed:{showAddContactBtn:function(){return Object(y["a"])(f["c"].ADD_CONTACT,this.currentUser)}},methods:{onNextClick:function(){this.$emit("done")},onBackClick:function(){this.$emit("back")}}},aa=ia,oa=Object(S["a"])(aa,Ci,Ni,!1,null,null,null),ra=oa.exports;N()(oa,{VCol:sn["a"],VRow:ce["a"]});var la=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",[t("v-row",{staticClass:"mb-6",attrs:{"no-gutters":"",justify:"end"}},[t("modal",{attrs:{title:"Add Facility",width:"812px"},scopedSlots:e._u([{key:"activator",fn:function(n){var i=n.on,a=n.attrs;return[t("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(n){var i=n.close;return[t("add-facility",{attrs:{client:e.client},on:{done:i}})]}}])})],1),t("v-row",{attrs:{"no-gutters":""}},[t("facility-list",{attrs:{client:e.client,facilities:e.client&&e.client.facilities||[],readonly:!1,loading:e.loading}})],1),t("v-row",{staticClass:"mt-12",attrs:{"no-gutters":"",justify:"end"}},[t("v-col",{attrs:{"justify-self":"start"}},[t("btn",{attrs:{width:"100","color-type":"accent"},on:{click:e.onBackClick}},[e._v("Back")])],1),t("v-col",{attrs:{cols:"auto"}},[t("btn",{attrs:{width:"100","color-type":"accent"},on:{click:e.onNextClick}},[e._v("Next")])],1)],1)],1)},sa=[],ca=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("ApolloMutation",e._g({staticClass:"add-facility-form",attrs:{mutation:e.ADD_FACILITY_MUTATION,variables:{input:Object.assign({},e.facility,{clientId:e.client&&e.client.id||null})},update:e.updateFacilities},scopedSlots:e._u([{key:"default",fn:function(n){var i=n.mutate,a=n.loading,o=n.error;return[a?e._e():t("alert",{attrs:{align:"center",error:o}}),t("facility-form",e._b({on:{submit:function(e){return i()}}},"facility-form",{btnLabel:"Add",loading:a,facility:e.facility},!1))]}}])},e.$listeners))},da=[],ua=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-form",{ref:"form",staticClass:"facility-form",attrs:{"lazy-validation":"","aria-busy":e.loading,disabled:e.loading,autocomplete:"off"},on:{submit:function(n){return n.preventDefault(),e.onSubmit(n)}}},[t("v-row",{attrs:{"no-gutters":""}},[t("v-col",[t("v-text-field",{attrs:{rules:e.nameRules,label:"Name",required:"","validate-on-blur":"",autofocus:"",autocomplete:"off"},model:{value:e.facility.name,callback:function(n){e.$set(e.facility,"name",n)},expression:"facility.name"}}),t("number-text-field",{staticClass:"mt-1",attrs:{label:"Square Footage",autocomplete:"off"},model:{value:e.facility.squareFootage,callback:function(n){e.$set(e.facility,"squareFootage",e._n(n))},expression:"facility.squareFootage"}}),t("v-text-field",{staticClass:"mt-1",attrs:{label:"Age(s) of Facility",autocomplete:"off"},model:{value:e.facility.age,callback:function(n){e.$set(e.facility,"age",n)},expression:"facility.age"}}),t("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(n){e.$set(e.facility,"occupancy",e._n(n))},expression:"facility.occupancy"}}),t("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(n){e.$set(e.facility,"capacity",e._n(n))},expression:"facility.capacity"}})],1),t("v-col",{attrs:{offset:"1"}},[t("v-text-field",{attrs:{label:"Use",autocomplete:"off"},model:{value:e.facility.use,callback:function(n){e.$set(e.facility,"use",n)},expression:"facility.use"}}),t("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(n){e.$set(e.facility,"siteSize",e._n(n))},expression:"facility.siteSize"}}),t("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(n){e.$set(e.facility,"replacementCost",e._n(n))},expression:"facility.replacementCost"}}),t("v-text-field",{staticClass:"mt-1",attrs:{label:"Link to Facility Photos",autocomplete:"off","validate-on-blur":""},model:{value:e.facility.urlPhotos,callback:function(n){e.$set(e.facility,"urlPhotos",n)},expression:"facility.urlPhotos"}}),t("v-textarea",{staticClass:"mt-1",attrs:{rows:"1","auto-grow":"",label:"Summary of Facility",autocomplete:"off"},model:{value:e.facility.summary,callback:function(n){e.$set(e.facility,"summary",n)},expression:"facility.summary"}})],1)],1),t("div",{staticClass:"mt-8 btns-bar"},[t("btn",{attrs:{type:"submit",width:"300",disabled:e.loading}},[e._v(e._s(e.btnLabel))])],1)],1)},ma=[],fa={name:"FacilityForm",components:{Btn:te["a"],NumberTextField:pi["a"]},props:{btnLabel:{type:String,required:!0},loading:{type:Boolean,default:!1},facility:{type:Object}},data:function(){return Object(m["a"])(Object(m["a"])({},oe["a"]),{},{currentUser:null,nameRules:[function(e){return!!e||"Name is Required"}]})},methods:{validate:function(){return this.$refs.form.validate()},onSubmit:function(){this.validate()&&this.$emit("submit",this.facility)}}},pa=fa,va=(t("c90a"),Object(S["a"])(pa,ua,ma,!1,null,null,null)),ha=va.exports;N()(va,{VCol:sn["a"],VForm:se["a"],VRow:ce["a"],VTextField:de["a"],VTextarea:bi["a"]});var ka=t("e194"),ya=t.n(ka),ba={name:"AddFacility",components:{FacilityForm:ha},props:{client:{type:Object,default:null}},data:function(){return{ADD_FACILITY_MUTATION:ya.a,facility:{name:null,squareFootage:null,age:null,occupancy:null,capacity:null,use:null,siteSize:null,replacementCost:null,urlPhotos:null,summary:null}}},methods:{updateFacilities:function(e,n){var t=n.data.addFacility;if(t){var i=Object(Ei["a"])(this.client.facilities);i.unshift(t),this.client.facilities=i,Qe["a"].$emit("show-snackbar",{color:"success",text:"Facility ".concat(t.name," was added successfully!")})}else Qe["a"].$emit("show-snackbar",{color:"error",text:"Error! Something went wrong... Please try later!"})}}},ga=ba,Sa=(t("af2a"),Object(S["a"])(ga,ca,da,!1,null,null,null)),Ca=Sa.exports,Na=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("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(n){var i=n.item;return[i.urlPhotos?t("a",{attrs:{href:i.urlPhotos,target:"_blank"}},[e._v("Link to Photos")]):e._e()]}},{key:"item.actions",fn:function(n){var i=n.item;return[t("div",{staticClass:"table-actions-bar"},[t("modal",{attrs:{title:"Edit Facility",width:"812px"},scopedSlots:e._u([{key:"activator",fn:function(n){var i=n.on,a=n.attrs;return[e.showEditBtn?t("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(n){var a=n.close;return[t("edit-facility",{attrs:{client:e.client,data:i},on:{done:a}})]}}],null,!0)}),e.showDeleteBtn?t("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(n){var i=n.on,a=n.attrs;return[t("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)]}}])})},_a=[],wa=(t("99af"),t("0737")),Ea=t.n(wa),Oa=t("ea34"),Fa=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("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,urlPhotos:e.facility.urlPhotos,summary:e.facility.summary}},update:e.updateFacilities},scopedSlots:e._u([{key:"default",fn:function(n){var i=n.mutate,a=n.loading,o=n.error;return[a?e._e():t("alert",{attrs:{align:"center",error:o}}),t("facility-form",e._b({on:{submit:function(e){return i()}}},"facility-form",{btnLabel:"Update",loading:a,facility:e.facility},!1))]}}])},e.$listeners))},xa=[],Ia=t("502f"),Ta=t.n(Ia),Da={name:"EditFacility",components:{FacilityForm:ha},props:{client:{type:Object,default:null},data:{type:Object,default:null}},data:function(){return{UPDATE_FACILITY_MUTATION:Ta.a,facility:this.data&&Object(m["a"])({},this.data)||{name:"",squareFootage:null,age:"",occupancy:null,capacity:null,use:"",siteSize:null,replacementCost:null,urlPhotos:"",summary:""}}},watch:{data:function(e){this.facility=Object(m["a"])({},e)}},methods:{updateFacilities:function(e,n){var t=n.data.updateFacility;if(t){var i=this.client.facilities.findIndex((function(e){return e.id===t.id}));-1!==i&&(this.client.facilities[i]=t,this.client.facilities=Object(Ei["a"])(this.client.facilities)),Qe["a"].$emit("show-snackbar",{color:"success",text:"Facility ".concat(t.name," was updated successfully!")})}else Qe["a"].$emit("show-snackbar",{color:"error",text:"Error! Something went wrong... Please try later!"})}}},Aa=Da,Pa=(t("7aa9"),Object(S["a"])(Aa,Fa,xa,!1,null,null,null)),$a=Pa.exports,ja={name:"FacilityList",components:{Btn:te["a"],DataTable:$e["a"],ConfirmationModal:Ve["a"],Modal:Ie["a"],EditFacility:$a,TruncatedText:Oa["a"]},props:{client:{type:Object,default:null},facilities:{type:Array,default:[]},loading:{type:Boolean},readonly:{type:Boolean,default:!0}},apollo:{currentUser:{query:k.a,fetchPolicy:"cache-only"}},data:function(e){return{DELETE_FACILITY_MUTATION:Ea.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(Ei["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(n){return!n.permissions||n.permissions.some((function(n){return Object(y["a"])(n,e.currentUser)}))}))},showEditBtn:function(){return Object(y["a"])(f["c"].EDIT_FACILITY,this.currentUser)},showDeleteBtn:function(){return Object(y["a"])(f["c"].DELETE_FACILITY,this.currentUser)}},methods:{onDelete:function(e){var n=this;return function(t,i){var a=i.data.deleteFacility;a&&(n.client.facilities=n.client.facilities.filter((function(n){return n.id!==e.id})),Qe["a"].$emit("show-snackbar",{color:"success",text:"Facility was deleted successfully!"}))}}}},La=ja,Va=Object(S["a"])(La,Na,_a,!1,null,null,null),Ra=Va.exports;N()(Va,{VIcon:_["a"]});var Ua={name:"Facilities",components:{Btn:te["a"],Modal:Ie["a"],AddFacility:Ca,FacilityList:Ra},props:{client:{type:Object,default:null},loading:{type:Boolean}},apollo:{currentUser:{query:k.a,fetchPolicy:"cache-only"}},data:function(){return{currentUser:null}},computed:{showAddFacilityBtn:function(){return Object(y["a"])(f["c"].ADD_FACILITY,this.currentUser)}},methods:{onNextClick:function(){this.$emit("done")},onBackClick:function(){this.$emit("back")}}},qa=Ua,Ba=Object(S["a"])(qa,la,sa,!1,null,null,null),Ma=Ba.exports;N()(Ba,{VCol:sn["a"],VRow:ce["a"]});var Ya=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",[t("v-row",{staticClass:"mb-6 summary-content",attrs:{"no-gutters":""}},[t("client-info",{attrs:{client:e.client,loading:e.loading,"hide-plans":""}})],1),t("v-row",{staticClass:"mt-12",attrs:{"no-gutters":"",justify:"end"}},[t("v-col",{attrs:{"justify-self":"start"}},[t("btn",{attrs:{width:"100","color-type":"accent"},on:{click:e.onBackClick}},[e._v("Back")])],1),e.showCreatePlan?t("v-col",{attrs:{cols:"auto"}},[t("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(),t("v-col",{attrs:{cols:"auto"}},[t("btn",{attrs:{width:"100",to:e.redirectLink,link:"","color-type":"accent"}},[e._v("Done")])],1)],1)],1)},Ga=[],za=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-expansion-panels",{attrs:{flat:"",value:e.expanded}},[t("v-expansion-panel",[t("expansion-panel-header",[e._v(" General Information ")]),t("v-expansion-panel-content",[e.client?t("v-row",{attrs:{"no-gutters":""}},[t("v-col",{staticClass:"general-info"},[t("definition-list",{attrs:{data:e.client,labels:e.generalInfoLabels}})],1),t("v-col",{attrs:{offset:"1"}},[t("v-img",{staticClass:"logo",attrs:{contain:"",src:e.client&&e.client.logoUrl||"",rounded:"",alt:"Logo Image"},scopedSlots:e._u([{key:"placeholder",fn:function(){return[t("div",{staticClass:"image-placeholder"},[e._v("Logo Image")])]},proxy:!0}],null,!1,4065266705)})],1)],1):t("v-row",{staticClass:"loader",class:{"-loaded":!e.loading},attrs:{"no-gutters":""}},[e._v("No information")])],1)],1),t("v-expansion-panel",[t("expansion-panel-header",[e._v(" Contacts ")]),t("v-expansion-panel-content",[e.client&&e.client.contacts&&e.client.contacts.length>0?t("v-row",{staticClass:"contacts",attrs:{"align-content":"space-between"}},e._l(e.client.contacts,(function(n){return t("v-col",{key:n.id},[t("definition-list",{staticClass:"contact-details",attrs:{data:n,labels:e.contactInfoLabels}})],1)})),1):t("p",{staticClass:"loader",class:{"-loaded":!e.loading}},[e._v("No contacts")])],1)],1),t("v-expansion-panel",[t("expansion-panel-header",[e._v(" Facilities ")]),t("v-expansion-panel-content",[e.facilities.length>0||e.loading?t("facility-list",{attrs:{client:e.client,loading:e.loading,facilities:e.facilities}}):t("p",[e._v("No facilities")])],1)],1),t("v-expansion-panel",[t("expansion-panel-header",[e._v(" Documents ")]),t("v-expansion-panel-content",[e.documents.length>0||e.loading?t("file-list",{attrs:{list:e.documents,loading:e.loading}}):t("p",[e._v("No documents")])],1)],1),!e.hidePlans&&e.canViewPlans?t("v-expansion-panel",[t("expansion-panel-header",[e._v(" Plans ")]),t("v-expansion-panel-content",[t("alert",{attrs:{error:e.error}}),e.displayedPlans.length>0||e.loading?t("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(n){var i=n.item;return[i.canViewDetails?t("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(n){var i=n.item;return[t("span",{staticClass:"date-cell"},[t("span",{staticClass:"date"},[e._v(e._s(e._f("utcDate")(i.dateOfCreation)))])])]}},{key:"item.updatedAt",fn:function(n){var i=n.item;return[t("span",{staticClass:"date-cell"},[t("span",{staticClass:"date"},[e._v(e._s(e._f("date")(i.updatedAt)))]),e._v(" "),t("span",{staticClass:"time"},[e._v(e._s(e._f("time")(i.updatedAt)))])])]}}],null,!1,1973723e3)}):t("p",[e._v("No plans")])],1)],1):e._e()],1)},Qa=[],Ha=t("e3c2"),Wa=t("7c734"),Ja=function(){var e=this,n=e.$createElement,t=e._self._c||n;return e.list&&e.list.length?t("div",[e._l(e.list,(function(n){return[n.link?t("v-list-item",{key:n.link},[t("v-list-item-icon",[t("v-icon",{attrs:{size:"16"}},[e._v("fa-file-alt")])],1),t("v-list-item-content",[t("v-list-item-title",[t("a",{attrs:{href:n.link,download:n.link,target:"_blank"}},[e._v(e._s(n.name||n.link))])])],1)],1):e._e()]}))],2):e._e()},Xa=[],Za={name:"FileList",props:{list:Array,loading:Boolean}},Ka=Za,eo=Object(S["a"])(Ka,Ja,Xa,!1,null,null,null),no=eo.exports;N()(eo,{VIcon:_["a"],VListItem:E["a"],VListItemContent:O["a"],VListItemIcon:F["a"],VListItemTitle:O["b"]});var to={name:"ClientInfo",components:{Btn:te["a"],ExpansionPanelHeader:Ha["a"],DefinitionList:Wa["a"],DataTable:$e["a"],FacilityList:Ra,FileList:no},props:{client:{type:Object,default:null},hidePlans:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},apollo:{currentUser:{query:k.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:"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(y["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(n){return Object(m["a"])(Object(m["a"])({},n),{},{creatorName:n.createdBy&&n.createdBy.username||"",planType:n.financialInfo&&n.financialInfo.typeOfPlan&&n.financialInfo.typeOfPlan.name||"",editorName:n.updatedBy&&n.updatedBy.username||"",canViewDetails:Object(y["a"])(f["c"].VIEW_PLAN,e.currentUser)})})):[]}}},io=to,ao=(t("1863"),t("cd55")),oo=t("49e2"),ro=t("0393"),lo=Object(S["a"])(io,za,Qa,!1,null,"156d81b2",null),so=lo.exports;N()(lo,{VCol:sn["a"],VExpansionPanel:ao["a"],VExpansionPanelContent:oo["a"],VExpansionPanels:ro["a"],VImg:P["a"],VRow:ce["a"]});var co={name:"ClientSummary",components:{Btn:te["a"],ClientInfo:so},apollo:{currentUser:{query:k.a,fetchPolicy:"cache-only"}},props:{client:{type:Object,default:null},loading:{type:Boolean}},data:function(){return{currentUser:null}},computed:{showCreatePlan:function(){return Object(y["a"])(f["c"].CREATE_PLAN,this.currentUser)&&this.client&&this.client.facilities&&this.client.facilities.length>0},redirectLink:function(){return Object(y["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")}}},uo=co,mo=(t("cddf"),Object(S["a"])(uo,Ya,Ga,!1,null,null,null)),fo=mo.exports;N()(mo,{VCol:sn["a"],VRow:ce["a"]});var po=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{staticClass:"loader -d-loader",class:{"-loaded":e.isLoaded}},[t("v-row",[t("v-col",{attrs:{cols:"12"}},[t("file-input-list",{staticClass:"d-list",attrs:{modal:""},on:{change:e.change,remove:e.remove},model:{value:e.fileList,callback:function(n){e.fileList=n},expression:"fileList"}})],1)],1),t("v-row",{staticClass:"mt-12",attrs:{"no-gutters":"",justify:"end"}},[t("v-col",{attrs:{"justify-self":"start"}},[t("btn",{attrs:{width:"100","color-type":"accent"},on:{click:e.onBackClick}},[e._v("Back")])],1),t("v-col",{attrs:{cols:"auto"}},[t("btn",{attrs:{width:"100","color-type":"accent"},on:{click:e.onNextClick}},[e._v("Next")])],1)],1)],1)},vo=[],ho=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",[e._l(e.list,(function(n,i){return t("v-list-item",{key:n.name+i},[t("v-list-item-content",{staticClass:"file-input-list__content"},[t("v-file-input",{attrs:{clearable:!1,value:e.list[i],"truncate-length":"100"},on:{change:function(n){return e.change(i,n)}}})],1),i!=e.list.length-1||e.isMax?e._e():t("v-list-item-action",{staticClass:"file-input-list__add"},[t("v-icon",{staticClass:"-cursor-pointer",attrs:{size:"24",color:"accent"},on:{click:e.add}},[e._v(" fa-plus-circle ")])],1),t("v-list-item-action",[t("v-icon",{staticClass:"-cursor-pointer",attrs:{size:"24"},on:{click:function(n){return e.del(i)}}},[e._v(" fa-times-circle ")])],1)],1)})),t("modal",{ref:"modal",attrs:{title:"Delete File","max-width":"480"},scopedSlots:e._u([{key:"default",fn:function(n){var i=n.close;return[t("div",{staticClass:"confirmation-modal-content"},[t("p",[e._v("Are you sure you want to delete file?")]),t("div",{staticClass:"mt-8"},[t("div",{staticClass:"zoom-fix"},[t("btn",{attrs:{width:"162","color-type":"accent"},on:{click:i}},[e._v("Cancel")])],1),t("div",{staticClass:"zoom-fix"},[t("btn",{attrs:{width:"162",type:"submit"},on:{click:e.approve}},[e._v("Delete")])],1)])])]}}])})],2)},ko=[],yo=(t("a9e3"),t("fb6a"),{name:"FileInputList",components:{Modal:Ie["a"],Btn:te["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,n){n instanceof File&&(this.list[e]=n,this.input(),this.$emit("change",{index:e,value:n}))}}}),bo=yo,go=(t("4c95"),Object(S["a"])(bo,ho,ko,!1,null,null,null)),So=go.exports;N()(go,{VFileInput:ci["a"],VIcon:_["a"],VListItem:E["a"],VListItemAction:cn["a"],VListItemContent:O["a"]});var Co=t("a151"),No=t.n(Co),_o=t("0af4"),wo=t.n(_o),Eo=t("3010"),Oo=t.n(Eo),Fo=t("7514"),xo=t.n(Fo),Io={name:"Documents",components:{Btn:te["a"],FileInputList:So},props:{loading:{type:Boolean},client:{type:Object}},apollo:{currentUser:{query:k.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 n=e.value,t=e.index;if(this.client.id&&n instanceof File&&"number"===typeof t){var i={clientId:this.client.id,documentUrl:"",documentFile:n,name:n.name},a=wo.a;this.client.documents[t]&&this.client.documents[t].id&&(i.id=this.client.documents[t].id,a=Oo.a),this.uploadFile(i,a,t)}},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(n){n&&(n instanceof File?e.fileList.push(n):(n.name||n.documentUrl)&&e.fileList.push(n.name||n.documentUrl))}))},removeFile:function(e){var n=this;e&&(this.internalLoading=!0,this.$apollo.mutate({mutation:No.a,variables:{id:e}}).then((function(){Qe["a"].$emit("show-snackbar",{color:"success",text:"File was removed successfully!"});var t=n.client.documents.findIndex((function(n){return n.id===e}));t>-1&&n.client.documents.splice(t,1)})).catch((function(e){n.error=e})).finally((function(){n.internalLoading=!1})))},uploadFile:function(e,n,t){var i=this;e&&n&&(this.internalLoading=!0,this.$apollo.mutate({mutation:n,variables:{input:e}}).then((function(e){var n=e.data,a=n.addDocument,o=n.updateDocument;Qe["a"].$emit("show-snackbar",{color:"success",text:"File was uploaded successfully!"}),i.client.documents[t]=a||o,i.$emit("submit",a||o)})).catch((function(e){Qe["a"].$emit("show-snackbar",{color:"error",text:"Error upload file. Max size of the file is 10 MB bytes. Please provide another file."}),i.fileList.splice(t,1),i.error=e})).finally((function(){i.internalLoading=!1})))},finalizeDocumentsList:function(){var e=this;this.$apollo.mutate({mutation:xo.a,variables:{clientId:this.client.id}}).then((function(n){var t=n.data.documents;e.client.documents=t})).catch((function(n){e.error=n}))},onNextClick:function(){this.finalizeDocumentsList(),this.$emit("done")},onBackClick:function(){this.finalizeDocumentsList(),this.$emit("back")}}},To=Io,Do=(t("5c58"),Object(S["a"])(To,po,vo,!1,null,null,null)),Ao=Do.exports;N()(Do,{VCol:sn["a"],VRow:ce["a"]});var Po={name:"ClientForm",components:{Stepper:qt,StepperStep:Wt,ClientGeneralInfoForm:Si,Contacts:ra,Facilities:Ma,Documents:Ao,ClientSummary:fo},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,n){!n&&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}}},$o=Po,jo=t("ce7e"),Lo=t("e516"),Vo=t("9c54"),Ro=Object(S["a"])($o,Dt,At,!1,null,null,null),Uo=Ro.exports;N()(Ro,{VDivider:jo["a"],VStepperContent:Lo["a"],VStepperHeader:Vo["a"],VStepperItems:Vo["b"]});var qo=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("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)},Bo=[],Mo=t("2bc5"),Yo=i["a"].extend({mixins:[Mo["a"]]}),Go=Yo.extend({name:"Breadcrumbs",components:{VBreadcrumbs:Mo["a"]},apollo:{currentUser:{query:k.a,fetchPolicy:"cache-only"}},data:function(){return{currentUser:null}},computed:{displayedItems:function(){var e=this;return this.items.filter((function(n){return!n.permission||n.permission&&Object(y["a"])(n.permission,e.currentUser)}))}}}),zo=Go,Qo=(t("c350"),Object(S["a"])(zo,qo,Bo,!1,null,null,null)),Ho=Qo.exports;N()(Qo,{VBreadcrumbs:Mo["a"]});var Wo={name:"AddClient",components:{ClientForm:Uo,Breadcrumbs:Ho},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}}},Jo=Wo,Xo=Object(S["a"])(Jo,It,Tt,!1,null,null,null),Zo=Xo.exports;N()(Xo,{VCol:sn["a"],VRow:ce["a"]});var Ko={name:"AddClient",components:{Client:Zo}},er=Ko,nr=Object(S["a"])(er,Ft,xt,!1,null,null,null),tr=nr.exports,ir=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{staticClass:"edit-client"},[t("client",{attrs:{"client-id":e.$route.params.clientId}})],1)},ar=[],or=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",[t("v-row",{staticClass:"mb-1"},[t("v-col",[t("client-breadcrumbs",{attrs:{client:e.client,"is-edit":""}})],1)],1),t("alert",{attrs:{error:e.error}}),t("client-form",{attrs:{client:e.client,disabled:!!e.error,loading:e.loading},on:{submit:e.onSubmit}})],1)},rr=[],lr=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("breadcrumbs",{attrs:{items:e.items}})},sr=[],cr={name:"ClientBreadcrumbs",components:{Breadcrumbs:Ho},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(Ei["a"])(this.client?[{text:this.client.name||"",href:"/client-details/"+this.client.id,disabled:!this.isEdit}]:[]),Object(Ei["a"])(this.isEdit?[{text:"Edit client",disabled:!0}]:[]))}}},dr=cr,ur=Object(S["a"])(dr,lr,sr,!1,null,null,null),mr=ur.exports,fr=t("2f26"),pr=t.n(fr),vr={name:"EditClient",components:{ClientBreadcrumbs:mr,ClientForm:Uo},props:{clientId:{type:Number|String}},apollo:{client:{query:pr.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}}},hr=vr,kr=Object(S["a"])(hr,or,rr,!1,null,null,null),yr=kr.exports;N()(kr,{VCol:sn["a"],VRow:ce["a"]});var br={name:"EditClient",components:{Client:yr}},gr=br,Sr=Object(S["a"])(gr,ir,ar,!1,null,null,null),Cr=Sr.exports,Nr=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{staticClass:"client-details"},[t("client",{attrs:{clientId:e.$route.params.clientId}})],1)},_r=[],wr=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",[t("v-row",{staticClass:"mb-6"},[t("v-col",[t("client-breadcrumbs",{attrs:{client:e.client}})],1),e.showEditClient&&!e.error?t("v-col",{attrs:{cols:"auto"}},[t("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?t("v-col",{attrs:{cols:"auto"}},[t("btn",{attrs:{link:"",to:{name:"create-plan",params:{clientId:e.client.id}},width:"180"}},[e._v("Create Plan")])],1):e._e()],1),t("alert",{attrs:{error:e.error}}),t("client-info",e._b({},"client-info",{loading:e.loading,client:e.client},!1))],1)},Er=[],Or={name:"Client",components:{ClientInfo:so,ClientBreadcrumbs:mr,Btn:te["a"]},props:{clientId:{type:Number|String}},apollo:{currentUser:{query:k.a,fetchPolicy:"cache-only"},client:{query:pr.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(y["a"])(f["c"].CREATE_PLAN,this.currentUser)&&this.client&&this.client.facilities&&this.client.facilities.length>0},showEditClient:function(){return Object(y["a"])(f["c"].EDIT_CLIENT,this.currentUser)}}},Fr=Or,xr=Object(S["a"])(Fr,wr,Er,!1,null,null,null),Ir=xr.exports;N()(xr,{VCol:sn["a"],VRow:ce["a"]});var Tr={name:"ClientDetails",components:{Client:Ir}},Dr=Tr,Ar=Object(S["a"])(Dr,Nr,_r,!1,null,null,null),Pr=Ar.exports,$r=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{staticClass:"plan-details"},[t("plan",{attrs:{planId:e.$route.params.planId}})],1)},jr=[],Lr=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",[t("v-row",{staticClass:"mb-6"},[t("v-col",[t("breadcrumbs",{attrs:{items:e.breadcrumbs}})],1),e.showEditPlan&&!e.error?t("v-col",{attrs:{cols:"auto"}},[t("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),t("alert",{attrs:{error:e.error}}),t("plan-info",e._b({},"plan-info",{loading:e.loading,plan:e.plan,components:e.componentsOfNeed},!1))],1)},Vr=[],Rr=t("d368"),Ur=t.n(Rr),qr=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-expansion-panels",{attrs:{flat:"",value:e.expanded}},[t("v-expansion-panel",[t("expansion-panel-header",[e._v(" General Information ")]),t("v-expansion-panel-content",[e.plan?t("v-row",{attrs:{"no-gutters":""}},[t("v-col",{staticClass:"general-info"},[t("definition-list",{attrs:{data:e.plan,labels:e.generalInfoLabels}})],1)],1):t("v-row",{staticClass:"loader",class:{"-loaded":!e.loading},attrs:{"no-gutters":""}},[e._v("No information")])],1)],1),t("v-expansion-panel",[t("expansion-panel-header",[e._v(" Financial Information ")]),t("v-expansion-panel-content",[e.plan&&e.plan.financialInfo?t("v-row",{attrs:{"no-gutters":""}},[t("v-col",{staticClass:"financial-info-details"},[t("plan-financial-info",{attrs:{plan:e.plan}})],1)],1):t("v-row",{staticClass:"loader",class:{"-loaded":!e.loading},attrs:{"no-gutters":""}},[e._v("No financial information")])],1)],1),t("v-expansion-panel",[t("expansion-panel-header",[e._v(" Components of needs ")]),t("v-expansion-panel-content",[t("alert",{attrs:{error:e.error}}),e.displayedItems&&(e.displayedItems.length||e.loading)?t("data-table",{attrs:{items:e.displayedItems,headers:e.headers,height:"611px","item-key":"id",loading:e.loading},scopedSlots:e._u([{key:"filter.flag",fn:function(n){var i=n.item,a=n.callback;return[t("div",{staticClass:"select-wrapper",staticStyle:{width:"97px"}},[t("v-select",{attrs:{outlined:"",dense:"",multiple:"","full-width":"","hide-details":"",clearable:"",items:["Marked","Unmarked"]},on:{change:function(n){return e.onFlagFilter(i,a)}},model:{value:e.flagFilterModel,callback:function(n){e.flagFilterModel=n},expression:"flagFilterModel"}})],1)]}},{key:"item.flag",fn:function(n){var i=n.item;return[t("div",{staticClass:"text-center"},[t("v-icon",{attrs:{color:e.$vuetify.theme.themes.light.accent}},[e._v(e._s(i.flag?"fas":"far")+" fa-star")])],1)]}},{key:"item.softCost",fn:function(e){var n=e.item;return[t("v-simple-checkbox",{attrs:{value:n.softCost,ripple:!1,readonly:""}})]}},{key:"item.componentUrl",fn:function(n){var i=n.item;return[i.componentUrl?t("a",{attrs:{href:i.componentUrl,target:"_blank"}},[e._v("Link to Photo")]):e._e()]}}],null,!1,2997670756)}):t("v-row",{attrs:{"no-gutters":""}},[e._v("No components")])],1)],1)],1)},Br=[],Mr=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("definition-list",{attrs:{data:e.plan.financialInfo,labels:e.displayedFinancialInfoLabels}})},Yr=[],Gr={name:"PlanFinancialInfo",components:{DefinitionList:Wa["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(n){return"ltfmrFundingAmount"===n.value?"capital"!==e.plan.financialInfo.typeOfPlan.name.toLowerCase():n})).filter((function(n){return"capitalFundingAmount"===n.value?"ltfm"!==e.plan.financialInfo.typeOfPlan.name.toLowerCase():n})):[]}}},zr=Gr,Qr=Object(S["a"])(zr,Mr,Yr,!1,null,null,null),Hr=Qr.exports,Wr=(t("07ac"),t("c9d1")),Jr=t.n(Wr),Xr={data:function(){return{flagFilterModel:[],flagRequestList:{}}},computed:{},methods:{onFlagFilter:function(e,n){if(e&&"function"===typeof n){var t=[];2===this.flagFilterModel.length?t=[!0,!1]:"Marked"===this.flagFilterModel[0]?t=[!0]:"Unmarked"===this.flagFilterModel[0]&&(t=[!1]),e.value=t,n(e)}},onFlagClick:function(e){var n=this;e&&e.id&&(e.flag=!e.flag,this.flagRequestList[e.id]=e,clearTimeout(this.changeFLagTimeout),this.changeFLagTimeout=setTimeout((function(){n.changeFlag()}),400))},changeFlag:function(){var e=this,n=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:Jr.a,variables:{input:n}}).catch((function(n){e.error=n})).finally((function(){e.flagRequestList={}}))}}},Zr={name:"PlanInfo",components:{Btn:te["a"],ExpansionPanelHeader:Ha["a"],DefinitionList:Wa["a"],DataTable:$e["a"],PlanFinancialInfo:Hr},mixins:[Xr],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:"Link to Plan Photos",value:"photosLink",type:"link"},{label:"Plan Notes",value:"description",type:"longstring"}]}},computed:{displayedItems:function(){var e=this;return this.plan&&this.components?this.components.map((function(n){var t=kn(n,e.plan);return Object(m["a"])(Object(m["a"])({},n),{},{facilityName:n.facility&&n.facility.name||"",systemName:n.system&&n.system.name||"",componentName:n.component&&n.component.name||"",unitName:n.unit&&n.unit.name||"",conditionName:n.conditionAssessment&&n.conditionAssessment.name||"",fundingSourceName:n.fundingSource&&n.fundingSource.name||""},t)})):[]},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"}]}}},Kr=Zr,el=(t("b401"),t("9e88")),nl=Object(S["a"])(Kr,qr,Br,!1,null,"3d04f943",null),tl=nl.exports;N()(nl,{VCol:sn["a"],VExpansionPanel:ao["a"],VExpansionPanelContent:oo["a"],VExpansionPanels:ro["a"],VIcon:_["a"],VRow:ce["a"],VSelect:yi["a"],VSimpleCheckbox:el["a"]});var il,al=t("9cca"),ol=t.n(al),rl={OPEN:"open",COMPLETED:"completed"},ll=(il={},Object(en["a"])(il,rl.OPEN,"Open"),Object(en["a"])(il,rl.COMPLETED,"Completed"),il),sl={name:"Plan",components:{PlanInfo:tl,Breadcrumbs:Ho,Btn:te["a"]},props:{planId:{type:Number|String}},apollo:{currentUser:{query:k.a,fetchPolicy:"cache-only"},plan:{query:Ur.a,variables:function(){return{id:this.planId}},error:function(e){this.error=e}},componentsOfNeed:{query:ol.a,variables:function(){return{planId:this.planId||null,status:rl.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(y["a"])(f["c"].EDIT_PLAN,this.currentUser)},breadcrumbs:function(){return[{text:"Clients",to:{name:"clients"},permission:f["c"].VIEW_CLIENTS}].concat(Object(Ei["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}])}}},cl=sl,dl=Object(S["a"])(cl,Lr,Vr,!1,null,null,null),ul=dl.exports;N()(dl,{VCol:sn["a"],VRow:ce["a"]});var ml={name:"PlanDetails",components:{Plan:ul}},fl=ml,pl=Object(S["a"])(fl,$r,jr,!1,null,null,null),vl=pl.exports,hl=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{staticClass:"add-plan"},[t("plan",{attrs:{clientId:e.$route.params.clientId}})],1)},kl=[],yl=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("fragment",[t("v-row",{staticClass:"mb-6"},[e.loading?e._e():t("alert",{attrs:{error:e.error}}),t("v-col",[t("breadcrumbs",{attrs:{items:e.breadcrumbs}})],1)],1),t("plan-form",{attrs:{plan:e.plan,"readonly-fields":e.readonlyFields},on:{submit:e.onSubmit}})],1)},bl=[],gl=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("stepper",{model:{value:e.step,callback:function(n){e.step=n},expression:"step"}},[t("v-stepper-header",[t("stepper-step",{attrs:{step:"1",editable:!e.lock}},[e._v(" General Information ")]),t("v-divider"),t("stepper-step",{attrs:{editable:e.lastCompleted>=1&&!e.lock,step:"2"}},[e._v(" Financial Information ")]),t("v-divider"),t("stepper-step",{attrs:{editable:e.lastCompleted>=2&&!e.lock,step:"3"}},[e._v(" Components of needs ")])],1),t("v-stepper-items",{attrs:{flat:""}},[t("v-stepper-content",{attrs:{step:"1"}},[t("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),t("v-stepper-content",{attrs:{step:"2"}},[t("plan-financial-info-form",{attrs:{plan:e.plan,loading:e.loading,active:"2"===e.step.toString(),"readonly-fields":e.readonlyFields},on:{back:function(n){e.step=1},submit:e.onUpdateFinancialInfo,change:e.onChangeFinancialInfo,reset:e.onResetChangesFinancialInfo}})],1),t("v-stepper-content",{attrs:{step:"3"}},[t("components",{attrs:{plan:e.plan},on:{back:function(n){e.step=2}}})],1)],1)],1)},Sl=[],Cl=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("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(n){return n.preventDefault(),e.onSubmit(n)}}},[e.loading?e._e():t("alert",{attrs:{error:e.error}}),e.loading?t("v-row",{attrs:{"no-gutters":"",justify:"center"}},[t("v-progress-circular",{attrs:{indeterminate:"",color:"#8C8C8C"}})],1):e._e(),e.form?t("v-row",{attrs:{"no-gutters":""}},[t("v-col",{staticClass:"col"},[t("v-text-field",{attrs:{label:"Plan Name",autofocus:"",autocomplete:"off",rules:e.nameRules,required:""},on:{input:function(n){return e.onChange("name",e.form.name)}},model:{value:e.form.name,callback:function(n){e.$set(e.form,"name",n)},expression:"form.name"}}),t("v-text-field",{staticClass:"mt-1",attrs:{label:"ICS Project Number",autocomplete:"off"},on:{input:function(n){return e.onChange("icsProjectNumber",e.form.icsProjectNumber)}},model:{value:e.form.icsProjectNumber,callback:function(n){e.$set(e.form,"icsProjectNumber",n)},expression:"form.icsProjectNumber"}}),t("date-picker",{staticClass:"mt-1",attrs:{label:"Date of Plan Creation",rules:e.dateOfCreationRules,required:"",autocomplete:"off","validate-on-blur":""},on:{change:function(n){return e.onChange("dateOfCreation",e.form.dateOfCreation)}},model:{value:e.form.dateOfCreation,callback:function(n){e.$set(e.form,"dateOfCreation",n)},expression:"form.dateOfCreation"}}),t("date-picker",{staticClass:"mt-1",attrs:{label:"Date of Assessment",autocomplete:"off"},on:{input:function(n){return e.onChange("dateOfAssessment",e.form.dateOfAssessment)}},model:{value:e.form.dateOfAssessment,callback:function(n){e.$set(e.form,"dateOfAssessment",n)},expression:"form.dateOfAssessment"}}),t("v-text-field",{staticClass:"mt-1",attrs:{label:"Link to Plan Photos",autocomplete:"off","validate-on-blur":""},on:{input:function(n){return e.onChange("photosLink",e.form.photosLink)}},model:{value:e.form.photosLink,callback:function(n){e.$set(e.form,"photosLink",n)},expression:"form.photosLink"}}),t("v-textarea",{staticClass:"mt-1",attrs:{rows:"1","auto-grow":"",label:"Plan Notes",autocomplete:"off","validate-on-blur":""},on:{input:function(n){return e.onChange("description",e.form.description)}},model:{value:e.form.description,callback:function(n){e.$set(e.form,"description",n)},expression:"form.description"}})],1)],1):e._e(),t("div",{staticClass:"mt-8 btns-bar"},[t("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")]),t("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)},Nl=[],_l=t("40a5"),wl=t("358f"),El=t.n(wl),Ol=t("169a"),Fl=t.n(Ol),xl=t("54fc"),Il=function(e,n){return Object.keys(e).reduce((function(e,t){return Object(m["a"])(Object(m["a"])({},e),{},Object(en["a"])({},t,void 0!==n[t]?n[t]:null))}),{})},Tl={name:"PlanGeneralInfoForm",components:{Btn:te["a"],DatePicker:_l["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},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=Il(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,n){this.plan&&Object(ri["isEqual"])(this.plan[e],n)?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,n=e.name,t=e.icsProjectNumber,i=e.dateOfCreation,a=e.dateOfAssessment,o=e.photosLink,r=e.description,l={name:n,icsProjectNumber:t,dateOfCreation:Object(xl["b"])(i),dateOfAssessment:Object(xl["b"])(a),photosLink:o,description:r};this.plan.id?this.updatePlan(Object(m["a"])(Object(m["a"])({},l),{},{id:this.plan.id})):this.addPlan(Object(m["a"])(Object(m["a"])({},l),{},{clientId:this.plan.client.id}))}else this.validate()&&0===this.changes.size&&this.$emit("submit",this.plan)},onReset:function(){this.form=Il(this.form,this.plan),this.error=null,this.$refs.form.resetValidation(),this.changes.clear(),this.$emit("reset")},addPlan:function(e){var n=this;this.internalLoading=!0,this.$apollo.mutate({mutation:El.a,variables:{input:e}}).then((function(e){var t=e.data.createPlan;Qe["a"].$emit("show-snackbar",{color:"success",text:"Plan was added successfully!"}),n.$emit("submit",t)})).catch((function(e){n.error=e})).finally((function(){n.internalLoading=!1}))},updatePlan:function(e){var n=this;this.internalLoading=!0,this.$apollo.mutate({mutation:Fl.a,variables:{input:e}}).then((function(e){var t=e.data.updatePlan;Qe["a"].$emit("show-snackbar",{color:"success",text:"Plan was updated successfully!"}),n.$emit("submit",t)})).catch((function(e){n.error=e})).finally((function(){n.internalLoading=!1}))}}},Dl=Tl,Al=(t("e1b0"),Object(S["a"])(Dl,Cl,Nl,!1,null,"5447d6b8",null)),Pl=Al.exports;N()(Al,{VCol:sn["a"],VForm:se["a"],VProgressCircular:Cn["a"],VRow:ce["a"],VTextField:de["a"],VTextarea:bi["a"]});var $l=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("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(n){return n.preventDefault(),e.onSubmit(n)}}},[e.loading?e._e():t("alert",{attrs:{error:e.error}}),e.loading?t("v-row",{attrs:{"no-gutters":"",justify:"center"}},[t("v-progress-circular",{attrs:{indeterminate:"",color:"#8C8C8C"}})],1):e._e(),e.form?t("v-row",{attrs:{"no-gutters":""}},[t("v-col",{staticClass:"column"},[t("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(n){return e.form.typeOfPlan=e.planTypes.find((function(e){return e.name===n}))},change:function(n){return e.onChange("typeOfPlan",e.form.typeOfPlan)}},model:{value:e.form.typeOfPlan,callback:function(n){e.$set(e.form,"typeOfPlan",n)},expression:"form.typeOfPlan"}}),e.showLtfmFundingAmount?t("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(n){return e.onChange("ltfmrFundingAmount",e.form.ltfmrFundingAmount)}},model:{value:e.form.ltfmrFundingAmount,callback:function(n){e.$set(e.form,"ltfmrFundingAmount",e._n(n))},expression:"form.ltfmrFundingAmount"}}):e._e(),e.showCapitalFundingAmount?t("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(n){return e.onChange("capitalFundingAmount",e.form.capitalFundingAmount)}},model:{value:e.form.capitalFundingAmount,callback:function(n){e.$set(e.form,"capitalFundingAmount",e._n(n))},expression:"form.capitalFundingAmount"}}):e._e(),t("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(n){return e.onChange("capitalInfusionAmount",e.form.capitalInfusionAmount)}},model:{value:e.form.capitalInfusionAmount,callback:function(n){e.$set(e.form,"capitalInfusionAmount",e._n(n))},expression:"form.capitalInfusionAmount"}}),t("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(n){return e.onChange("capitalInfusionYear",e.form.capitalInfusionYear)}},model:{value:e.form.capitalInfusionYear,callback:function(n){e.$set(e.form,"capitalInfusionYear",n)},expression:"form.capitalInfusionYear"}}),t("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(n){return e.onChange("planStartYear",e.form.planStartYear)}},model:{value:e.form.planStartYear,callback:function(n){e.$set(e.form,"planStartYear",n)},expression:"form.planStartYear"}})],1),t("v-col",{staticClass:"column",attrs:{offset:"1"}},[t("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(n){return e.onChange("regionalCost",e.form.regionalCost)}},model:{value:e.form.regionalCost,callback:function(n){e.$set(e.form,"regionalCost",e._n(n))},expression:"form.regionalCost"}}),t("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(n){return e.onChange("fundingEscalation",e.form.fundingEscalation)}},model:{value:e.form.fundingEscalation,callback:function(n){e.$set(e.form,"fundingEscalation",e._n(n))},expression:"form.fundingEscalation"}}),t("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(n){return e.onChange("inflationCostEscalation",e.form.inflationCostEscalation)}},model:{value:e.form.inflationCostEscalation,callback:function(n){e.$set(e.form,"inflationCostEscalation",e._n(n))},expression:"form.inflationCostEscalation"}}),t("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(n){return e.onChange("softCostPercentage",e.form.softCostPercentage)}},model:{value:e.form.softCostPercentage,callback:function(n){e.$set(e.form,"softCostPercentage",e._n(n))},expression:"form.softCostPercentage"}})],1)],1):e._e(),t("v-row",{staticClass:"mt-8",attrs:{"no-gutters":"",justify:"end"}},[t("v-col",{attrs:{"justify-self":"start"}},[t("btn",{attrs:{width:"100","color-type":"accent",disabled:e.changes.size>0},on:{click:e.onBackClick}},[e._v("Back")])],1),t("v-col",{attrs:{cols:"auto"}},[t("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")]),t("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)},jl=[],Ll=t("134d"),Vl=t.n(Ll),Rl=t("f870"),Ul=t.n(Rl),ql=t("3e74"),Bl=t.n(ql),Ml=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=[],a=e;a<=n;a+=t)i.push(a.toString());return i},Yl=function(e,n){return Object.keys(e).reduce((function(e,t){return Object(m["a"])(Object(m["a"])({},e),{},Object(en["a"])({},t,null!==n&&void 0!==n[t]?n[t]:null))}),{})},Gl={name:"PlanFinancialInfoForm",components:{Btn:te["a"],DatePicker:_l["a"],NumberTextField:pi["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:Vl.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"])({},oe["a"]),{},{form:{typeOfPlan:null,ltfmrFundingAmount:null,capitalFundingAmount:null,capitalInfusionAmount:null,capitalInfusionYear:null,planStartYear:null,regionalCost:null,fundingEscalation:null,inflationCostEscalation:null,softCostPercentage:null},years:Ml((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"},oe["a"].numberInRange(0,200),oe["a"].integerNumber],fundingEscalationRules:[function(e){return null!==e&&""!==e||"Funding Escalation is Required"},oe["a"].numberInRange(0,100),oe["a"].floatNumber(1)],inflationCostEscalationRules:[function(e){return null!==e&&""!==e||"Inflation cost escalation"},oe["a"].numberInRange(0,100),oe["a"].floatNumber(1)],softCostPercentageRules:[function(e){return null!==e&&""!==e||"Soft Cost Percentage is Required"},oe["a"].numberInRange(0,100),oe["a"].floatNumber(1)],internalLoading:!1,error:null,changes:new Set})},watch:{plan:{immediate:!0,handler:function(e){null!==e&&(this.error=null,this.form=Yl(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,n){null!==n&&e.id!==n.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,n){this.plan&&this.plan.financialInfo&&Object(ri["isEqual"])(this.plan.financialInfo[e],n)?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,n=e.typeOfPlan,t=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:n&&n.id||null,ltfmrFundingAmount:t,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=Yl(this.form,this.plan.financialInfo),this.error=null,this.$refs.form.resetValidation(),this.changes.clear(),this.$emit("reset")},addFinancialInfo:function(e){var n=this;this.internalLoading=!0,this.$apollo.mutate({mutation:Ul.a,variables:{input:e}}).then((function(e){var t=e.data.addFinancialInfo;Qe["a"].$emit("show-snackbar",{color:"success",text:"Financial info was added successfully!"}),n.$emit("submit",Object(m["a"])(Object(m["a"])({},n.plan),{},{financialInfo:t}))})).catch((function(e){n.error=e})).finally((function(){n.internalLoading=!1}))},updateFinancialInfo:function(e){var n=this;this.internalLoading=!0,this.$apollo.mutate({mutation:Bl.a,variables:{input:e}}).then((function(e){var t=e.data.updateFinancialInfo;Qe["a"].$emit("show-snackbar",{color:"success",text:"Financial info was updated successfully!"}),n.$emit("submit",Object(m["a"])(Object(m["a"])({},n.plan),{},{financialInfo:t}))})).catch((function(e){n.error=e})).finally((function(){n.internalLoading=!1}))}}},zl=Gl,Ql=(t("e6fe"),Object(S["a"])(zl,$l,jl,!1,null,"c3366c70",null)),Hl=Ql.exports;N()(Ql,{VCol:sn["a"],VForm:se["a"],VProgressCircular:Cn["a"],VRow:ce["a"],VSelect:yi["a"]});var Wl=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",[t("v-tabs",{attrs:{"hide-slider":"","show-arrows":"","next-icon":"fa-chevron-right","prev-icon":"fa-chevron-left"},model:{value:e.tab,callback:function(n){e.tab=n},expression:"tab"}},[t("v-tab",{key:0,staticClass:"tab",attrs:{"active-class":"active",ripple:!1}},[e._v(" Plan Components ")]),t("v-tab",{key:1,staticClass:"tab",attrs:{"active-class":"active",ripple:!1}},[e._v(" Completed Components ")])],1),t("v-tabs-items",{model:{value:e.tab,callback:function(n){e.tab=n},expression:"tab"}},[t("v-tab-item",{key:0},[t("active-components",{staticClass:"mt-6",attrs:{plan:e.plan}})],1),t("v-tab-item",{key:1},[t("completed-components",{staticClass:"mt-6",attrs:{plan:e.plan}})],1)],1),t("v-row",{staticClass:"mt-12",attrs:{"no-gutters":"",justify:"end"}},[t("v-col",{attrs:{"justify-self":"start"}},[t("btn",{attrs:{width:"100","color-type":"accent"},on:{click:e.onBackClick}},[e._v("Back")])],1),t("v-col",{attrs:{cols:"auto"}},[t("budget-planning",{attrs:{plan:e.plan}})],1),t("v-col",{attrs:{cols:"auto"}},[t("btn",{staticClass:"ml-6",attrs:{width:"100",link:"",to:{name:"plans"},"color-type":"accent"}},[e._v("Done")])],1)],1)],1)},Jl=[],Xl=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-row",{staticClass:"mb-6",attrs:{"no-gutters":""}},[t("alert",{attrs:{error:e.error}}),t("component-list",{attrs:{plan:e.plan,loading:e.loading,components:e.componentsOfNeed||[]}})],1)},Zl=[],Kl=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("data-table",{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(n){var i=n.item;return[t("div",{staticClass:"table-actions-bar"},[e.showDeleteBtn?t("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(n){var i=n.on,a=n.attrs;return[t("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)]}}])})},es=[],ns=t("f8fb"),ts=t.n(ns),is=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("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(n){var i=n.mutate,a=n.loading,o=n.error;return[a?e._e():t("alert",{attrs:{align:"center",error:o}}),t("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))},as=[],os=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-form",{ref:"form",staticClass:"component-form",attrs:{"lazy-validation":"","aria-busy":e.loading,disabled:e.loading,autocomplete:"off"},on:{submit:function(n){return n.preventDefault(),e.onSubmit(n)}}},[t("v-row",{attrs:{"no-gutters":"",justify:"center"}},[t("v-col",{attrs:{cols:"3"}},[t("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(n){return e.component.facility=e.client.facilities.find((function(e){return e.name===n}))}},model:{value:e.component.facility,callback:function(n){e.$set(e.component,"facility",n)},expression:"component.facility"}}),t("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(n){return e.component.system=e.displayedSystems.find((function(e){return e.name===n}))}},model:{value:e.component.system,callback:function(n){e.$set(e.component,"system",n)},expression:"component.system"}}),t("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(n){return e.component.component=e.components.find((function(e){return e.name===n}))}},model:{value:e.component.component,callback:function(n){e.$set(e.component,"component",n)},expression:"component.component"}}),t("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(n){var t=n.item;return[e._v(" "+e._s(t.name)+" ")]}},{key:"selection",fn:function(n){var t=n.item;return[e._v(" "+e._s(t.name)+" ")]}}]),model:{value:e.component.status,callback:function(n){e.$set(e.component,"status",n)},expression:"component.status"}}),e.isCompleted?t("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(n){e.$set(e.component,"yearCompleted",n)},expression:"component.yearCompleted"}}):e._e(),e.isCompleted?t("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(n){e.$set(e.component,"actualCost",e._n(n))},expression:"component.actualCost"}}):e._e(),e.isCompleted?t("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(n){e.$set(e.component,"componentNotes",n)},expression:"component.componentNotes"}}):e._e(),t("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(n){e.$set(e.component,"description",n)},expression:"component.description"}}),t("upload",{staticClass:"mt-4",attrs:{placeholder:"Upload component photo",accept:".pdf,image/*"},model:{value:e.upload,callback:function(n){e.upload=n},expression:"upload"}})],1),t("v-col",{attrs:{cols:"3",offset:"1"}},[t("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(n){e.$set(e.component,"yearForImprovement",n)},expression:"component.yearForImprovement"}}),t("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(n){e.$set(e.component,"quantityOfComponents",e._n(n))},expression:"component.quantityOfComponents"}}),t("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(n){return e.component.unit=e.units.find((function(e){return e.name===n}))}},model:{value:e.component.unit,callback:function(n){e.$set(e.component,"unit",n)},expression:"component.unit"}}),t("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(n){e.$set(e.component,"costPerUnit",e._n(n))},expression:"component.costPerUnit"}}),t("v-text-field",{staticClass:"mt-1",attrs:{label:"Base amount",prefix:"$",readonly:""},model:{value:e.baseAmount,callback:function(n){e.baseAmount=n},expression:"baseAmount"}}),t("v-text-field",{staticClass:"mt-1",attrs:{label:"Component Subtotal",prefix:"$",readonly:""},model:{value:e.componentSubtotal,callback:function(n){e.componentSubtotal=n},expression:"componentSubtotal"}}),t("v-text-field",{staticClass:"mt-1",attrs:{label:"Budget amount",prefix:"$",readonly:""},model:{value:e.budgetAmount,callback:function(n){e.budgetAmount=n},expression:"budgetAmount"}})],1),t("v-col",{attrs:{cols:"3",offset:"1"}},[t("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(n){return e.component.conditionAssessment=e.conditionAssessment.find((function(e){return e.name===n}))}},model:{value:e.component.conditionAssessment,callback:function(n){e.$set(e.component,"conditionAssessment",n)},expression:"component.conditionAssessment"}}),t("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(n){e.$set(e.component,"locationOfComponent",n)},expression:"component.locationOfComponent"}}),t("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(n){return e.component.fundingSource=e.fundingSource.find((function(e){return e.name===n}))}},scopedSlots:e._u([{key:"append-item",fn:function(){return[t("div",{staticClass:"add-source"},[t("btn",{staticClass:"add-source__btn",on:{click:e.openSourceModal}},[t("span",{staticClass:"add-source__plus"},[e._v("+")]),e._v(" Source")])],1)]},proxy:!0}]),model:{value:e.component.fundingSource,callback:function(n){e.$set(e.component,"fundingSource",n)},expression:"component.fundingSource"}}),t("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(n){e.$set(e.component,"budgetaryNotes",n)},expression:"component.budgetaryNotes"}}),t("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(n){e.$set(e.component,"internalNotes",n)},expression:"component.internalNotes"}}),t("v-checkbox",{staticClass:"mt-1",attrs:{label:"Soft Cost",readonly:e.readonlyFields&&e.readonlyFields.includes("softCost")},model:{value:e.component.softCost,callback:function(n){e.$set(e.component,"softCost",n)},expression:"component.softCost"}}),t("v-checkbox",{staticClass:"mt-1",attrs:{label:"Mark for Review",readonly:e.readonlyFields&&e.readonlyFields.includes("flag")},model:{value:e.component.flag,callback:function(n){e.$set(e.component,"flag",n)},expression:"component.flag"}})],1)],1),t("div",{staticClass:"mt-8 btns-bar"},[t("btn",{attrs:{type:"submit",width:"300",disabled:e.loading}},[e._v(e._s(e.btnLabel))])],1),t("modal",{ref:"source_modal",attrs:{title:"Add Funding Source",width:"290px"},scopedSlots:e._u([{key:"default",fn:function(n){var i=n.close;return[t("div",{staticClass:"row",staticStyle:{width:"100%"}},[t("v-text-field",{attrs:{label:"Source name",autocomplete:"off",required:"",rules:e.fundingSourceNameRules,"validate-on-blur":""},model:{value:e.newSourceName,callback:function(n){e.newSourceName=n},expression:"newSourceName"}})],1),t("div",{staticClass:"row"},[t("btn",{staticClass:"mt-3",on:{click:function(n){return e.addSource(i)}}},[e._v("Add new Source")])],1)]}}])})],1)},rs=[],ls=t("8ca5"),ss=t.n(ls),cs=t("b8ea"),ds=t.n(cs),us=t("c899"),ms=t.n(us),fs=t("9a28"),ps=t.n(fs),vs=t("4910"),hs=t.n(vs),ks=t("9f02"),ys={name:"ComponentForm",components:{Btn:te["a"],NumberTextField:pi["a"],Upload:fi,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:ss.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:ms.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: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 funding source list."}):e}}},data:function(e){var n=e.plan&&e.plan.financialInfo&&parseInt(e.plan.financialInfo.planStartYear),t=n?Ml(n,n+19):[],i=e.component&&e.component.componentUrl?new File([""],e.component.componentUrl,{type:"image/plain"}):null;return Object(m["a"])(Object(m["a"])({},oe["a"]),{},{systems:[],statuses:[{name:ll[rl.OPEN],value:rl.OPEN},{name:ll[rl.COMPLETED],value:rl.COMPLETED}],units:[],conditionAssessment:[],yearCompletedRules:[function(e){return null!==e&&""!==e||"Year completed is Required"}],years:t,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:[oe["a"].positiveNumber,oe["a"].floatNumber(2)],costRules:[function(e){return null!==e&&""!==e||"Cost is Required"},oe["a"].positiveNumber,oe["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(an["a"]):[]},components:function(){var e=this,n=this.component.system&&this.displayedSystems.find((function(n){return n.id===e.component.system.id})),t=n&&n.components||[];return t.sort(an["a"])},isCompleted:function(){return this.component.status===rl.COMPLETED},baseAmount:function(){var e=this.component,n=e.quantityOfComponents,t=e.costPerUnit;return fn(n,t,this.plan.financialInfo.regionalCost)},componentSubtotal:function(){var e=this.plan.financialInfo,n=e.planStartYear,t=e.inflationCostEscalation;return pn(this.baseAmount,n,this.component.yearForImprovement,t)},budgetAmount:function(){return vn(this.componentSubtotal,this.plan.financialInfo.softCostPercentage,this.component.softCost)},facilities:function(){return this.client&&Array.isArray(this.client.facilities)&&this.client.facilities.sort(an["a"])},conditionByLabel:function(){return this.conditionAssessment.reduce((function(e,n){return e[n.name]=n,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 n=this;e&&this.plan.financialInfo.typeOfPlan&&null===this.component.fundingSource&&(this.component.fundingSource=e.find((function(e){return n.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 n,t=this;(this.validate(),this.newSourceName)&&this.$apollo.mutate({mutation:hs.a,variables:{input:{name:this.newSourceName}},update:function(e,t){var i=t.data.addFundingSource;if(i){n=i;var a=e.readQuery({query:ps.a});Array.isArray(a["fundingSource"])&&(a["fundingSource"].push(i),a["fundingSource"].sort(an["a"]),e.writeQuery({query:ps.a,data:a}))}}}).then((function(){Qe["a"].$emit("show-snackbar",{color:"success",text:'Funding Source "'.concat(t.newSourceName,'" is created!')}),t.component.fundingSource=n,t.newSourceName="","function"===typeof e&&e()})).catch((function(e){Qe["a"].$emit("show-snackbar",{color:"error",text:Object(ks["a"])(e.message)}),console.warn("Add Funding Source error",e)}))},onYearForImprovementChange:function(e){var n=Number(e);if(n){var t=n-(new Date).getFullYear();switch(!0){case t<3:this.conditionByLabel["Poor"]&&(this.component.conditionAssessment=this.conditionByLabel["Poor"]);break;case t<7:this.conditionByLabel["Fair"]&&(this.component.conditionAssessment=this.conditionByLabel["Fair"]);break;case t<20:this.conditionByLabel["Good"]&&(this.component.conditionAssessment=this.conditionByLabel["Good"]);break}}}}},bs=ys,gs=(t("fc4b"),Object(S["a"])(bs,os,rs,!1,null,null,null)),Ss=gs.exports;N()(gs,{VCheckbox:ln["a"],VCol:sn["a"],VForm:se["a"],VRow:ce["a"],VSelect:yi["a"],VTextField:de["a"],VTextarea:bi["a"]});var Cs=t("7eca"),Ns=t.n(Cs),_s={name:"EditComponent",components:{ComponentForm:Ss},props:{plan:{type:Object,default:null},data:{type:Object,default:null}},data:function(){return{UPDATE_COMPONENT_OF_NEED_MUTATION:Ns.a,component:this.data&&Object(m["a"])(Object(m["a"])({},this.data),{},{componentFile:null})||{system:null,facility:null,component:null,status:rl.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,n){var t=n.data.updateComponentOfNeed;if(t){if(t.status===rl.COMPLETED){var i=e.readQuery({query:ol.a,variables:{planId:this.plan.id,status:rl.OPEN}});i&&(i.componentsOfNeed=i.componentsOfNeed.filter((function(e){return e.id!==t.id})),e.writeQuery({query:ol.a,variables:{planId:this.plan.id,status:rl.OPEN},data:i}))}try{var a=e.readQuery({query:ol.a,variables:{planId:this.plan.id,status:t.status}});if(a){var o=a.componentsOfNeed.findIndex((function(e){return e.id===t.id}));-1!==o?(a.componentsOfNeed[o]=t,a.componentsOfNeed=Object(Ei["a"])(a.componentsOfNeed)):a.componentsOfNeed.unshift(t),e.writeQuery({query:ol.a,variables:{planId:this.plan.id,status:t.status},data:a})}}catch(r){}Qe["a"].$emit("show-snackbar",{color:"success",text:"Component was updated successfully!"})}else Qe["a"].$emit("show-snackbar",{color:"error",text:"Error! Something went wrong... Please try later!"})}}},ws=_s,Es=(t("5d0e"),Object(S["a"])(ws,is,as,!1,null,null,null)),Os=Es.exports,Fs={name:"ComponentList",components:{Btn:te["a"],DataTable:$e["a"],ConfirmationModal:Ve["a"],Modal:Ie["a"],EditComponent:Os,ActionsMenu:Me},props:{plan:{type:Object,default:null},components:{type:Array,default:[]},loading:{type:Boolean}},apollo:{currentUser:{query:k.a,fetchPolicy:"cache-only"}},data:function(){return{DELETE_COMPLETED_COMPONENT_MUTATION:ts.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(n){var t=n.quantityOfComponents,i=n.costPerUnit,a=n.yearForImprovement,o=n.softCost,r=e.plan.financialInfo,l=r.regionalCost,s=r.planStartYear,c=r.inflationCostEscalation,d=r.softCostPercentage,u=fn(t,i,l),f=pn(u,s,a,c),p=vn(f,d,o);return Object(m["a"])(Object(m["a"])({},n),{},{facilityName:n.facility&&n.facility.name||"",componentName:n.component&&n.component.name||"",budgetAmount:p})})):[]},displayedHeaders:function(){var e=this;return this.headers.filter((function(n){return!n.permissions||n.permissions.some((function(n){return Object(y["a"])(n,e.currentUser)}))}))},showEditBtn:function(){return Object(y["a"])(f["c"].EDIT_PLAN_COMPONENT,this.currentUser)},showDeleteBtn:function(){return Object(y["a"])(f["c"].DELETE_PLAN_COMPONENT,this.currentUser)}},methods:{onDelete:function(e){var n=this;return function(t,i){var a=i.data.deleteComponentOfNeed;if(a){var o=t.readQuery({query:ol.a,variables:{planId:n.plan.id,status:e.status}});o.componentsOfNeed=o.componentsOfNeed.filter((function(n){return n.id!==e.id})),t.writeQuery({query:ol.a,variables:{planId:n.plan.id,status:e.status},data:o}),Qe["a"].$emit("show-snackbar",{color:"success",text:"Component was deleted successfully!"})}}}}},xs=Fs,Is=Object(S["a"])(xs,Kl,es,!1,null,null,null),Ts=Is.exports;N()(Is,{VIcon:_["a"]});var Ds={name:"CompletedComponents",components:{Btn:te["a"],Modal:Ie["a"],ComponentList:Ts},props:{plan:{type:Object,default:null}},apollo:{currentUser:{query:k.a,fetchPolicy:"cache-only"},componentsOfNeed:{query:ol.a,variables:function(){return{planId:this.plan&&this.plan.id||null,status:rl.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}}},As=Ds,Ps=Object(S["a"])(As,Xl,Zl,!1,null,null,null),$s=Ps.exports;N()(Ps,{VRow:ce["a"]});var js=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",[t("v-row",{staticClass:"mb-6",attrs:{"no-gutters":"",justify:"end"}},[t("budget-calculation-info"),t("data-table-columns",{attrs:{headers:e.headers,uId:e.TABLE_UID},model:{value:e.selectedHeaders,callback:function(n){e.selectedHeaders=n},expression:"selectedHeaders"}}),t("modal",{attrs:{title:"Add Component",width:"812px"},scopedSlots:e._u([{key:"activator",fn:function(n){var i=n.on,a=n.attrs;return[t("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(n){var i=n.close;return[t("add-component",{attrs:{plan:e.plan},on:{done:i}})]}}])})],1),t("v-row",{attrs:{"no-gutters":""}},[t("alert",{attrs:{error:e.error}}),t("component-list",{attrs:{plan:e.plan,loading:e.loading,components:e.components,"selected-headers":e.selectedHeaders},on:{initHeaders:e.onInitHeaders}})],1)],1)},Ls=[],Vs=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("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(n){var i=n.mutate,a=n.loading,o=n.error;return[a?e._e():t("alert",{attrs:{align:"center",error:o}}),t("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))},Rs=[],Us=t("894d"),qs=t.n(Us),Bs={name:"AddComponent",components:{ComponentForm:Ss},props:{plan:{type:Object,default:null}},data:function(){return{ADD_COMPONENT_OF_NEED_MUTATION:qs.a,component:{system:null,facility:null,component:null,status:rl.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,n){var t=n.data.addComponentOfNeed;if(t){var i=e.readQuery({query:ol.a,variables:{planId:this.plan.id,status:t.status}});i&&(i.componentsOfNeed.unshift(t),e.writeQuery({query:ol.a,variables:{planId:this.plan.id,status:t.status},data:i})),Qe["a"].$emit("show-snackbar",{color:"success",text:"Component was added successfully!"})}else Qe["a"].$emit("show-snackbar",{color:"error",text:"Error! Something went wrong... Please try later!"})}}},Ms=Bs,Ys=(t("36f4"),Object(S["a"])(Ms,Vs,Rs,!1,null,null,null)),Gs=Ys.exports,zs=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("data-table",{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(n){return e.$emit("filtered",n)}},scopedSlots:e._u([{key:"filter.flag",fn:function(n){var i=n.item,a=n.callback;return[t("div",{staticClass:"select-wrapper",staticStyle:{width:"97px"}},[t("v-select",{attrs:{outlined:"",dense:"",multiple:"","full-width":"","hide-details":"",clearable:"",items:["Marked","Unmarked"]},on:{change:function(n){return e.onFlagFilter(i,a)}},model:{value:e.flagFilterModel,callback:function(n){e.flagFilterModel=n},expression:"flagFilterModel"}})],1)]}},{key:"item.flag",fn:function(n){var i=n.item;return[t("div",{staticClass:"text-center"},[t("v-icon",{attrs:{color:e.$vuetify.theme.themes.light.accent},on:{click:function(n){return e.onFlagClick(i)}}},[e._v(e._s(i.flag?"fas":"far")+" fa-star")])],1)]}},{key:"item.softCost",fn:function(e){var n=e.item;return[t("v-simple-checkbox",{attrs:{value:n.softCost,ripple:!1,readonly:""}})]}},{key:"item.componentUrl",fn:function(n){var i=n.item;return[i.componentUrl?t("a",{attrs:{href:i.componentUrl,target:"_blank"}},[e._v("Link to Photo")]):e._e()]}},{key:"item.actions",fn:function(e){var n=e.item;return[t("actions-menu",{attrs:{actions:n.actions}})]}}])})},Qs=[],Hs=(t("caad"),t("2532"),t("b44d")),Ws=t.n(Hs),Js=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("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(n){var i=n.mutate,a=n.loading,o=n.error;return[a?e._e():t("alert",{attrs:{align:"center",error:o}}),t("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))},Xs=[],Zs=t("45ae"),Ks=t.n(Zs),ec=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-form",{ref:"form",staticClass:"complete-component-form",attrs:{"lazy-validation":"","aria-busy":e.loading,disabled:e.loading,autocomplete:"off"},on:{submit:function(n){return n.preventDefault(),e.onSubmit(n)}}},[t("v-row",{attrs:{"no-gutters":""}},[t("v-col",[t("v-select",{attrs:{items:e.years,rules:e.yearCompletedRules,label:"Year completed",required:""},model:{value:e.component.yearCompleted,callback:function(n){e.$set(e.component,"yearCompleted",n)},expression:"component.yearCompleted"}}),t("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(n){e.$set(e.component,"actualCost",e._n(n))},expression:"component.actualCost"}}),t("v-textarea",{staticClass:"mt-1",attrs:{rows:"1","auto-grow":"",label:"Notes of Component",autocomplete:"off"},model:{value:e.component.componentNotes,callback:function(n){e.$set(e.component,"componentNotes",n)},expression:"component.componentNotes"}})],1)],1),t("div",{staticClass:"mt-8 btns-bar"},[t("btn",{attrs:{type:"submit",width:"300",disabled:e.loading}},[e._v("Complete")])],1)],1)},nc=[],tc={name:"CompleteComponentForm",components:{Btn:te["a"],NumberTextField:pi["a"]},props:{loading:{type:Boolean,default:!1},component:{type:Object},plan:{type:Object}},data:function(e){var n=e.plan&&e.plan.financialInfo&&parseInt(e.plan.financialInfo.planStartYear),t=n?Ml(n,n+19):[];return Object(m["a"])(Object(m["a"])({},oe["a"]),{},{yearCompletedRules:[function(e){return null!==e&&""!==e||"Year completed is Required"}],years:t,actualCostRules:[oe["a"].positiveNumber,oe["a"].floatNumber(2)]})},methods:{validate:function(){return this.$refs.form.validate()},onSubmit:function(){this.validate()&&this.$emit("submit",this.component)}}},ic=tc,ac=(t("8295"),Object(S["a"])(ic,ec,nc,!1,null,null,null)),oc=ac.exports;N()(ac,{VCol:sn["a"],VForm:se["a"],VRow:ce["a"],VSelect:yi["a"],VTextField:de["a"],VTextarea:bi["a"]});var rc={name:"CompleteComponent",components:{CompleteComponentForm:oc},props:{plan:{type:Object,default:null},data:{type:Object,default:null}},data:function(e){return{COMPLETE_COMPONENT_OF_NEED_MUTATION:Ks.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,n){var t=n.data.completedComponentOfNeed;if(t){var i=e.readQuery({query:ol.a,variables:{planId:this.plan.id,status:rl.OPEN}});i&&(i.componentsOfNeed=i.componentsOfNeed.filter((function(e){return e.id!==t.id})),e.writeQuery({query:ol.a,variables:{planId:this.plan.id,status:rl.OPEN},data:i}));try{i=e.readQuery({query:ol.a,variables:{planId:this.plan.id,status:t.status}}),i&&(i.componentsOfNeed.unshift(t),e.writeQuery({query:ol.a,variables:{planId:this.plan.id,status:t.status},data:i}))}catch(a){}Qe["a"].$emit("show-snackbar",{color:"success",text:"Status of the component was changes successfully!"})}else Qe["a"].$emit("show-snackbar",{color:"error",text:"Error! Something went wrong... Please try later!"})}}},lc=rc,sc=(t("9392"),Object(S["a"])(lc,Js,Xs,!1,null,null,null)),cc=sc.exports,dc={name:"ComponentList",mixins:[Xr],components:{Btn:te["a"],DataTable:$e["a"],ConfirmationModal:Ve["a"],Modal:Ie["a"],EditComponent:Os,CompleteComponent:cc,ActionsMenu:Me},props:{plan:{type:Object,default:null},components:{type:Array,default:[]},selectedHeaders:{type:Array,default:[]},loading:{type:Boolean}},apollo:{currentUser:{query:k.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(n){var t=kn(n,e.plan);return Object(m["a"])(Object(m["a"])(Object(m["a"])({},n),{},{facilityName:n.facility&&n.facility.name||"",systemName:n.system&&n.system.name||"",componentName:n.component&&n.component.name||"",unitName:n.unit&&n.unit.name||"",conditionName:n.conditionAssessment&&n.conditionAssessment.name||"",fundingSourceName:n.fundingSource&&n.fundingSource.name||""},t),{},{actions:[Object(y["a"])(f["c"].EDIT_PLAN_COMPONENT,e.currentUser)&&{name:"Edit",modal:{type:"common",props:{title:"Edit Component",width:"812px"},content:{componentName:Os,props:{plan:e.plan,data:n}}}},Object(y["a"])(f["c"].EDIT_PLAN_COMPONENT,e.currentUser)&&{name:"Complete",modal:{type:"common",props:{title:"Complete Component",width:"480px"},content:{componentName:cc,props:{plan:e.plan,data:n}}}},Object(y["a"])(f["c"].EDIT_PLAN_COMPONENT,e.currentUser)&&{name:"Clone",modal:{props:{mutation:Ws.a,variables:{id:n.id},title:"Clone Component",message:"Are you sure you want to clone component?",okBtn:{label:"Clone"},update:e.onCloneComponent(n)}}},Object(y["a"])(f["c"].DELETE_PLAN_COMPONENT,e.currentUser)&&{name:"Delete",modal:{props:{mutation:ts.a,variables:{id:n.id},title:"Delete Component",message:"Are you sure you want to delete component?",okBtn:{label:"Delete"},update:e.onDelete(n)}}}]})})):[]},availableHeaders:function(){var e=this,n=this.headers.filter((function(n){return!n.permissions||n.permissions.some((function(n){return Object(y["a"])(n,e.currentUser)}))}));return this.$emit("initHeaders",n),n},displayedHeaders:function(){var e=this;return this.availableHeaders.filter((function(n,t){return e.selectedHeaders?e.selectedHeaders.includes(t):n}))},showEditBtn:function(){return Object(y["a"])(f["c"].EDIT_PLAN_COMPONENT,this.currentUser)},showDeleteBtn:function(){return Object(y["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(n,t){var i=t.data.cloneComponentOfNeed;if(i){var a=n.readQuery({query:ol.a,variables:{planId:e.plan.id,status:i.status}});a&&(a.componentsOfNeed.unshift(i),n.writeQuery({query:ol.a,variables:{planId:e.plan.id,status:i.status},data:a})),Qe["a"].$emit("show-snackbar",{color:"success",text:"Component was cloned successfully!"})}}},onDelete:function(e){var n=this;return function(t,i){var a=i.data.deleteComponentOfNeed;if(a){var o=t.readQuery({query:ol.a,variables:{planId:n.plan.id,status:e.status}});o&&(o.componentsOfNeed=o.componentsOfNeed.filter((function(n){return n.id!==e.id})),t.writeQuery({query:ol.a,variables:{planId:n.plan.id,status:e.status},data:o})),Qe["a"].$emit("show-snackbar",{color:"success",text:"Component was deleted successfully!"})}}}}},uc=dc,mc=Object(S["a"])(uc,zs,Qs,!1,null,null,null),fc=mc.exports;N()(mc,{VIcon:_["a"],VSelect:yi["a"],VSimpleCheckbox:el["a"]});var pc=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-menu",{attrs:{bottom:"","min-width":"150px","close-on-content-click":!1,rounded:"","offset-y":""},scopedSlots:e._u([{key:"activator",fn:function(n){var i=n.on;return[t("v-btn",e._g({staticClass:"menu-activator",attrs:{"color-type":"secondary",text:""}},i),[e._v(" Columns "),e.menuOpen?t("v-icon",{staticClass:"icon ml-2"},[e._v("fa-caret-up")]):t("v-icon",{staticClass:"icon ml-2"},[e._v("fa-caret-down")])],1)]}}]),model:{value:e.menuOpen,callback:function(n){e.menuOpen=n},expression:"menuOpen"}},[t("v-card",{staticClass:"headers-container"},[t("v-list",{staticClass:"headers",attrs:{dense:""}},[t("v-list-item-group",{attrs:{multiple:"","active-class":"header-active"},model:{value:e.selected,callback:function(n){e.selected=n},expression:"selected"}},[e._l(e.headers,(function(n,i){return[t("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[t("v-list-item-action",{staticClass:"header-selection"},[t("v-checkbox",{attrs:{dense:"","hide-details":"","input-value":a,tabindex:"0"}})],1),t("v-list-item-content",[t("v-list-item-title",[e._v(" "+e._s(n.text)+" ")])],1)]}}],null,!0)})]}))],2)],1)],1)],1)},vc=[],hc=t("3552"),kc={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 n=this;if(null===this.value&&e&&e.length>0){var t=e.map((function(e,n){return n}));if(this.uId){var i=Object(hc["b"])(this.uId);if(i){t=[];var a=i.every((function(i){var a=e.findIndex((function(e){return i.value===e.value}));return a>-1?t.push(a):(Object(hc["d"])(n.uId,void 0),t=[]),a>-1}));a||(Object(hc["d"])(this.uId,void 0),t=[])}}this.selected=t,this.$emit("change",t)}}},value:function(e){null!==e&&JSON.stringify(this.selected)!==JSON.stringify(e)&&(this.selected=e)},menuOpen:function(e){var n=this;if(!e&&JSON.stringify(this.selected)!==JSON.stringify(this.value)){if(this.uId){var t=this.selected.map((function(e){return n.headers[e]}));Object(hc["d"])(this.uId,t)}this.$emit("change",this.selected)}}},methods:{onModalClose:function(){this.menuOpen=!1}}},yc=kc,bc=(t("f85a"),Object(S["a"])(yc,pc,vc,!1,null,null,null)),gc=bc.exports;N()(bc,{VBtn:A["a"],VCard:ke["a"],VCheckbox:ln["a"],VIcon:_["a"],VList:w["a"],VListItem:E["a"],VListItemAction:cn["a"],VListItemContent:O["a"],VListItemGroup:dn["a"],VListItemTitle:O["b"],VMenu:qe["a"]});var Sc=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("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(n){var i=n.on,a=n.attrs;return[t("btn",e._b({attrs:{icon:"","color-type":"secondary"},on:{click:i.click}},"btn",a,!1),[t("v-icon",[e._v("fa-info-circle")])],1)]}}])},[t("dl",{staticClass:"budget-info"},[t("dd",[e._v("Base Amount")]),t("dt",[e._v("= Quantity x Costs per unit x Regional cost%")]),t("dd",[e._v("Component Subtotal")]),t("dt",[e._v("= Base amount x Inflation escalation%")]),t("dd",[e._v("Budget Amount")]),t("dt",[e._v("= Component Subtotal x (1+ Soft costs % )")])])])},Cc=[],Nc={name:"BudgetCalculationInfo",components:{Btn:te["a"]}},_c=Nc,wc=(t("4230"),Object(S["a"])(_c,Sc,Cc,!1,null,null,null)),Ec=wc.exports;N()(wc,{VIcon:_["a"],VTooltip:kt["a"]});var Oc="PLAN_ACTIVE_COMPONENTS",Fc={name:"ActiveComponents",components:{Btn:te["a"],Modal:Ie["a"],AddComponent:Gs,ComponentList:fc,DataTableColumns:gc,BudgetCalculationInfo:Ec},props:{plan:{type:Object}},apollo:{currentUser:{query:k.a,fetchPolicy:"cache-only"},componentsOfNeed:{query:ol.a,variables:function(){return{planId:this.plan&&this.plan.id||null,status:rl.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:Oc,currentUser:null,componentsOfNeed:null,error:null,headers:[],selectedHeaders:null}},computed:{loading:function(){return this.$apollo.queries.componentsOfNeed.loading},showAddComponentBtn:function(){return Object(y["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=Fc,Ic=Object(S["a"])(xc,js,Ls,!1,null,null,null),Tc=Ic.exports;N()(Ic,{VRow:ce["a"]});var Dc=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("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(n){var i=n.on,a=n.attrs;return[t("btn",e._g(e._b({attrs:{width:"180"}},"btn",a,!1),i),[e._v("Budget Planning")])]}},{key:"modal-header",fn:function(n){var i=n.close;return[t("v-row",{staticClass:"mt-3 mb-3",attrs:{"no-gutters":"",justify:"start"}},[t("h1",{staticClass:"mr-10"},[e._v(" Budget Planning / "),t("span",{on:{click:i}},[e._v(e._s(e.plan.name))])]),e.showGenerateReportBtn?t("modal",{attrs:{title:"Generate Report",width:"380px"},scopedSlots:e._u([{key:"activator",fn:function(n){var i=n.on,a=n.attrs;return[t("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(n){var i=n.close;return[t("components-report",{attrs:{plan:e.plan,components:e.reportComponents},on:{done:i}})]}}],null,!0)}):e._e(),t("modal",{attrs:{width:"500px","no-close":!0,persistent:!0},scopedSlots:e._u([{key:"activator",fn:function(n){var i=n.on,a=n.attrs;return[t("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[t("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(n){var i=n.close;return[t("div",{staticClass:"row mt-2"},[t("btn",{staticClass:"mr-6",on:{click:function(n){return e.onApplyToPlan(i)}}},[e._v("Yes")]),e._v(" "),t("btn",{on:{click:i}},[e._v("No")])],1)]}}],null,!0)}),t("modal",{ref:"confirm_modal",attrs:{width:"500px","no-close":!0,persistent:!0},scopedSlots:e._u([{key:"modal-header",fn:function(){return[t("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(n){var i=n.close;return[t("div",{staticClass:"row mt-2"},[t("btn",{staticClass:"mr-6",on:{click:e.closeBudgetPopup}},[e._v("Yes")]),e._v(" "),t("btn",{on:{click:i}},[e._v("No")])],1)]}}],null,!0)}),t("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(n){var i=n.close;return[t("div",{staticClass:"budget-planning mt-2",on:{done:i}},[t("alert",{attrs:{error:e.error}}),t("v-expansion-panels",{attrs:{flat:"",value:e.expanded,multiple:""}},[t("v-expansion-panel",[t("expansion-panel-header",[e._v(" Clients & Components Budget ")]),t("v-expansion-panel-content",[t("div",{staticClass:"budget-table-container"},[t("budget-table",{attrs:{components:e.components,changes:e.changes,plan:e.plan,loading:e.loading}})],1)])],1),t("v-expansion-panel",[t("expansion-panel-header",[e._v(" Financial Information ")]),t("v-expansion-panel-content",[e.plan&&e.plan.financialInfo?t("v-row",{attrs:{"no-gutters":""}},[t("v-col",{staticClass:"financial-info-details"},[t("plan-financial-info",{attrs:{plan:e.plan}})],1)],1):t("v-row",{attrs:{"no-gutters":""}},[e._v("No financial information")])],1)],1)],1),t("v-row",{staticClass:"mt-3",attrs:{"no-gutters":"",justify:"end"}},[t("modal",{attrs:{title:"Bulk year change",width:"380px"},scopedSlots:e._u([{key:"activator",fn:function(n){var i=n.on,a=n.attrs;return[t("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(n){var i=n.close;return[e._v("` "),t("v-select",{attrs:{items:e.years,label:"Year Set for Improvement",required:""},model:{value:e.selectedYear,callback:function(n){e.selectedYear=n},expression:"selectedYear"}}),t("btn",{attrs:{width:"200"},on:{click:function(n){e.bulkUpdateComponentsYear(e.selectedYear),i()}}},[e._v("Update components ")])]}}],null,!0)}),t("budget-calculation-info"),t("data-table-columns",{attrs:{headers:e.headers,uId:e.TABLE_UID},model:{value:e.selectedHeaders,callback:function(n){e.selectedHeaders=n},expression:"selectedHeaders"}})],1),t("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)]}}])})},Ac=[],Pc=t("3835"),$c=(t("4fad"),function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("data-table",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},"item-class":e.itemClass},scopedSlots:e._u([{key:"filter.flag",fn:function(n){var i=n.item,a=n.callback;return[t("div",{staticClass:"select-wrapper",staticStyle:{width:"97px"}},[t("v-select",{attrs:{outlined:"",dense:"",multiple:"","full-width":"","hide-details":"",clearable:"",items:["Marked","Unmarked"]},on:{change:function(n){return e.onFlagFilter(i,a)}},model:{value:e.flagFilterModel,callback:function(n){e.flagFilterModel=n},expression:"flagFilterModel"}})],1)]}},{key:"item.flag",fn:function(n){var i=n.item;return[t("div",{staticClass:"text-center"},[t("v-icon",{attrs:{color:e.$vuetify.theme.themes.light.accent},on:{click:function(n){return e.onFlagClick(i)}}},[e._v(e._s(i.flag?"fas":"far")+" fa-star")])],1)]}},e.readonly?null:{key:"item.yearForImprovement",fn:function(n){return[t("v-edit-dialog",{attrs:{large:""},on:{open:function(t){return e.onOpen(n.item,"yearForImprovement")},save:function(t){return e.onSave(n.item,"yearForImprovement")},close:function(t){return e.onClose(n.item)}},scopedSlots:e._u([{key:"input",fn:function(){return[e.editableField?t("v-form",{staticClass:"inline-editing-form",on:{submit:function(t){return t.preventDefault(),e.onSave(n.item,"yearForImprovement")}},model:{value:e.valid,callback:function(n){e.valid=n},expression:"valid"}},[t("v-select",{attrs:{items:e.years,label:"Edit Year Set for Improvement"},model:{value:e.editableField,callback:function(n){e.editableField=n},expression:"editableField"}})],1):e._e()]},proxy:!0}],null,!0)},[e._v(" "+e._s(n.item.yearForImprovement)+" ")])]}},e.readonly?null:{key:"item.unitName",fn:function(n){return[t("v-edit-dialog",{attrs:{large:""},on:{open:function(t){return e.onOpen(n.item,"unit")},save:function(t){return e.onSave(n.item,"unit")},close:function(t){return e.onClose(n.item)}},scopedSlots:e._u([{key:"input",fn:function(){return[e.editableField?t("v-form",{staticClass:"inline-editing-form",on:{submit:function(t){return t.preventDefault(),e.onSave(n.item,"unit")}},model:{value:e.valid,callback:function(n){e.valid=n},expression:"valid"}},[t("v-select",{attrs:{"item-text":"name",items:e.units,label:"Edit Unit"},on:{input:function(n){return e.editableField=e.units.find((function(e){return e.name===n}))}},model:{value:e.editableField,callback:function(n){e.editableField=n},expression:"editableField"}})],1):e._e()]},proxy:!0}],null,!0)},[e._v(" "+e._s(n.item.unit&&n.item.unit.name||"")+" ")])]}},e.readonly?null:{key:"item.conditionName",fn:function(n){return[t("v-edit-dialog",{attrs:{large:""},on:{open:function(t){return e.onOpen(n.item,"conditionAssessment")},save:function(t){return e.onSave(n.item,"conditionAssessment")},close:function(t){return e.onClose(n.item)}},scopedSlots:e._u([{key:"input",fn:function(){return[e.editableField?t("v-form",{staticClass:"inline-editing-form",on:{submit:function(t){return t.preventDefault(),e.onSave(n.item,"conditionAssessment")}},model:{value:e.valid,callback:function(n){e.valid=n},expression:"valid"}},[t("v-select",{attrs:{"item-text":"name",items:e.conditionAssessment,label:"Edit Condition"},on:{input:function(n){return e.editableField=e.conditionAssessment.find((function(e){return e.name===n}))}},model:{value:e.editableField,callback:function(n){e.editableField=n},expression:"editableField"}})],1):e._e()]},proxy:!0}],null,!0)},[e._v(" "+e._s(n.item.conditionAssessment&&n.item.conditionAssessment.name||"")+" ")])]}},e.readonly?null:{key:"item.fundingSourceName",fn:function(n){return[t("v-edit-dialog",{attrs:{large:""},on:{open:function(t){return e.onOpen(n.item,"fundingSource")},save:function(t){return e.onSave(n.item,"fundingSource")},close:function(t){return e.onClose(n.item)}},scopedSlots:e._u([{key:"input",fn:function(){return[e.editableField?t("v-form",{staticClass:"inline-editing-form",on:{submit:function(t){return t.preventDefault(),e.onSave(n.item,"fundingSource")}},model:{value:e.valid,callback:function(n){e.valid=n},expression:"valid"}},[t("v-select",{attrs:{"item-text":"name",items:e.fundingSource,label:"Edit Funding Source"},on:{input:function(n){return e.editableField=e.fundingSource.find((function(e){return e.name===n}))}},model:{value:e.editableField,callback:function(n){e.editableField=n},expression:"editableField"}})],1):e._e()]},proxy:!0}],null,!0)},[e._v(" "+e._s(n.item.fundingSource&&n.item.fundingSource.name||"")+" ")])]}},e.readonly?null:{key:"item.budgetaryNotes",fn:function(n){return[t("v-edit-dialog",{attrs:{large:"",eager:""},on:{save:function(t){return e.onSave(n.item,"budgetaryNotes")},open:function(t){return e.onOpen(n.item,"budgetaryNotes")},close:function(t){return e.onClose(n.item)}},scopedSlots:e._u([{key:"input",fn:function(){return[t("v-form",{staticClass:"inline-editing-longtext-form",model:{value:e.valid,callback:function(n){e.valid=n},expression:"valid"}},[t("v-textarea",{attrs:{label:"Edit Budgetary Notes",autofocus:"",autocomplete:"off"},model:{value:e.editableField,callback:function(n){e.editableField=n},expression:"editableField"}})],1)]},proxy:!0}],null,!0)},[t("truncated-text",{attrs:{text:n.item.budgetaryNotes}})],1)]}},e.readonly?null:{key:"item.quantityOfComponents",fn:function(n){return[t("v-edit-dialog",{attrs:{large:""},on:{open:function(t){return e.onOpen(n.item,"quantityOfComponents")},save:function(t){return e.onSave(n.item,"quantityOfComponents")},close:function(t){return e.onClose(n.item)}},scopedSlots:e._u([{key:"input",fn:function(){return[t("v-form",{staticClass:"inline-editing-form",on:{submit:function(t){return t.preventDefault(),e.onSave(n.item,"quantityOfComponents")}},model:{value:e.valid,callback:function(n){e.valid=n},expression:"valid"}},[t("number-text-field",{attrs:{rules:e.quantityOfComponentsRules,required:"",label:"Edit Quantity",autocomplete:"off"},model:{value:e.editableField,callback:function(n){e.editableField=e._n(n)},expression:"editableField"}})],1)]},proxy:!0}],null,!0)},[e._v(" "+e._s(e._f("number")(n.item.quantityOfComponents))+" ")])]}},e.readonly?null:{key:"item.costPerUnit",fn:function(n){return[t("v-edit-dialog",{attrs:{large:""},on:{open:function(t){return e.onOpen(n.item,"costPerUnit")},save:function(t){return e.onSave(n.item,"costPerUnit")},close:function(t){return e.onClose(n.item)}},scopedSlots:e._u([{key:"input",fn:function(){return[t("v-form",{staticClass:"inline-editing-form",on:{submit:function(t){return t.preventDefault(),e.onSave(n.item,"costPerUnit")}},model:{value:e.valid,callback:function(n){e.valid=n},expression:"valid"}},[t("number-text-field",{attrs:{rules:e.costRules,required:"",label:"Edit Cost Per Unit",autocomplete:"off"},model:{value:e.editableField,callback:function(n){e.editableField=e._n(n)},expression:"editableField"}})],1)]},proxy:!0}],null,!0)},[t("span",{staticClass:"currency-cell"},[e._v(e._s(e._f("currency")(n.item.costPerUnit)))])])]}},{key:"item.softCost",fn:function(n){var i=n.item;return[t("v-checkbox",{staticClass:"mt-0 pt-0",attrs:{"hide-details":"",ripple:!1},on:{change:function(n){return e.onSaveSoftCost(i)}},model:{value:i.softCost,callback:function(n){e.$set(i,"softCost",n)},expression:"item.softCost"}})]}},{key:"item.componentUrl",fn:function(n){var i=n.item;return[i.componentUrl?t("a",{attrs:{href:i.componentUrl,target:"_blank"}},[e._v("Link to Photo")]):e._e()]}},{key:"footer",fn:function(){return[t("v-row",{staticClass:"data-table-footer",attrs:{"no-gutters":"",justify:"end"}},[t("v-col",{staticClass:"budget-amount-label"},[e._v(e._s(e.footerLabel)+":")]),t("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(n){e.selectedState=n},expression:"selectedState"}},e.$listeners))}),jc=[],Lc={name:"ComponentList",components:{Btn:te["a"],DataTable:$e["a"],NumberTextField:pi["a"],TruncatedText:Oa["a"]},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:ss.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:ms.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: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 funding source list."}):e}}},data:function(e){var n=e.plan&&e.plan.financialInfo&&parseInt(e.plan.financialInfo.planStartYear),t=n?Ml(n,n+19):[];return{valid:!1,editableItem:null,editableField:null,costRules:[function(e){return null!==e&&""!==e||"Cost Per Unit is Required"},oe["a"].positiveNumber,oe["a"].floatNumber(2)],years:t,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(n){return Object(m["a"])(Object(m["a"])({},n),{},{facilityName:n.facility&&n.facility.name||"",systemName:n.system&&n.system.name||"",componentName:n.component&&n.component.name||"",unitName:n.unit&&n.unit.name||"",conditionName:n.conditionAssessment&&n.conditionAssessment.name||"",fundingSourceName:n.fundingSource&&n.fundingSource.name||""},kn(n,e.plan))})):[]},displayedHeaders:function(){var e=this;return this.headers.filter((function(n,t){return e.selectedHeaders?e.selectedHeaders.includes(t):n}))},selectedBudget:function(){return this.selected.length>0?this.selected.reduce((function(e,n){return e+n.budgetAmount}),0):this.filtered.length>0?this.filtered.reduce((function(e,n){return e+n.budgetAmount}),0):this.displayedItems?this.displayedItems.reduce((function(e,n){return e+n.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 n=this.changes.find((function(n){return n.id===e.id}));if(n)return"changed-row"},onSaveSoftCost:function(e){var n=kn(e,this.plan),t=n.baseAmount,i=n.componentSubtotal,a=n.budgetAmount;e.baseAmount=t,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,n){if(this.valid&&e[n]!==this.editableField){e[n]=this.editableField;var t=kn(e,this.plan),i=t.baseAmount,a=t.componentSubtotal,o=t.budgetAmount;switch(e.baseAmount=i,e.componentSubtotal=a,e.budgetAmount=o,n){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,n)}},onOpen:function(e,n){this.editableItem=e,this.valid=!0,this.editableField=e[n]},onClose:function(e){this.editableItem.id===e.id&&(this.editableField=null)},massChage:function(e,n){var t=this;this.editableField=n,this.valid=!0,this.filtered.forEach((function(n){n[e]&&t.onSave(n,e)}))},setFilterValue:function(e,n){if(this.$refs.data_table&&Array.isArray(this.$refs.data_table.filters)){var t=this.$refs.data_table.filters.find((function(n){return n.name===e}));t&&Object(B["a"])(t.value)===Object(B["a"])(n)&&(t.value=n)}},onFlagFilter:function(e,n){if(e&&"function"===typeof n){var t=[];2===this.flagFilterModel.length?t=[!0,!1]:"Marked"===this.flagFilterModel[0]?t=[!0]:"Unmarked"===this.flagFilterModel[0]&&(t=[!1]),e.value=t,n(e)}}}},Vc=Lc,Rc=(t("85a5"),t("7679")),Uc=Object(S["a"])(Vc,$c,jc,!1,null,null,null),qc=Uc.exports;N()(Uc,{VCheckbox:ln["a"],VCol:sn["a"],VEditDialog:Rc["a"],VForm:se["a"],VIcon:_["a"],VRow:ce["a"],VSelect:yi["a"],VTextarea:bi["a"]});var Bc=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("data-table",{staticClass:"budget-table",attrs:{items:e.displayedItems,headers:e.displayedHeaders,loading:e.loading,"hide-default-footer":!0,"disable-pagination":!0,"item-key":"key"},scopedSlots:e._u([{key:"item",fn:function(n){var i=n.headers,a=n.item;return[t("tr",{key:a.key},[t("th",{staticClass:"budget-table-header-cell fixed"},[e._v(e._s(a.label))]),e._l(i,(function(n){return[t("td",{directives:[{name:"show",rawName:"v-show",value:"label"!==n.value,expression:"header.value !== 'label'"}],key:a.key+n.value+a[n.value].value,class:a[n.value].className},[e._v(" "+e._s(e._f("currency")(a[n.value].value))+" ")])]}))],2)]}}])})},Mc=[],Yc={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 n=e.plan&&e.plan.financialInfo&&parseInt(e.plan.financialInfo.planStartYear),t=n?Ml(n,n+19):[],i=t.map((function(e){return{text:e,value:e,sortable:!1,width:"80px"}}));return{years:t,displayedHeaders:[{text:"",value:"label",sortable:!1,fixed:!0,width:"150px"}].concat(Object(Ei["a"])(i)),items:[]}},computed:{displayedItems:function(){var e=this;if(!this.plan||!this.plan.financialInfo)return[];var n=this.plan.financialInfo,t=n.typeOfPlan,i=n.capitalFundingAmount,a=n.ltfmrFundingAmount,o=n.capitalInfusionYear,r=n.capitalInfusionAmount,l=n.fundingEscalation,s=n.planStartYear,c=("Capital"===t.name?i:a)||null,d=this.years.reduce((function(e,n){var t=l?hn(c,l,n,s):c,i=o&&r&&o===n?t+r:t;return Object(m["a"])(Object(m["a"])({},e),{},Object(en["a"])({},n,{value:i}))}),{}),u=this.years.reduce((function(n,t){var i=e.components.filter((function(n){var i=e.changes.find((function(e){return e.id===n.id}));return i?i.yearForImprovement===t:n.yearForImprovement===t})).reduce((function(n,t){var i=e.changes.find((function(e){return e.id===t.id})),a=kn(i||t,e.plan),o=a.budgetAmount;return n+o}),0),a=d[t].value;return Object(m["a"])(Object(m["a"])({},n),{},Object(en["a"])({},t,{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})]}}},Gc=Yc,zc=(t("816f"),Object(S["a"])(Gc,Bc,Mc,!1,null,null,null)),Qc=zc.exports,Hc="PLANING_BUDGET_COMPONENTS",Wc={name:"BudgetPlanning",components:{Btn:te["a"],BudgetCalculationInfo:Ec,Modal:Ie["a"],ComponentList:qc,ExpansionPanelHeader:Ha["a"],BudgetTable:Qc,ComponentsReport:_n,DataTableColumns:gc,PlanFinancialInfo:Hr},props:{plan:{type:Object}},apollo:{currentUser:{query:k.a,fetchPolicy:"cache-only"},componentsOfNeed:{query:ol.a,variables:function(){return{planId:this.plan&&this.plan.id||null,status:rl.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:Hc,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(ri["cloneDeep"])(e),this.changes=[],this.selected=[],this.filtered=[])}},computed:{loading:function(){return this.$apollo.queries.componentsOfNeed.loading},showGenerateReportBtn:function(){return Object(y["a"])(f["c"].GENERATE_REPORT,this.currentUser)},canEdit:function(){return Object(y["a"])(f["c"].EDIT_PLAN_COMPONENT,this.currentUser)},reportComponents:function(){var e=this,n=this.components.map((function(n){var t=e.changes.find((function(e){return n.id===e.id}));return t||n}));return this.selected.length>0?this.selected:this.filtered.length>0?this.filtered:n},showBulkYearChangeBtn:function(){return this.filtered.length>0},years:function(){if(null!==this.plan&&null!==this.plan.financialInfo&&null!==this.plan.financialInfo.planStartYear){var e=parseInt(this.plan&&this.plan.financialInfo&&this.plan.financialInfo.planStartYear);return Ml(e,e+19)}return Ml((new Date).getFullYear(),(new Date).getFullYear()+19)}},methods:{onModalClose:function(){this.changes=[],this.selected=[],this.filtered=[],this.onReset(),this.components=Object(ri["cloneDeep"])(this.componentsOfNeed)},onReset:function(){this.selected=[]},onSelect:function(e){this.selected=e},onFilter:function(e){this.filtered=e},onChange:function(e,n){var t=this.componentsOfNeed.find((function(n){return e.id===n.id})),i=this.changes.findIndex((function(n){return n.id===e.id}));if(t&&t[n]!==e[n])i>=0?this.changes[i]=e:this.changes.push(e);else if(t&&i>=0){var a=Object.entries(t).some((function(n){var i=Object(Pc["a"])(n,1),a=i[0];return!Object(ri["isEqual"])(t[a],e[a])}));a||(this.changes=this.changes.filter((function(n){return n.id!==e.id})))}},onApplyToPlan:function(e){var n=this;this.internalLoading=!0;var t=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:Jr.a,variables:{input:t},update:function(e,t){var i=t.data.updateComponentsOfNeed,a=e.readQuery({query:ol.a,variables:{planId:n.plan&&n.plan.id||null,status:rl.OPEN}});i.forEach((function(e){var n=a.componentsOfNeed.findIndex((function(n){return n.id===e.id}));n>=0&&(a.componentsOfNeed[n]=e)})),e.writeQuery({query:ol.a,variables:{planId:n.plan&&n.plan.id||null,status:rl.OPEN},data:a})}}).then((function(){e&&e()})).catch((function(t){n.error=t,e&&e()})).finally((function(){n.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])}}},Jc=Wc,Xc=(t("1ea3"),Object(S["a"])(Jc,Dc,Ac,!1,null,null,null)),Zc=Xc.exports;N()(Xc,{VCol:sn["a"],VExpansionPanel:ao["a"],VExpansionPanelContent:oo["a"],VExpansionPanels:ro["a"],VRow:ce["a"],VSelect:yi["a"]});var Kc={name:"Components",components:{Btn:te["a"],Modal:Ie["a"],ActiveComponents:Tc,CompletedComponents:$s,BudgetPlanning:Zc},props:{plan:{type:Object,default:null}},apollo:{currentUser:{query:k.a,fetchPolicy:"cache-only"}},data:function(){return{currentUser:null,tab:null}},computed:{showAddComponentBtn:function(){return Object(y["a"])(f["c"].ADD_PLAN_COMPONENT,this.currentUser)}},methods:{onBackClick:function(){this.$emit("back")}}},ed=Kc,nd=(t("a9fc"),t("71a3")),td=t("c671"),id=t("fe57"),ad=t("aac8"),od=Object(S["a"])(ed,Wl,Jl,!1,null,null,null),rd=od.exports;N()(od,{VCol:sn["a"],VRow:ce["a"],VTab:nd["a"],VTabItem:td["a"],VTabs:id["a"],VTabsItems:ad["a"]});var ld={name:"PlanForm",components:{Stepper:qt,StepperStep:Wt,PlanGeneralInfoForm:Pl,PlanFinancialInfoForm:Hl,Components:rd},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}}},sd=ld,cd=Object(S["a"])(sd,gl,Sl,!1,null,null,null),dd=cd.exports;N()(cd,{VDivider:jo["a"],VStepperContent:Lo["a"],VStepperHeader:Vo["a"],VStepperItems:Vo["b"]});var ud={name:"AddPlan",components:{PlanForm:dd,Breadcrumbs:Ho},props:{clientId:{type:String}},apollo:{client:{query:pr.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}},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(Ei["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}}},md=ud,fd=Object(S["a"])(md,yl,bl,!1,null,null,null),pd=fd.exports;N()(fd,{VCol:sn["a"],VRow:ce["a"]});var vd={name:"AddPlan",components:{Plan:pd}},hd=vd,kd=Object(S["a"])(hd,hl,kl,!1,null,null,null),yd=kd.exports,bd=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{staticClass:"edit-plan"},[t("plan",{attrs:{"plan-id":e.$route.params.planId}})],1)},gd=[],Sd=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",[t("v-row",{staticClass:"mb-6"},[t("v-col",[t("breadcrumbs",{attrs:{items:e.breadcrumbs}})],1)],1),e.loading?e._e():t("alert",{attrs:{error:e.error}}),t("plan-form",{attrs:{plan:e.plan,loading:e.loading,disabled:!!e.error,"readonly-fields":e.readonlyFields},on:{submit:e.onSubmit}})],1)},Cd=[],Nd={name:"EditPlan",components:{PlanForm:dd,Breadcrumbs:Ho},props:{planId:{type:Number|String}},apollo:{plan:{query:Ur.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}}},_d=Nd,wd=Object(S["a"])(_d,Sd,Cd,!1,null,null,null),Ed=wd.exports;N()(wd,{VCol:sn["a"],VRow:ce["a"]});var Od={name:"EditPlan",components:{Plan:Ed}},Fd=Od,xd=Object(S["a"])(Fd,bd,gd,!1,null,null,null),Id=xd.exports,Td=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("unauth-app-layout",[t("reset-password")],1)},Dd=[],Ad=function(){var e=this,n=e.$createElement,t=e._self._c||n;return 1===e.step?t("div",{staticClass:"reset-password-container"},[t("btn",{staticClass:"back-btn",attrs:{icon:"",to:{name:"login"},"color-type":"secondary"}},[t("v-icon",[e._v("fa-chevron-left")])],1),t("h1",[e._v("Reset Password")]),t("ApolloMutation",{attrs:{mutation:e.RESET_PASSWORD_MUTATION,variables:{email:e.email}},on:{done:e.onDone},scopedSlots:e._u([{key:"default",fn:function(n){var i=n.mutate,a=n.loading,o=n.error;return[a?e._e():t("alert",{attrs:{align:"center",error:o}}),t("p",[e._v(" Please enter your registered email address. An email notification with a new password will be sent to you. ")]),t("v-form",{ref:"form",attrs:{"lazy-validation":"","aria-busy":a,disabled:a},on:{submit:function(n){n.preventDefault(),e.validate()&&i()}}},[t("v-text-field",{attrs:{rules:e.emailRules,label:"Email",required:"","validate-on-blur":""},model:{value:e.email,callback:function(n){e.email=n},expression:"email"}}),t("div",{staticClass:"mt-16"},[t("btn",{attrs:{type:"submit","color-type":"primary","full-width":"",disabled:a}},[e._v("Send")])],1)],1)]}}],null,!1,352590128)})],1):t("div",{staticClass:"reset-password-success-container"},[t("h1",[e._v("Check your email")]),t("p",[e._v(" Email with new password has been sent to "),t("span",{staticClass:"email"},[e._v(e._s(e.email))]),e._v(". ")]),t("p",[e._v("Please go back to "),t("router-link",{attrs:{to:{name:"login"}}},[e._v("login")]),e._v(" and enter new password")],1)])},Pd=[],$d=t("cc07"),jd=t.n($d),Ld={name:"ResetPassword",components:{Btn:te["a"]},data:function(){return{RESET_PASSWORD_MUTATION:jd.a,step:1,email:"",emailRules:[function(e){return!!e||"Email is Required"},oe["a"].email]}},methods:{validate:function(){return this.$refs.form.validate()},onDone:function(){this.step=2}}},Vd=Ld,Rd=(t("40be"),Object(S["a"])(Vd,Ad,Pd,!1,null,null,null)),Ud=Rd.exports;N()(Rd,{VForm:se["a"],VIcon:_["a"],VTextField:de["a"]});var qd={components:{ResetPassword:Ud,UnauthAppLayout:Se}},Bd=qd,Md=Object(S["a"])(Bd,Td,Dd,!1,null,null,null),Yd=Md.exports,Gd=[{path:"/login",name:"login",component:we,meta:{title:"ICS - Login",pageTitle:"Login",requiresAuth:!1}},{path:"/forgot-password",name:"forgot-password",component:Yd,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:Ot},{path:"/add-client",name:"add-client",meta:{title:"ICS - Add Client",pageTitle:"Add Client",permission:f["c"].ADD_CLIENT},component:tr},{path:"/client/:clientId",name:"client",meta:{title:"ICS - Client",pageTitle:"Edit Client",permission:f["c"].EDIT_CLIENT},component:Cr},{path:"/client-details/:clientId",name:"client-details",meta:{title:"ICS - Client Details",permission:f["c"].VIEW_CLIENT},component:Pr},{path:"/plans",name:"plans",component:at,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:vl},{path:"/create-plan/:clientId",name:"create-plan",meta:{title:"ICS - Create Plan",pageTitle:"Create Plan",permission:f["c"].CREATE_PLAN},component:yd},{path:"/plan/:planId",name:"plan",meta:{title:"ICS - Plan",pageTitle:"Edit Plan",permission:f["c"].EDIT_PLAN},component:Id},{path:"/manage-users",name:"manage-users",meta:{title:"ICS - Manage Users",pageTitle:"Manage Users",permission:f["c"].VIEW_USERS},component:function(){return Promise.all([t.e("manage-database~manage-users"),t.e("manage-users")]).then(t.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([t.e("manage-database~manage-users"),t.e("manage-database")]).then(t.bind(null,"dc09"))}},{path:"/settings",name:"settings",meta:{title:"ICS - Setting",pageTitle:"Settings",permission:f["c"].CHANGE_ROLE_PERMISSIONS},component:function(){return t.e("settings").then(t.bind(null,"26d3"))}}],zd=Gd;i["a"].use(X["a"]);var Qd=new X["a"]({mode:"history",base:"/",routes:zd});Qd.beforeEach(function(){var e=Object(M["a"])(regeneratorRuntime.mark((function e(n,t,i){var a,o,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("login"===n.name||void 0!==n.meta.requiresAuth&&!n.meta.requiresAuth||iu()){e.next=4;break}i({name:"login"}),e.next=14;break;case 4:if(!iu()){e.next=13;break}return a=su.defaultClient,e.next=8,a.query({query:k.a});case 8:o=e.sent,r=o.data.currentUser;try{null===n.name&&"/"===n.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(t){i({name:"login"})}e.next=14;break;case 13:i();case 14:case"end":return e.stop()}}),e)})));return function(n,t,i){return e.apply(this,arguments)}}());var Hd=Qd;i["a"].use(G["a"]);var Wd,Jd="apollo-token",Xd="apollo-refresh-token",Zd=Object(z["a"])((function(e){var n=e.graphQLErrors,t=e.networkError,i=e.operation,a=e.forward;if(n){var o,r=Object(Y["a"])(n);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,n="undefined"!==typeof localStorage?localStorage.getItem(Xd):"";if(n){var t=Wd.defaultClient;return{v:new Q["a"]((function(o){t.mutate({mutation:J.a,variables:{token:n}}).then((function(n){var t=n.data,a=t.refreshToken,o=a.accessToken,r=a.refreshToken;localStorage.setItem(Jd,o),localStorage.setItem(Xd,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(n){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return o.error(n),e.next=3,ru(t);case 3:"login"!==Hd.currentRoute.name&&Hd.push({name:"login"});case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}())}))}}return"login"!==Hd.currentRoute.name&&Hd.push({name:"login"}),{v:!1}}();if("object"===Object(B["a"])(s))return s.v}}}catch(l){r.e(l)}finally{r.f()}}t&&(Qe["a"].$emit("show-snackbar",{color:"error",text:"Error! Something went wrong... Please try again later"}),console.log("[Network error]: ".concat(t)))})),Kd="http://54.211.119.142/api/graphql",eu=Object({NODE_ENV:"production",VUE_APP_GRAPHQL_HTTP:"http://54.211.119.142/api/graphql",BASE_URL:"/"}).VUE_APP_FILES_ROOT||Kd.substr(0,Kd.indexOf("/graphql"));i["a"].prototype.$filesRoot=eu;var nu={httpEndpoint:Kd,tokenName:Jd,refreshTokenName:Xd,persisting:!1,websocketsOnly:!1,ssr:!1,link:Zd,inMemoryCacheOptions:{addTypename:!1}};function tu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Object(H["createApolloClient"])(Object(m["a"])(Object(m["a"])({},nu),e)),t=n.apolloClient;return new G["a"]({defaultClient:t,defaultOptions:{$query:{fetchPolicy:"cache-and-network",errorPolicy:"all"},$mutation:{errorPolicy:"all"}}})}function iu(){return"undefined"!==typeof localStorage&&localStorage.getItem(Jd)}function au(e,n,t){return ou.apply(this,arguments)}function ou(){return ou=Object(M["a"])(regeneratorRuntime.mark((function e(n,t,i){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return"undefined"!==typeof localStorage&&t&&i&&(localStorage.setItem(Jd,t),localStorage.setItem(Xd,i)),e.prev=1,e.next=4,n.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]])}))),ou.apply(this,arguments)}function ru(e){return lu.apply(this,arguments)}function lu(){return lu=Object(M["a"])(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return"undefined"!==typeof localStorage&&(localStorage.removeItem(Jd),localStorage.removeItem(Xd)),e.prev=1,e.next=4,n.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]])}))),lu.apply(this,arguments)}Wd=tu();var su=Wd,cu={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(){ru(),this.$router.push({name:"login"})}}},du=cu,uu=(t("f5e0"),t("8212")),mu=t("e0c7"),fu=Object(S["a"])(du,U,q,!1,null,null,null),pu=fu.exports;N()(fu,{VAvatar:uu["a"],VBtn:A["a"],VCard:ke["a"],VDivider:jo["a"],VIcon:_["a"],VList:w["a"],VListItem:E["a"],VListItemContent:O["a"],VListItemTitle:O["b"],VMenu:qe["a"],VSubheader:mu["a"]});var vu={name:"AppHeader",components:{UserProfile:pu},data:function(){return{CURRENT_USER_QUERY:k.a}},created:function(){this.loadColorTheme()},methods:{setToStorage:function(e){try{window.localStorage.setItem("darkMode",e||"")}catch(n){console.warn("set theme error ",n)}},loadColorTheme:function(){try{this.$vuetify.theme.dark=Boolean(window.localStorage.getItem("darkMode"))}catch(e){console.warn("load theme error ",e)}}}},hu=vu,ku=(t("77b5"),t("b73d")),yu=t("2a7f"),bu=Object(S["a"])(hu,V,R,!1,null,null,null),gu=bu.exports;N()(bu,{VSwitch:ku["a"],VToolbarItems:yu["a"]});var Su={name:"AppLayout",components:{AppNavigationDrawer:L,AppHeader:gu}},Cu=Su,Nu=(t("daee"),t("40dc")),_u=Object(S["a"])(Cu,r,l,!1,null,null,null),wu=_u.exports;N()(_u,{VAppBar:Nu["a"],VMain:be["a"]});var Eu=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",e._l(e.queue,(function(n,i){return t("v-snackbar",{key:n.text,style:{paddingTop:60*(i+1)+"px"},attrs:{timeout:"error"===n.color?5e3:3e3,color:n.color,top:"",right:""},on:{input:function(){e.onClose(n)}},scopedSlots:e._u([{key:"action",fn:function(i){var a=i.attrs;return[t("btn",e._b({attrs:{"color-type":"secondary",icon:""},on:{click:function(t){return e.onClose(n)}}},"btn",a,!1),[t("v-icon",{attrs:{small:""}},[e._v("fa-times")])],1)]}}],null,!0),model:{value:n.snack,callback:function(t){e.$set(n,"snack",t)},expression:"snack.snack"}},[e._v(" "+e._s(n.text)+" ")])})),1)},Ou=[],Fu={name:"AppNotification",components:{Btn:te["a"]},mounted:function(){var e=this;Qe["a"].$on("show-snackbar",(function(n){var t=e.queue.filter((function(e){return e.snack}));""===n.text||t.some((function(e){return e.text===n.text}))||t.push(Object(m["a"])({snack:!0},n)),e.queue=t}))},beforeDestroy:function(){Qe["a"].$off("show-snackbar")},data:function(){return{queue:[]}},methods:{onClose:function(e){this.queue=this.queue.filter((function(n){return n.text!==e.text}))}}},xu=Fu,Iu=t("2db4"),Tu=Object(S["a"])(xu,Eu,Ou,!1,null,null,null),Du=Tu.exports;N()(Tu,{VIcon:_["a"],VSnackbar:Iu["a"]});var Au={name:"App",components:{AppNotification:Du,AppLayout:wu},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"}}},Pu=Au,$u=(t("5c0b"),t("7496")),ju=Object(S["a"])(Pu,a,o,!1,null,null,null),Lu=ju.exports;N()(ju,{VApp:$u["a"]});var Vu=t("f309");i["a"].use(Vu["a"]);var Ru=new Vu["a"]({icons:{iconfont:"fa"},theme:{themes:{light:{primary:"#2e4768",secondary:"#1564b7",accent:"#F5B14D",accent1:"#F1CE9A",accent2:"#F6DDB9",error:"#FF5252",info:"#2196F3",success:"#4CAF50",warning:"#FFC107",background:"#fff",menu:"#2e4768","ics-light-grey-blue":"#f0f2f4","ics-light-grey":"#C8C8C8","ics-grey":"#8C8C8C"},dark:{primary:"#c9d3e1",secondary:"#1564b7",accent:"#F5B14D",accent1:"#51739f",accent2:"#4a6a93",error:"#ff8181",info:"#2196F3",success:"#4CAF50",warning:"#FFC107",background:"#4b5562",menu:"#2e4768",anchor:"#9ebbe3","ics-light-grey-blue":"#5f6a78","ics-light-grey":"#3c4046","ics-grey":"#b0b3b7"}},options:{customProperties:!0,variations:!1}}});t("15f5"),t("9772");function Uu(e){return null===e||void 0===e||""===e?"":"--"===e?e:"$ ".concat(new Intl.NumberFormat("en-US",{maximumFractionDigits:2}).format(Number(e)))}i["a"].filter("currency",Uu);function qu(e){return e?"--"===e?e:Object(xl["a"])(e):""}i["a"].filter("date",qu);function Bu(e){return e?"--"===e?e:Object(xl["c"])(e):""}i["a"].filter("utcDate",Bu);var Mu=function(e){var n=e&&new Date(e);return n?n.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}):""};function Yu(e){return e?"--"===e?e:Mu(e):""}i["a"].filter("time",Yu);function Gu(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",Gu);function zu(e){return null===e||void 0===e||""===e?"":"--"===e?e:e+"%"}i["a"].filter("percentage",zu);var Qu=t("3f08"),Hu=function(){var e,n=this,t=n.$createElement,i=n._self._c||t;return n.error?i("p",n._b({staticClass:"alert-msg"},"p",{class:(e={},e[n.align]=n.align,e)},!1),[n._v(n._s(n._f("errorMsg")(n.error.message)))]):n._e()},Wu=[],Ju={name:"Alert",props:{error:{type:Object|Error,default:null},align:{type:String,default:"left",validator:function(e){return["right","left","center"].includes(e)}}}},Xu=Ju,Zu=(t("082b"),Object(S["a"])(Xu,Hu,Wu,!1,null,null,null)),Ku=Zu.exports;i["a"].config.productionTip=!1,i["a"].component("Fragment",Qu["a"]),i["a"].component("Alert",Ku),new i["a"]({router:Hd,vuetify:Ru,apolloProvider:su,render:function(e){return e(Lu)}}).$mount("#app")},"5b6e":function(e,n,t){"use strict";t("1797")},"5c0b":function(e,n,t){"use strict";t("9c0c")},"5c58":function(e,n,t){"use strict";t("c15b")},"5d0e":function(e,n,t){"use strict";t("10a5")},"629d":function(e,n,t){"use strict";t.d(n,"a",(function(){return i}));t("13d5"),t("1276"),t("ac1f");var i=function(e,n){return n.split(".").reduce((function(e,n){return e&&e[n]||""}),e)}},"6cc7":function(e,n,t){},"6ed5":function(e,n,t){},"6efb":function(e,n,t){},"6fda":function(e,n){var t={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}};t.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,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function o(e,n){for(var t=0;t0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["ClientTypes"]=r(t,"ClientTypes")},"715c":function(e,n,t){},"72e8":function(e,n,t){"use strict";t("c6c1")},7514:function(e,n){var t={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}};t.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,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function o(e,n){for(var t=0;t0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["Documents"]=r(t,"Documents")},7672:function(e,n){var t={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}};t.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=t},"77b5":function(e,n,t){"use strict";t("d715")},"77e6":function(e,n){var t={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}};t.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=t},"79ea":function(e,n,t){},"7a10":function(e,n,t){},"7aa9":function(e,n,t){"use strict";t("1c07")},"7bbb":function(e,n,t){},"7c734":function(e,n,t){"use strict";var i=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("ul",{staticClass:"definition-list"},e._l(e.displayedData,(function(n,i){return t("li",{key:i,staticClass:"definition-list-item"},[t("span",{staticClass:"definition-list-item-label",style:{width:e.labelWidth}},[e._v(e._s(n.label)+":")]),n.type&&"date"===n.type?t("span",{staticClass:"definition-list-item-value"},[e._v(e._s(e._f("date")(n.value||"--")))]):e._e(),n.type&&"utcDate"===n.type?t("span",{staticClass:"definition-list-item-value"},[e._v(e._s(e._f("utcDate")(n.value||"--")))]):n.type&&"longstring"===n.type?t("span",{staticClass:"definition-list-item-value"},[t("truncated-text",{attrs:{text:n.value||"--"}})],1):n.type&&"percentage"===n.type?t("span",{staticClass:"definition-list-item-value"},[e._v(e._s(e._f("percentage")(n.value||"--")))]):n.type&&"currency"===n.type?t("span",{staticClass:"definition-list-item-value"},[e._v(e._s(e._f("currency")(n.value||"--")))]):n.type&&"number"===n.type?t("span",{staticClass:"definition-list-item-value"},[e._v(e._s(e._f("number")(n.value||"--")))]):n.type&&"link"===n.type?t("span",{staticClass:"definition-list-item-value"},[n.value?t("a",{attrs:{href:n.value}},[e._v("Link")]):[e._v(e._s("--"))]],2):t("span",{staticClass:"definition-list-item-value"},[e._v(e._s(n.value||"--"))])])})),0)},a=[],o=t("2909"),r=t("5530"),l=(t("a9e3"),t("13d5"),t("d81d"),t("99af"),t("629d")),s=t("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(n,t){var i=Object(l["a"])(e.data,t.value),a="list"===t.type?i&&i.length>0?i.map((function(e){var n=Object(l["a"])(e,t.labelName);return{label:n?"".concat(t.label," (").concat(n.toLowerCase(),")"):t.label,value:Object(l["a"])(e,t.valueName)}})):[Object(r["a"])(Object(r["a"])({},t),{},{value:null})]:null,s=a||[Object(r["a"])(Object(r["a"])({},t),{},{value:i})];return n.push.apply(n,Object(o["a"])(s)),n}),[]):[]}}},d=c,u=(t("0c31"),t("2877")),m=Object(u["a"])(d,i,a,!1,null,null,null);n["a"]=m.exports},"7c9a":function(e,n,t){},"7d3b":function(e,n,t){"use strict";t("6efb")},"7eca":function(e,n,t){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 n=e.name.value;return!a[n]&&(a[n]=!0,!0)}))}function r(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,n)})),e.definitions&&e.definitions.forEach((function(e){r(e,n)}))}i.definitions=i.definitions.concat(o(t("77e6").definitions));var l={};function s(e,n){for(var t=0;t0){var r=o;o=new Set,r.forEach((function(e){if(!a.has(e)){a.add(e);var n=l[e]||new Set;n.forEach((function(e){o.add(e)}))}}))}return a.forEach((function(n){var i=s(e,n);i&&t.definitions.push(i)})),t}(function(){i.definitions.forEach((function(e){if(e.name){var n=new Set;r(e,n),l[e.name.value]=n}}))})(),e.exports=i,e.exports["UpdateComponentOfNeed"]=c(i,"UpdateComponentOfNeed")},"7fff":function(e,n){var t={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}};t.loc.source={body:"mutation DeleteClient($id: ID!) {\n deleteClient(id: $id)\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function o(e,n){for(var t=0;t0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["DeleteClient"]=r(t,"DeleteClient")},"816f":function(e,n,t){"use strict";t("955d")},8295:function(e,n,t){"use strict";t("7c9a")},"85a5":function(e,n,t){"use strict";t("3e9c")},"85d0":function(e,n,t){},"866b":function(e,n,t){},"87bb":function(e,n){var t={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}};t.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,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function o(e,n){for(var t=0;t0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["GenerateAllClientsReport"]=r(t,"GenerateAllClientsReport")},8810:function(e,n){var t={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}};t.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,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function o(e,n){for(var t=0;t0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["ClonePlan"]=r(t,"ClonePlan")},"894d":function(e,n,t){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 n=e.name.value;return!a[n]&&(a[n]=!0,!0)}))}function r(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,n)})),e.definitions&&e.definitions.forEach((function(e){r(e,n)}))}i.definitions=i.definitions.concat(o(t("77e6").definitions));var l={};function s(e,n){for(var t=0;t0){var r=o;o=new Set,r.forEach((function(e){if(!a.has(e)){a.add(e);var n=l[e]||new Set;n.forEach((function(e){o.add(e)}))}}))}return a.forEach((function(n){var i=s(e,n);i&&t.definitions.push(i)})),t}(function(){i.definitions.forEach((function(e){if(e.name){var n=new Set;r(e,n),l[e.name.value]=n}}))})(),e.exports=i,e.exports["AddComponentOfNeed"]=c(i,"AddComponentOfNeed")},"89a7":function(e,n,t){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:"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:291}};i.loc.source={body:'#import "../fragments/financialInfo.gql"\nfragment Plan on Plan {\n id\n name\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 n=e.name.value;return!a[n]&&(a[n]=!0,!0)}))}i.definitions=i.definitions.concat(o(t("7672").definitions)),e.exports=i},"8a75":function(e,n){var t={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:"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:369}};t.loc.source={body:"query Plans {\n plans {\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,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function o(e,n){for(var t=0;t0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["Plans"]=r(t,"Plans")},"8ab8":function(e,n,t){"use strict";t("006c")},"8ca5":function(e,n){var t={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}};t.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,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function o(e,n){for(var t=0;t0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["Units"]=r(t,"Units")},9392:function(e,n,t){"use strict";t("b24e")},"94e1":function(e,n){var t={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}};t.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,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function o(e,n){for(var t=0;t0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["UpdateContact"]=r(t,"UpdateContact")},"955d":function(e,n,t){},"96f1":function(e,n,t){"use strict";var i=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("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=t("2b0e"),r=t("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=t("2877"),u=t("6544"),m=t.n(u),f=Object(d["a"])(c,i,a,!1,null,null,null);n["a"]=f.exports;m()(f,{VBtn:r["a"]})},9772:function(e,n,t){"use strict";t("4de4");var i=t("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);n["a"]=r},"9a28":function(e,n){var t={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}};t.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,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function o(e,n){for(var t=0;t0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["FundingSource"]=r(t,"FundingSource")},"9ad2":function(e,n,t){},"9b19":function(e,n,t){e.exports=t.p+"img/logo.adb75207.svg"},"9b2c":function(e,n,t){},"9c0c":function(e,n,t){},"9cca":function(e,n,t){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 n=e.name.value;return!a[n]&&(a[n]=!0,!0)}))}function r(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,n)})),e.definitions&&e.definitions.forEach((function(e){r(e,n)}))}i.definitions=i.definitions.concat(o(t("77e6").definitions));var l={};function s(e,n){for(var t=0;t0){var r=o;o=new Set,r.forEach((function(e){if(!a.has(e)){a.add(e);var n=l[e]||new Set;n.forEach((function(e){o.add(e)}))}}))}return a.forEach((function(n){var i=s(e,n);i&&t.definitions.push(i)})),t}(function(){i.definitions.forEach((function(e){if(e.name){var n=new Set;r(e,n),l[e.name.value]=n}}))})(),e.exports=i,e.exports["ComponentsOfNeed"]=c(i,"ComponentsOfNeed")},"9f02":function(e,n,t){"use strict";t.d(n,"a",(function(){return a}));t("caad"),t("2532"),t("5319"),t("ac1f"),t("4de4");var i=t("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,n){var t={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}};t.loc.source={body:"mutation DeleteDocument($id: ID!) {\n deleteDocument(id: $id)\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function o(e,n){for(var t=0;t0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["DeleteDocument"]=r(t,"DeleteDocument")},a20f:function(e,n){var t={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}};t.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,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function o(e,n){for(var t=0;t0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["GenerateReports"]=r(t,"GenerateReports")},a2f4:function(e,n,t){},a483:function(e,n,t){"use strict";t("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(n){switch(e){case 1:return null===n||""===n||/^\d+(\.\d{1})?$/.test(n)||"Please enter value in the correct format: XX.X";case 2:return null===n||""===n||/^\d+(\.\d{1,2})?$/.test(n)||"Please enter value in the correct format: XX.XX";default:return null===n||""===n||/^\d+(\.\d)?$/.test(n)||"Please enter value in the correct format: XX.X"}}},numberInRange:function(e,n){return function(t){return null===t||""===t||t>=e&&t<=n||"Please enter value between ".concat(e," and ").concat(n)}},email:function(e){return!e||/.+@.+\..+/.test(e)||"Email must be valid"}};n["a"]=i},a8da:function(e,n,t){},a9b0:function(e,n,t){"use strict";var i=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("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]}},scopedSlots:e._u([{key:"top",fn:function(){return[t("div",{staticClass:"-position-relative"},[e.resetBtn.show?t("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(n){var i=n.props,a=(i.headers,i.someItems),o=i.everyItem,r=i.options,l=r.groupBy,s=(r.groupDesc,n.on);return[t("thead",{ref:"thead"},[t("tr",{ref:"header",staticClass:"header"},[e.showSelect?t("th",{attrs:{width:"20px"}},[e.selectLabel?[e._v(e._s(e.selectLabel))]:t("v-checkbox",{attrs:{value:o,indeterminate:a&&!o},on:{change:s["toggle-select-all"]}})],2):e._e(),e._l(e.$props.headers,(function(n){return t("th",e._g(e._b({key:n.value,style:e.headerStyles[n.value]},"th",Object.assign({},n,{class:{fixed:n.fixed}}),!1),n.sortable||void 0===n.sortable?{click:function(){e.onSorting(n)}}:{}),[n.sortable||void 0===n.sortable?t("span",{staticClass:"sortable",class:{active:e.sorting&&n.value===e.sorting.name||l.includes(n.value)}},[e._v(" "+e._s(n.text)+" "),n.sortable||void 0===n.sortable?t("span",{staticClass:"sorting"},[t("v-icon",{staticClass:"icon",class:{active:e.isAscActive(n)},attrs:{dense:""}},[e._v("fa-sort-up")]),t("v-icon",{staticClass:"icon",class:{active:e.isDescActive(n)},attrs:{dense:""}},[e._v("fa-sort-down")])],1):e._e()]):[e._v(" "+e._s(n.text)+" ")],n.width?t("span",{staticClass:"col-spacer",style:{width:n.width}}):e._e()],2)}))],2),e.isFilter?t("tr",{ref:"subHeader",staticClass:"header filter",style:e.subHeaderStyle},[e.showSelect?t("th",{style:e.subHeaderStyle}):e._e(),e._l(e.filters,(function(n){return t("th",e._b({key:n.name,style:e.subHeaderStyle,attrs:{width:n.width}},"th",{class:[{fixed:n.fixed},n.type]},!1),[!n.type||"text"!==n.type&&"number"!==n.type&&"currency"!==n.type?e._e():t("v-text-field",{attrs:{outlined:"",dense:"",clearable:"","full-width":"","hide-details":""},on:{change:function(t){return e.onFilter({name:n.name,value:n.value,type:n.type})}},model:{value:n.value,callback:function(t){e.$set(n,"value",t)},expression:"filter.value"}}),n.type&&"select"===n.type?t("div",{staticClass:"select-wrapper"},[t("v-select",{attrs:{outlined:"",dense:"",multiple:"",items:n.options,"full-width":"","hide-details":"",clearable:""},on:{change:function(t){return e.onFilter({name:n.name,value:n.value,type:n.type,options:n.options})}},scopedSlots:e._u([{key:"selection",fn:function(i){i.item;var a=i.index;return[0===a?t("span",{staticClass:"selection"},[e._l(n.value,(function(n,t){return[e._v(e._s(0===t?n:", "+n))]}))],2):e._e()]}},{key:"item",fn:function(n){n.active;var i=n.item,a=n.attrs,o=n.on;return[t("v-list-item",e._g(e._b({attrs:{dense:""},scopedSlots:e._u([{key:"default",fn:function(n){var a=n.active;return[t("v-list-item-action",[t("v-checkbox",{attrs:{dense:"","hide-details":"","input-value":a}})],1),t("v-list-item-content",[t("v-list-item-title",[e._v(" "+e._s(i)+" ")])],1)]}}],null,!0)},"v-list-item",a,!1),o))]}}],null,!0),model:{value:n.value,callback:function(t){e.$set(n,"value",t)},expression:"filter.value"}})],1):e._e(),n.type&&"date"===n.type?t("date-picker",{attrs:{placeholder:"Date",dense:"",outlined:"",clearable:"","hide-details":""},on:{change:e.onFilter},model:{value:n.value,callback:function(t){e.$set(n,"value",t)},expression:"filter.value"}}):e._e(),n.type&&"slot"===n.type?e._t("filter."+n.name,null,{callback:e.onFilter,item:n}):e._e()],2)}))],2):e._e()])]}},{key:"group",fn:function(n){var i=n.headers,a=n.group,o=n.items;return[t("tr",{staticClass:"v-row-group__header"},[t("td",{attrs:{colspan:e.$props.headers.length-1}},[t("btn",{attrs:{"color-type":"secondary",icon:""},on:{click:function(n){return e.onGroupToggle(a)}}},[e.isGroupExpanded(a)?t("v-icon",[e._v("fa-chevron-up")]):t("v-icon",[e._v("fa-chevron-down")])],1),e._v(e._s(a)+" ")],1),t("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(n){return t("tr",{key:n[e.$props.itemKey]},[t("td"),e._l(i,(function(i){return t("td",{key:i.value,class:i.cellClass},[Object.keys(e.$scopedSlots).includes("item."+i.value)?e._t("item."+i.value,null,{item:n}):[e._v(" "+e._s(n[i.value]||"")+" ")]],2)}))],2)})):t("tr",{key:a},[t("td",{staticClass:"empty-group-text",attrs:{colspan:i.length+1}},[e._v(e._s(e.emptyGroupText))])])]:e._e()]}},e._l(e.$props.headers,(function(n){return{key:"item."+n.value,fn:function(i){var a=i.item;return["number"===n.dataType?[e._v(" "+e._s(e._f("number")(a[n.value]))+" ")]:"currency"===n.dataType?[t("span",{key:a[n.value],staticClass:"currency-cell"},[e._v(e._s(e._f("currency")(a[n.value])))])]:"longstring"===n.dataType?[t("truncated-text",{key:a[n.value],attrs:{text:a[n.value]}})]:[e._v(" "+e._s(a[n.value])+" ")]]}}})),e._l(e.$scopedSlots,(function(n,t){return{key:t,fn:function(n){return[e._t(t,null,null,n)]}}}))],null,!0)},"v-data-table",Object.assign({},e.$props,e.$attrs,{class:{"h-scroll":e.hasHScroll}}),!1),e.$listeners))},a=[],o=t("3835"),r=t("53ca"),l=t("2909"),s=(t("a9e3"),t("4de4"),t("159b"),t("7db0"),t("07ac"),t("b0c0"),t("b64b"),t("caad"),t("2532"),t("a434"),t("c7cd"),t("6062"),t("d3b7"),t("3ca3"),t("ddb0"),t("a630"),t("2b0e")),c=t("8fea"),d=t("40a5"),u=t("96f1"),m=t("ea34"),f=t("629d"),p=t("3552"),v=t("2ef0"),h=s["a"].extend({mixins:[c["a"]]}),k=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}},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}},mounted:function(){this.initResizeObserver(),this.initScrollHandler()},beforeDestroy:function(){this.observer&&this.observer.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect()},watch:{items:{immediate:!0,handler:function(e,n){var t=this;Array.isArray(e)&&(n&&n.length===e.length?(this.itemKey&&this.filteredItems.forEach((function(n,i){var a=e.find((function(e){return e[t.itemKey]===n[t.itemKey]}));if(!a)return t.reset(e),!1;t.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(),Object(p["c"])(this.$route.name,this.filters)},headers:{immediate:!0,handler:function(e,n){e&&n&&e.length!==n.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,n={};return Object.keys(this.filters).forEach((function(t){var i=e.filters[t];!i.value||Array.isArray(i.value)&&!i.value.length||(n[t]=i)})),n},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(n){for(var t in e)if(t in n){var i=function(){var i=String(n[t]).toLowerCase(),a=e[t].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,n=e.name,t=e.order,i=e.type,a=null;switch(i){case"number":case"year":case"currency":a=function(e,t){return e[n]-t[n]};break;case"date":a=function(e,t){return new Date(e[n]).getTime()-new Date(t[n]).getTime()};break;default:a=function(e,t){var i=e?Object(f["a"])(e,n):"",a=t?Object(f["a"])(t,n):"";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 n="asc";this.sorting&&e.value===this.sorting.name&&(n="asc"===this.sorting.order?"desc":"asc"),this.sorting={name:e.value,order:n,type:e.dataType||e.type}}this.sort()},onGroupToggle:function(e){var n=this.expandedGroups.indexOf(e);n>-1?this.expandedGroups.splice(n,1):this.expandedGroups.push(e)},initObserver:function(){var e=this,n=this.$refs.header;this.observer&&this.observer.disconnect();var t=new IntersectionObserver((function(n){var t=Object(o["a"])(n,1),i=t[0];e.hasHScroll=i.boundingClientRect.width!==i.intersectionRect.width&&i.intersectionRatio<1}),{threshold:[1],root:this.$refs.thead.parentElement.parentElement});t.observe(n),this.observer=t},initResizeObserver:function(){var e=this,n=this.$refs.header;this.resizeObserver&&this.resizeObserver.disconnect();var t=new ResizeObserver((function(n){n[0]&&(0===n[0].contentRect.width&&0===e.$refs.thead.parentElement.parentElement.offsetWidth&&e.tableVisible?e.tableVisible=!1:n[0].contentRect.width>0&&!e.tableVisible&&(e.tableVisible=!0),e.headerHeight=n[0].contentRect.height,e.recalcHeaderStyles())}));t.observe(n),this.resizeObserver=t},initScrollHandler:function(){if(this.$refs.table&&this.$refs.table.$el){var e=this.$refs.table.$el.querySelector(".v-data-table__wrapper");if(e){var n,t=!0,i=function(){t&&(e.click(),t=!1)},a=function(){i(),clearTimeout(n),n=setTimeout((function(){t=!0}),100)};e.addEventListener("scroll",a)}}},setDefaultFilterValues:function(){var e=this;if(!this.isDefaultFiltersSetted){this.isDefaultFiltersSetted=!0;var n=Object(p["a"])(this.$route.name);if(n&&this.filters){Object.keys(this.filters).forEach((function(t){n[t]&&(e.filters[t].value=n[t].value)})),this.filter();var t=Object.values(this.filters).some((function(e){return""!==e.value&&null!==e.value&&0!==e.value.length}))?this.filteredItems:[];this.$emit("filtered",t,Object.values(Object(v["cloneDeep"])(this.filters)))}}},updateFilters:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isFilter){var t={};this.headers.forEach((function(i){var a=e.generateOptionsForFilter(i),o=e.filters[i.value],r=null;!n&&o&&"value"in o&&(r=o.value),t[i.value]={options:a,value:r,type:i.type,name:i.value,width:i.width,fixed:i.fixed}})),this.filters=t,this.setDefaultFilterValues()}else this.filters={},this.lastSelectedFilter=null},generateOptionsForFilter:function(e){var n;if("select"===e.type){if(e.options)n=Object(v["cloneDeep"])(e.options);else if(this.filteredItems)if(this.lastSelectedFilter&&this.lastSelectedFilter.value&&this.lastSelectedFilter.value.length&&this.lastSelectedFilter.name===e.value&&"select"===this.lastSelectedFilter.type)n=this.lastSelectedFilter.options;else{var t=new Set;this.filteredItems.forEach((function(n){var i=n[e.value];i&&t.add(i)})),n=Array.from(t)}Array.isArray(n)&&!e.noSort&&n.sort(this.sortWithLowerCase)}return n},sortWithLowerCase:function(e,n){var t=e.toLowerCase(),i=n.toLowerCase();return ti?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)},recalcHeaderStyles:function(){var e=this;this.$refs.header&&this.$refs.subHeader&&this.$refs.thead&&this.$nextTick((function(){var n=[],t=e.$refs.header.querySelectorAll(":scope>th.fixed"),i=e.$refs.subHeader.querySelectorAll(":scope>th.fixed"),a=e.$refs.thead.parentElement.querySelectorAll("tbody>tr");t.forEach((function(e,i){for(var a=0,o=0;otd.fixed").forEach((function(e,t){n[t]&&(e.style.left=n[t])}))}))}))}}}),y=k,b=(t("2a98"),t("2877")),g=t("6544"),S=t.n(g),C=t("ac7c"),N=t("132d"),_=t("da13"),w=t("1800"),E=t("5d23"),O=t("b974"),F=t("8654"),x=Object(b["a"])(y,i,a,!1,null,null,null);n["a"]=x.exports;S()(x,{VCheckbox:C["a"],VDataTable:c["a"],VIcon:N["a"],VListItem:_["a"],VListItemAction:w["a"],VListItemContent:E["a"],VListItemTitle:E["b"],VSelect:O["a"],VTextField:F["a"]})},a9fc:function(e,n,t){"use strict";t("0fbf")},adf9:function(e,n,t){},aefe:function(e,n,t){},af2a:function(e,n,t){"use strict";t("d020")},b24e:function(e,n,t){},b401:function(e,n,t){"use strict";t("ee99")},b44d:function(e,n,t){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 n=e.name.value;return!a[n]&&(a[n]=!0,!0)}))}function r(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,n)})),e.definitions&&e.definitions.forEach((function(e){r(e,n)}))}i.definitions=i.definitions.concat(o(t("77e6").definitions));var l={};function s(e,n){for(var t=0;t0){var r=o;o=new Set,r.forEach((function(e){if(!a.has(e)){a.add(e);var n=l[e]||new Set;n.forEach((function(e){o.add(e)}))}}))}return a.forEach((function(n){var i=s(e,n);i&&t.definitions.push(i)})),t}(function(){i.definitions.forEach((function(e){if(e.name){var n=new Set;r(e,n),l[e.name.value]=n}}))})(),e.exports=i,e.exports["CloneComponentOfNeed"]=c(i,"CloneComponentOfNeed")},b710:function(e,n,t){},b805:function(e,n){var t={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}};t.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,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function o(e,n){for(var t=0;t0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["RefreshToken"]=r(t,"RefreshToken")},b891:function(e,n,t){"use strict";var i=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("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=t("2b0e"),r=t("8654"),l=o["a"].extend({mixins:[r["a"]]}),s=l.extend({name:"NumberTextField",components:{VTextField:r["a"]},methods:{onChange:function(e){var n=""!==e?e:null;this.$emit("input",n),this.$emit("change",n)}}}),c=s,d=(t("d305"),t("2877")),u=t("6544"),m=t.n(u),f=Object(d["a"])(c,i,a,!1,null,null,null);n["a"]=f.exports;m()(f,{VTextField:r["a"]})},b8ea:function(e,n){var t={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}};t.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,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function o(e,n){for(var t=0;t0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["Systems"]=r(t,"Systems")},bf8d:function(e,n,t){},c15b:function(e,n,t){},c350:function(e,n,t){"use strict";t("f737")},c6c1:function(e,n,t){},c899:function(e,n){var t={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}};t.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,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function o(e,n){for(var t=0;t0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["ConditionAssessment"]=r(t,"ConditionAssessment")},c90a:function(e,n,t){"use strict";t("43e2")},c982:function(e,n){var t={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:"urlPhotos"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"summary"},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}};t.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 urlPhotos\n summary\n clientId\n createdAt\n updatedAt\n __typename\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};e.exports=t},c9d1:function(e,n,t){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 n=e.name.value;return!a[n]&&(a[n]=!0,!0)}))}function r(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,n)})),e.definitions&&e.definitions.forEach((function(e){r(e,n)}))}i.definitions=i.definitions.concat(o(t("77e6").definitions));var l={};function s(e,n){for(var t=0;t0){var r=o;o=new Set,r.forEach((function(e){if(!a.has(e)){a.add(e);var n=l[e]||new Set;n.forEach((function(e){o.add(e)}))}}))}return a.forEach((function(n){var i=s(e,n);i&&t.definitions.push(i)})),t}(function(){i.definitions.forEach((function(e){if(e.name){var n=new Set;r(e,n),l[e.name.value]=n}}))})(),e.exports=i,e.exports["UpdateComponentsOfNeed"]=c(i,"UpdateComponentsOfNeed")},cc07:function(e,n){var t={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}};t.loc.source={body:"mutation ResetPassword($email: String!) {\n resetPassword(email: $email)\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function o(e,n){for(var t=0;t0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["ResetPassword"]=r(t,"ResetPassword")},cd26:function(e,n,t){},cddf:function(e,n,t){"use strict";t("6ed5")},ce1e:function(e,n,t){"use strict";t("1921")},d020:function(e,n,t){},d305:function(e,n,t){"use strict";t("85d0")},d361:function(e,n,t){"use strict";t("6cc7")},d368:function(e,n,t){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 n=e.name.value;return!a[n]&&(a[n]=!0,!0)}))}function r(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,n)})),e.definitions&&e.definitions.forEach((function(e){r(e,n)}))}i.definitions=i.definitions.concat(o(t("89a7").definitions));var l={};function s(e,n){for(var t=0;t0){var r=o;o=new Set,r.forEach((function(e){if(!a.has(e)){a.add(e);var n=l[e]||new Set;n.forEach((function(e){o.add(e)}))}}))}return a.forEach((function(n){var i=s(e,n);i&&t.definitions.push(i)})),t}(function(){i.definitions.forEach((function(e){if(e.name){var n=new Set;r(e,n),l[e.name.value]=n}}))})(),e.exports=i,e.exports["Plan"]=c(i,"Plan")},d715:function(e,n,t){},d739:function(e,n,t){"use strict";var i=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("modal",e._g({attrs:{title:e.title,"max-width":"480"},scopedSlots:e._u([{key:"activator",fn:function(n){return[e._t("default",null,null,n)]}},{key:"default",fn:function(n){var i=n.close;return[t("ApolloMutation",{staticClass:"confirmation-modal-content",attrs:{mutation:e.mutation,variables:e.variables,update:e.update},on:{done:function(n){return e.onDone(i)}},scopedSlots:e._u([{key:"default",fn:function(n){var a=n.mutate,o=n.loading,r=n.error;return[o?e._e():t("alert",{attrs:{error:r}}),t("p",[e._v(e._s(e.message))]),t("div",{staticClass:"mt-8"},[t("div",{staticClass:"zoom-fix"},[t("btn",{attrs:{width:"162","color-type":"accent",disabled:o},on:{click:i}},[e._v(e._s(e.cancelBtn.label))])],1),t("div",{staticClass:"zoom-fix"},[t("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=t("96f1"),r=t("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=(t("2d6a"),t("2877")),d=Object(c["a"])(s,i,a,!1,null,null,null);n["a"]=d.exports},d907:function(e,n,t){"use strict";t.d(n,"a",(function(){return i}));t("b0c0");var i=function(e,n){if(e&&n&&"string"===typeof e.name&&"string"===typeof n.name){var t=e.name.toLowerCase(),i=n.name.toLowerCase();return ti?1:0}return 1}},d995:function(e,n,t){"use strict";t("b710")},daee:function(e,n,t){"use strict";t("1fe6")},e194:function(e,n,t){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 n=e.name.value;return!a[n]&&(a[n]=!0,!0)}))}function r(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,n)})),e.definitions&&e.definitions.forEach((function(e){r(e,n)}))}i.definitions=i.definitions.concat(o(t("c982").definitions));var l={};function s(e,n){for(var t=0;t0){var r=o;o=new Set,r.forEach((function(e){if(!a.has(e)){a.add(e);var n=l[e]||new Set;n.forEach((function(e){o.add(e)}))}}))}return a.forEach((function(n){var i=s(e,n);i&&t.definitions.push(i)})),t}(function(){i.definitions.forEach((function(e){if(e.name){var n=new Set;r(e,n),l[e.name.value]=n}}))})(),e.exports=i,e.exports["AddFacility"]=c(i,"AddFacility")},e1b0:function(e,n,t){"use strict";t("fc52")},e36a:function(e,n,t){"use strict";t("9b2c")},e3c2:function(e,n,t){"use strict";var i=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-expansion-panel-header",e._g(e._b({staticClass:"expansion-panel-header",scopedSlots:e._u([{key:"actions",fn:function(){return[t("v-icon",{staticClass:"icon"},[e._v("$expand")])]},proxy:!0}])},"v-expansion-panel-header",Object.assign({},e.$props,e.$attrs),!1),e.$listeners),[t("span",{staticClass:"header"},[e._t("default")],2)])},a=[],o=t("2b0e"),r=t("c865"),l=o["a"].extend({mixins:[r["a"]]}),s=l.extend({name:"ExpansionPanelHeader",components:{VExpansionPanelHeader:r["a"]}}),c=s,d=(t("72e8"),t("2877")),u=t("6544"),m=t.n(u),f=t("132d"),p=Object(d["a"])(c,i,a,!1,null,null,null);n["a"]=p.exports;m()(p,{VExpansionPanelHeader:r["a"],VIcon:f["a"]})},e4f2:function(e,n,t){},e6fe:function(e,n,t){"use strict";t("222f")},e78c:function(e,n){var t={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}};t.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,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function o(e,n){for(var t=0;t0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["CurrentUser"]=r(t,"CurrentUser")},e845:function(e,n,t){},ea34:function(e,n,t){"use strict";var i=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-tooltip",{attrs:{"max-width":"300",top:"","nudge-top":"-10",disabled:!e.truncated,"open-delay":"600"},scopedSlots:e._u([{key:"activator",fn:function(n){var i=n.on,a=n.attrs;return[t("p",e._g(e._b({ref:"text",staticClass:"truncated-text"},"p",a,!1),i),[t("span",[e._v(e._s(e.text))])])]}}])},[e._v(" "+e._s(e.text)+" ")])},a=[],o=t("3835"),r=t("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 n=this.$refs.text.querySelector("span"),t=new IntersectionObserver((function(n){var t=Object(o["a"])(n,1),i=t[0];e.truncated=i.intersectionRatio<1}),{threshold:[1],root:this.$refs.text});t.observe(n),this.observer=t}}}},s=l,c=(t("d995"),t("2877")),d=t("6544"),u=t.n(d),m=t("3a2f"),f=Object(c["a"])(s,i,a,!1,null,null,null);n["a"]=f.exports;u()(f,{VTooltip:m["a"]})},ec0b:function(e,n,t){"use strict";t("0e21")},ec2a:function(e,n){var t={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}};t.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,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function o(e,n){for(var t=0;t0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["PhoneTypes"]=r(t,"PhoneTypes")},ee99:function(e,n,t){},ef63:function(e,n){var t={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:"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:"urlPhotos"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"summary"},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:[]}]}}]}}]}}],loc:{start:0,end:800}};t.loc.source={body:"mutation 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 id\n name\n squareFootage\n age\n occupancy\n capacity\n use\n siteSize\n replacementCost\n urlPhotos\n summary\n clientId\n createdAt\n updatedAt\n }\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function o(e,n){for(var t=0;t0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["UpdateClient"]=r(t,"UpdateClient")},f2c1:function(e,n,t){"use strict";t("f552")},f552:function(e,n,t){},f5e0:function(e,n,t){"use strict";t("4ced")},f737:function(e,n,t){},f7e4:function(e,n){var t={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}};t.loc.source={body:"mutation DeleteContact($id: ID!) {\n deleteContact(id: $id)\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function o(e,n){for(var t=0;t0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["DeleteContact"]=r(t,"DeleteContact")},f85a:function(e,n,t){"use strict";t("e4f2")},f870:function(e,n,t){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 n=e.name.value;return!a[n]&&(a[n]=!0,!0)}))}function r(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,n)})),e.definitions&&e.definitions.forEach((function(e){r(e,n)}))}i.definitions=i.definitions.concat(o(t("7672").definitions));var l={};function s(e,n){for(var t=0;t0){var r=o;o=new Set,r.forEach((function(e){if(!a.has(e)){a.add(e);var n=l[e]||new Set;n.forEach((function(e){o.add(e)}))}}))}return a.forEach((function(n){var i=s(e,n);i&&t.definitions.push(i)})),t}(function(){i.definitions.forEach((function(e){if(e.name){var n=new Set;r(e,n),l[e.name.value]=n}}))})(),e.exports=i,e.exports["AddFinancialInfo"]=c(i,"AddFinancialInfo")},f8fb:function(e,n){var t={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}};t.loc.source={body:"mutation DeleteComponentOfNeed($id: ID!) {\n deleteComponentOfNeed(id: $id)\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var a={};function o(e,n){for(var t=0;t0){var s=l;l=new Set,s.forEach((function(e){if(!r.has(e)){r.add(e);var n=a[e]||new Set;n.forEach((function(e){l.add(e)}))}}))}return r.forEach((function(n){var i=o(e,n);i&&t.definitions.push(i)})),t}(function(){t.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}}))})(),e.exports=t,e.exports["DeleteComponentOfNeed"]=r(t,"DeleteComponentOfNeed")},fc4b:function(e,n,t){"use strict";t("79ea")},fc52:function(e,n,t){},fdca:function(e,n,t){}}); //# sourceMappingURL=app.3b043864.js.map