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AAiBZ,KAAKf,UAAUgB,QAAQD,KAAKd,WAAWgB,WACtDW,SAAS,sCACT,CAAEC,gBAAiBd,KAAKP,0BAA2BsB,oBAAqBf,KAAKR,iBAAkBwB,KAAMhB,KAAKL,WAAYC,SAAUI,KAAKJ,WACrIQ,oBAGGJ,KAAKf,UAAUgB,QAAQD,KAAKd,WAAWgB,WAC3CW,SAAS,gCACT,CAAED,SAAUA,EAAUI,KAAMhB,KAAKJ,WACjCqB,iBAEIjB,KAAKhB,OAAOkC,OAAM,EACzB,CAEA,UAAAR,GACCV,KAAKT,4BAA8B,KACnCS,KAAKP,2BAA6B,EAClCO,KAAKR,iBAAmB,KACxBQ,KAAKL,WAAa,EACnB,CAEA,QAAAwB,GAECnB,KAAKH,KAAO,CACb,CAEA,gCAAAuB,CAAiCC,EAAkBC,IAClC,GAAbD,GAGHrB,KAAKf,UAAUgB,QAAQD,KAAKd,WAAWgB,WAAWC,IAAI,6CAA6CkB,KAAYjB,aAAamB,MAAKC,IAChIxB,KAAKV,WAAakC,CAAM,GAG1B,CAEA,KAAAN,GACClB,KAAKhB,OAAOyC,QACb,GAtEA,GAAC,EAAAC,W,yEAVW5C,EAAW,GADvB,EAAA6C,W,uBAkB8B,EAAAC,iBAAqC,IAA+B,IAA2C,OAjBjI9C,E","sources":["webpack://client-app/./src/app/components/object/manual-entries/manual-entry.scss","webpack://client-app/./src/app/components/object/manual-entries/manual-entry.html","webpack://client-app/./src/app/components/object/manual-entries/manual-entry.ts"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.manual-entry-modal{width:500px}.manual-entry,.manual-entry--loading{display:flex;flex-direction:column;overflow:hidden;position:relative;min-height:unset !important;width:100%}.manual-entry--loading{height:400px}.manual-entry-container{display:grid;grid-template-columns:1fr;padding:15px}.manual-entry-container .manual-entries__existing-families{display:grid;grid-template-columns:1fr 3.3em;align-items:center;gap:15px}.manual-entry-container .manual-entries__new-placeholder{display:grid;grid-template-rows:auto;grid-auto-rows:auto;grid-auto-flow:row;align-items:center;gap:15px}.manual-entry-container .description{margin-bottom:calc(15px/3)}`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/app/components/object/manual-entries/manual-entry.scss\",\"webpack://./src/resources/customized-styles/variables.scss\"],\"names\":[],\"mappings\":\"AAEA,oBACC,WAAA,CAOD,qCACC,YAAA,CACA,qBAAA,CACA,eAAA,CACA,iBAAA,CACA,2BAAA,CACA,UAAA,CAEA,uBAEC,YAAA,CAIF,wBACC,YAAA,CACA,yBAAA,CACA,YCjBQ,CDmBR,2DACC,YAAA,CACA,+BAAA,CACA,kBAAA,CACA,QCvBO,CD0BR,yDACC,YAAA,CACA,uBAAA,CACA,mBAAA,CACA,kBAAA,CACA,kBAAA,CACA,QChCO,CDoCR,qCACC,0BAAA\",\"sourcesContent\":[\"@import \\\"./src/resources/customized-styles/variables.scss\\\";\\r\\n\\r\\n.manual-entry-modal {\\r\\n\\twidth: 500px;\\r\\n\\r\\n\\t// [data-device-type=mobile] & {\\r\\n\\t// \\twidth: calc(100vw - 60px);\\r\\n\\t// }\\r\\n}\\r\\n\\r\\n.manual-entry {\\r\\n\\tdisplay: flex;\\r\\n\\tflex-direction: column;\\r\\n\\toverflow: hidden;\\r\\n\\tposition: relative;\\r\\n\\tmin-height: unset !important;\\r\\n\\twidth: 100%;\\r\\n\\r\\n\\t&--loading {\\r\\n\\t\\t@extend .manual-entry;\\r\\n\\t\\theight: 400px;\\r\\n\\t}\\r\\n}\\r\\n\\r\\n.manual-entry-container{\\r\\n\\tdisplay: grid;\\r\\n\\tgrid-template-columns: 1fr;\\r\\n\\tpadding: $gutter;\\r\\n\\t\\r\\n\\t.manual-entries__existing-families{\\r\\n\\t\\tdisplay: grid;\\r\\n\\t\\tgrid-template-columns: 1fr 3.3em;\\r\\n\\t\\talign-items: center;\\r\\n\\t\\tgap: $gutter;\\r\\n\\t}\\r\\n\\t\\r\\n\\t.manual-entries__new-placeholder{\\r\\n\\t\\tdisplay: grid;\\r\\n\\t\\tgrid-template-rows: auto;\\r\\n\\t\\tgrid-auto-rows: auto;\\r\\n\\t\\tgrid-auto-flow: row;\\r\\n\\t\\talign-items: center;\\r\\n\\t\\tgap: $gutter;\\r\\n\\t\\t\\r\\n\\t\\t\\r\\n\\t}\\r\\n\\t.description{\\r\\n\\t\\tmargin-bottom: calc(#{$gutter}/3);\\r\\n\\t}\\r\\n\\t\\r\\n}\\r\\n\",\"$text-color: #333;\\r\\n$accent: #00B3C9;\\r\\n$accent-15pct: #D9F4F7;\\r\\n$bs-default: #f1f3f4;\\r\\n$grey: #dddddd;\\r\\n$grey-light: #efefef;\\r\\n$grey-lighter: #F0F3F4;\\r\\n$grey-darker: #A5A3A3;\\r\\n$white-hsl-97: hsla(0deg, 0%, 97%, 1);\\r\\n\\r\\n$gutter: 15px;\\r\\n\\r\\n$box-shadow: 0 0 0.25rem rgba(0, 0, 0, 0.175);\\r\\n$box-shadow-right: 0.05rem 0 0.25rem rgba(0, 0, 0, 0.175);\\r\\n$box-shadow-left: -0.05rem 0 0.25rem rgba(0, 0, 0, 0.175);\\r\\n$box-shadow-color: rgba(0, 0, 0, 0.175);\\r\\n\\r\\n$border-color: rgba(0, 0, 0, 0.175);\\r\\n\\r\\n\\r\\n// Showroom header\\r\\n$showroom-header-height: 350px;\\r\\n$showroom-header-height-small: 150px;\\r\\n$showroom-header-height-mobile: 200px;\\r\\n\\r\\n// Navigation\\r\\n$nav-width: 275px;\\r\\n$nav-width-collapsed: 50px;\\r\\n$nav-height-mobile: 50px;\\r\\n\\r\\n// Top bar\\r\\n$top-bar-height: 4em;\\r\\n\\r\\n// CSS grid table\\r\\n$css-grid-header-height: calc(4em + 1px);\\r\\n\\r\\n// Object Presentation\\r\\n$object-presentation-left-content-width: 250px;\\r\\n$object-presentation-left-content-width-lg: 350px;\\r\\n$object-presentation-img-height: 250px;\\r\\n\\r\\n\\r\\n// Card deck\\r\\n$card-height: 250px;\\r\\n\\r\\n\\r\\n// Select\\r\\n$select-min-width: 200px;\\r\\n\\r\\n\\r\\n// Modal\\r\\n$modal-header-height: 50px;\\r\\n$modal-footer-height: 50px;\\r\\n\\r\\n// Object Properties\\r\\n$object-properties-width: 480px;\\r\\n$object-properties-width--detailed: 560px;\\r\\n$object-properties-width-mobile: 100vw;\\r\\n$object-properties-width-mobile--detailed: 100vw;\\r\\n$object-properties-width-tablet: 480px;\\r\\n$object-properties-width-tablet--detailed: 560px;\\r\\n\\r\\n// Notification Center\\r\\n$notification-center-width: 500px;\\r\\n\\r\\n// 7.0 z-index Setting\\r\\n\\r\\n$btn-scroll-to-top-zindex: 1020 !default;\\r\\n$content-zindex: 1020 !default;\\r\\n$float-submenu-zindex: 1020 !default;\\r\\n$footer-zindex: 1020 !default;\\r\\n$header-zindex: 1020 !default;\\r\\n$header-fixed-zindex: 1040 !default;\\r\\n$sidebar-zindex: 1010 !default;\\r\\n$top-menu-zindex: 1015 !default;\\r\\n$theme-panel-zindex: 1020 !default;\\r\\n$page-loader-zindex : 9999 !default;\\r\\n$page-title-zindex: 1020 !default;\\r\\n$pace-loader-zindex: 1030 !default;\\r\\n$panel-expand-zindex: 1080 !default;\\r\\n\\r\\n// 2.0 RTL Setting\\r\\n\\r\\n$enable-rtl: false !default;\\r\\n\\r\\n// 6.0 App Component Setting\\r\\n@import 'functions.scss';\\r\\n$boxed-layout-width: rem(1280px) !default;\\r\\n$content-padding-x: rem(30px) !default;\\r\\n$content-padding-y: rem(20px) !default;\\r\\n$content-padding-x-sm: rem(20px) !default;\\r\\n$content-padding-y-sm: rem(20px) !default;\\r\\n$header-height: rem(50px) !default;\\r\\n$header-height-sm: rem(50px) !default;\\r\\n$sidebar-width: rem(220px) !default;\\r\\n$sidebar-minified-width: rem(60px) !default;\\r\\n$sidebar-wide-width: rem(250px) !default;\\r\\n$top-menu-height: rem(40px) !default;\\r\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","module.exports = \"\\r\\n\";","import { autoinject, observable, computedFrom } from \"aurelia-framework\";\r\nimport { DialogController } from \"aurelia-dialog\";\r\nimport {ApiClient} from \"../../../services/api-client\";\r\nimport {AppContextService} from \"../../../services/app-context-service\";\r\nimport {Category} from \"../../../models/parameter-definition-dto\";\r\nimport {SummingService} from \"../../../services/summing/summing-service\";\r\n\r\n@autoinject\r\nexport class ManualEntry {\r\n\r\n\t// JG: I believe this is deprecated and not currently used.\r\n\t\r\n\tcategories: Category[] = [];\r\n\tfamilies: any[] = [];\r\n\tquantities: any[] = [];\r\n\r\n\tselectedPlaceholderFamilyId:string | null = null;\r\n\tselectedQuantity:string | null = null\r\n\t@observable selectedProjectCategoryId:number = -1;\r\n\tisExisting:boolean = true;\r\n\tfamilyName:string = \"\";\r\n\ttypeName:string = \"\";\r\n\t\r\n\tstep:number = 1; \r\n\t\r\n\tconstructor(protected dialog: DialogController, private apiClient: ApiClient, private appContext: AppContextService, private summingService: SummingService) {\r\n\t}\r\n\t\r\n\tasync activate(model:any){\r\n\t\tthis.categories = await this.apiClient.project(this.appContext.projectId).get(\"ManualEntry/GetProjectCategories\").jsonResult();\r\n\t\tthis.families = await this.apiClient.project(this.appContext.projectId).get(\"ManualEntry/GetProjectFamilies\").jsonResult();\r\n\t}\r\n\t\r\n\tget allowStep2():boolean {\r\n\t\treturn this.step === 1 && (this.selectedPlaceholderFamilyId !== null || \r\n\t\t\t(this.selectedProjectCategoryId !== -1 && this.selectedQuantity !== null && Boolean(this.familyName)));\t\r\n\t}\r\n\t\r\n\tasync getFamiliesByCategory(category:Category){\r\n\t\tthis.families = await this.apiClient.project(this.appContext.projectId).get(\"ManualEntry/GetProjectFamilies\").jsonResult();\r\n\t}\r\n\r\n\tswapView(){\r\n\t\tthis.resetSteps();\r\n\t\tthis.isExisting = !this.isExisting;\r\n\t}\r\n\t\r\n\tasync submit(){\r\n\t\tlet familyId = this.selectedPlaceholderFamilyId;\r\n\t\tif(familyId === null){\r\n\t\t\tfamilyId = await this.apiClient.project(this.appContext.projectId)\r\n\t\t\t\t.postJson(\"ManualEntry/CreatePlaceholderFamily\", \r\n\t\t\t\t\t{ builtInCategory: this.selectedProjectCategoryId, quantityParameterId: this.selectedQuantity, name: this.familyName, typeName: this.typeName})\r\n\t\t\t\t.jsonResult();\r\n\t\t} \r\n\t\t\r\n\t\tawait this.apiClient.project(this.appContext.projectId)\r\n\t\t\t.postJson(\"ManualEntry/CreateManualEntry\",\r\n\t\t\t\t{ familyId: familyId, name: this.typeName })\r\n\t\t\t.response();\r\n\t\t\r\n\t\tawait this.dialog.close(true);\r\n\t}\r\n\t\r\n\tresetSteps(){\r\n\t\tthis.selectedPlaceholderFamilyId = null;\r\n\t\tthis.selectedProjectCategoryId = -1;\r\n\t\tthis.selectedQuantity = null;\r\n\t\tthis.familyName = \"\";\r\n\t}\r\n\r\n\tnextStep(){\r\n\t\t//Validate step\r\n\t\tthis.step = 2;\r\n\t}\r\n\r\n\tselectedProjectCategoryIdChanged(newValue: number, oldValue: number){\r\n\t\tif(newValue == -1)\r\n\t\t\treturn;\r\n\t\t\r\n\t\tthis.apiClient.project(this.appContext.projectId).get(`ManualEntry/GetCategoryQuantityParameters/${newValue}`).jsonResult().then(result => {\r\n\t\t\tthis.quantities = result;\r\n\t\t});\r\n\t\t\r\n\t}\r\n\t\r\n\tclose(){\r\n\t\tthis.dialog.cancel();\r\n\t}\r\n\t\r\n}\r\n"],"names":["___CSS_LOADER_EXPORT___","push","module","id","exports","ManualEntry","constructor","dialog","apiClient","appContext","summingService","categories","families","quantities","selectedPlaceholderFamilyId","selectedQuantity","selectedProjectCategoryId","isExisting","familyName","typeName","step","activate","model","this","project","projectId","get","jsonResult","allowStep2","Boolean","getFamiliesByCategory","category","swapView","resetSteps","submit","familyId","postJson","builtInCategory","quantityParameterId","name","response","close","nextStep","selectedProjectCategoryIdChanged","newValue","oldValue","then","result","cancel","observable","autoinject","DialogController"],"sourceRoot":""}