{"version":3,"sources":["webpack:///./src/components/SizeSelectorPanel/SizeSelectorPanel.vue?ec57","webpack:///./src/components/SizeSelectorPanel/SizeSelectorPanel.vue","webpack:///./src/components/SizeSelectorPanel/SizeSelectorPanel.vue?3416","webpack:///./src/components/SizeSelectorPanel/SizeSelectorPanel.vue?48e4","webpack:///./src/views/Programs/Participants/ParticipantsBatchEdit.vue?e7ca","webpack:///./src/views/Programs/Participants/ext/batchParticipantHeaders.ts","webpack:///./src/lib/support/models/PlayerProgram/data.ts","webpack:///./src/views/Programs/Participants/ParticipantsBatchEdit.vue","webpack:///./src/views/Programs/Participants/ParticipantsBatchEdit.vue?9e9f","webpack:///./src/views/Programs/Participants/ParticipantsBatchEdit.vue?2310","webpack:///./src/views/Programs/Participants/ParticipantsBatchEdit.vue?cecf","webpack:///./src/lib/support/models/ListInfo/ParticipantOrderProductInfo/data.ts","webpack:///./src/components/SizeSelectorPanel/SizeSelectorPanel.vue?edce","webpack:///./src/components/UDFPanel.vue?2dcc","webpack:///./src/lib/components/UDFPanel/support.ts","webpack:///./src/components/UDFPanel.vue","webpack:///./src/components/UDFPanel.vue?c199","webpack:///./src/components/UDFPanel.vue?929a","webpack:///./src/lib/support/models/ListInfo/ProductColorSizeInfo/data.ts","webpack:///./src/lib/support/components/SizeSelectorPanel/operations.ts"],"names":["render","_vm","this","_h","$createElement","_c","_self","_l","showing","key","id","staticClass","attrs","sizeByID","options","name","on","$event","setSizeById","doNotOrder","updateDNO","model","value","callback","$$v","$set","expression","staticRenderFns","components","SelectInput","CheckboxInput","props","itemList","type","Array","required","default","gender","String","identity","Number","PARTICIPANT","setup","ctx","internalValue","size","v","findIndex","x","productID","splice","typeSizeID","product","prod","find","validProducts","products","filter","o","p","intendedForGender","store","dispatch","sizeTypes","fetchAll","immediate","new_gender","vals","i","length","emit","deep","productsToShow","component","_v","_s","isLeague","isUpwardSelect","loading","saving","selectedParticipant","saveParticipant","cancel","_e","LeagueInfoMoreThanOneProgram","tabs","currentProgram","gradesKey","isByAge","visibleGrades","map","g","upwardTypeID","description","ageByCutoff","selectedGrades","gendersKey","selectedGenders","searchTerm","columnHeaders","filtersParticipants","rowSelected","scopedSlots","_u","fn","ref","item","getProperGradeLabel","typeGradeID","staticStyle","currentParticipant","formattedNameFirstLast","selectedPlayerProgram","evaluations","league","playerUDFs","playerUdfs","showingProducts","productItems","leagueColumnHeaders","text","campColumnHeaders","leagueColumnHeadersByAge","campColumnHeadersByAge","getEmptyPlayerProgram","typeProgramID","adminNotes","carpoolLink","coachLinkIndividualID","payments","pendingCoachLinkFirstName","pendingCoachLinkIndividualID","pendingCoachLinkLastName","yearsExperience","active","jerseyNumber","doNotDraft","leagueAbstraction","programChoice","teamInfo","editEvaluations","editProducts","v4","ordersClient","getLeagueOrderItems","UpwardLeagueId","setCurrentParticipantByID","teamsClient","retrieveTeamInfo","leagueID","individualId","participantsClient","retrieveParticipant","udFs","setLocalCurrentParticipantID","index","programs","pid","alert","save","retrieveParticipantInfo","individualID","playerInfo","updateParticipantData","getProducts","currentPlayerProgram","participantTemplate","$route","params","programType","LEAGUE","participants","lastName","firstName","program","programByIndex","visibleParticipants","toLocaleLowerCase","search","includes","charAt","getUpwardGradeTypeID","d","Set","state","items","indexOf","currentStoreProgram","setCurrentStoreProgram","playerProgram","Mutation","setCurrentProgram","Action","loadProgramParticipants","Getter","participantUnderEdit","FullBody","DataTable","HorizontalTabs","TextInput","TypeProgramTab","PlayerEvaluationEditGrid","Loading","UDFPanel","SizeSelectorPanel","DropDownMultiSelect","methods","getEmptyParticipantOrderProductInfo","allowExchange","allowManualOrder","cmsProductDescription","cmsProductImageUrls","cmsProductName","cmsSizingGuideUrl","cmsUnitDescription","cost","gpItemCategory","gpProgramAbbreviation","hasNumber","includeInactives","isCoachRatioItem","isPlayerRatioItem","isRequired","isSystemInternal","maximumExchangeQuantity","maximumOrderQuantity","oprRegistrationLabel","parentProductID","parentUpwardProductID","productColorSizes","registrationLabel","sortOrder","trackInPlayerDatabase","typeLeagueID","typeParticipantID","typeProductGroupID","typeProductTeamKitModeID","upwardProductID","isColorBasedOnTeamAssignment","size2human","retval","upwardSize","abbreviation","udf","udfid","getUDFValue","toString","label","updateUDFValue","setUDF","udfs","idx","udfValue","getUDF","udfList","editUdfs","input","isEqual","productList2ProductOption","list","sort","a","b","sizeSortOrder","intermediate","y","Identity","genderRule","incoming","COACH","productListToProductSelections","findProduct","upwardOrderID"],"mappings":"2IAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAMJ,EAAIM,GAAIN,EAAkB,gBAAE,SAASO,GAAS,OAAOH,EAAG,MAAM,CAACI,IAAID,EAAQE,GAAGC,YAAY,OAAO,CAACN,EAAG,MAAM,CAACM,YAAY,oCAAoC,CAACN,EAAG,eAAe,CAACI,IAAID,EAAQE,GAAGE,MAAM,CAAC,MAAQX,EAAIY,SAASL,EAAQE,IAAI,aAAaF,EAAQM,QAAQ,qBAAqB,cAAc,sBAAsB,KAAK,MAAQN,EAAQO,MAAMC,GAAG,CAAC,OAAS,SAASC,GAAQ,OAAOhB,EAAIiB,YAAYV,EAAQE,GAAIO,QAAa,GAAGZ,EAAG,MAAM,CAACM,YAAY,sCAAsC,CAACN,EAAG,iBAAiB,CAACO,MAAM,CAAC,MAAQ,cAAc,MAAQJ,EAAQW,YAAYH,GAAG,CAAC,MAAQ,SAASC,GAAQ,OAAOhB,EAAImB,UAAUZ,EAASS,KAAUI,MAAM,CAACC,MAAOd,EAAkB,WAAEe,SAAS,SAAUC,GAAMvB,EAAIwB,KAAKjB,EAAS,aAAcgB,IAAME,WAAW,yBAAyB,QAAO,IAC12BC,EAAkB,G,gKCiDP,iBAAgB,CAC7BZ,KAAM,oBACNa,WAAY,CACVC,cAAA,KACAC,gBAAA,MAEFC,MAAO,CACLC,SAAU,CAAEC,KAAMC,MAAkDC,UAAU,EAAMC,QAAS,iBAAM,KAC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I+P,EAAEtN,WACN0C,YAAa,eAAU,UAAC4K,EAAEtN,kBAAH,QAAiB,QAG1C,OAAO,oBAAOqN,EAAc,Q,sNCqBlBE,E,oCArBN,SAAUC,EAAWtO,EAAgBuO,EAAkBrO,GAC3D,MAAc,KAAVF,GAAiBE,GAAYmO,EAASG,MACrB,IAAZD,GAA8B,KAAZA,GAA+B,KAAZA,EACzB,KAAVvO,GAAiBE,GAAYmO,EAASjO,YAC5B,IAAZmO,GAA8B,KAAZA,EACN,KAAVvO,IACU,IAAZuO,GAA8B,KAAZA,IAe7B,SAAYF,GACV,wBACA,qCAFF,CAAYA,MAAQ,KAYb,IAAMI,EAAiC,SAC5CnN,EACA3B,EACAK,EACAE,GAEA,OAAOoB,EACJF,QAAO,SAACC,GACP,IACO,EADDC,EAAIoN,EAAY/O,EAAU0B,EAAET,WAClC,QAAIU,IACqB,OAAhBD,EAAEP,YAAuBwN,EAAWtO,EAAD,UAASsB,EAAEC,yBAAX,QAAgC,GAAIrB,OAIjFmD,KACC,SAAC1C,GAAD,cACG,CACCtC,GAAIsC,EAAEC,UACNlC,KAAMgQ,EAAY/O,EAAUgB,EAAEC,WAAWqL,kBACzCnN,WAAY6B,EAAE7B,WACdL,QAAS,GAAF,sBAEDkC,EAAEgO,eAAF,UAAmBD,EAAY/O,EAAUgB,EAAEC,kBAA3C,OAAmB,EAAoC6K,WACvD,GACA,CAAC,CAAEpN,GAAI,OAAQmF,YAAa,6BAJ3B,eAMF,eAAyB,UAACkL,EAAY/O,EAAUgB,EAAEC,WAAWoL,yBAApC,QAAyD,WAS3F,SAAU0C,EAAY/O,EAAyCgB,GAAS,MAC5E,iBAAOhB,EAASsB,MAAK,SAACmN,GAAD,OAAOA,EAAE/P,IAAMsC,YAApC,QAA0C","file":"js/chunk-c04cf32a.12d9c133.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',_vm._l((_vm.productsToShow),function(showing){return _c('div',{key:showing.id,staticClass:\"row\"},[_c('div',{staticClass:\"col-sm-7 align-self-stretch pr-0\"},[_c('select-input',{key:showing.id,attrs:{\"value\":_vm.sizeByID(showing.id),\"items-list\":showing.options,\"text-property-name\":\"description\",\"value-property-name\":\"id\",\"label\":showing.name},on:{\"change\":function($event){return _vm.setSizeById(showing.id, $event)}}})],1),_c('div',{staticClass:\"col-sm-auto align-self-center pl-0\"},[_c('checkbox-input',{attrs:{\"label\":\"Never Order\",\"value\":showing.doNotOrder},on:{\"input\":function($event){return _vm.updateDNO(showing, $event)}},model:{value:(showing.doNotOrder),callback:function ($$v) {_vm.$set(showing, \"doNotOrder\", $$v)},expression:\"showing.doNotOrder\"}})],1)])}),0)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { computed, defineComponent, PropType, ref, watch, onMounted } from '@vue/composition-api'\nimport { ParticipantOrderProductInfo } from '@/GeneratedTypes/ListInfo/ParticipantOrderProductInfo'\nimport { cloneDeep, isEqual } from 'lodash'\nimport SelectInput from '@/elements/SelectInput.vue'\nimport CheckboxInput from '@/elements/CheckboxInput.vue'\nimport { CoachProduct } from '@/GeneratedTypes/CoachProduct'\nimport {\n productListToProductSelections,\n findProduct,\n genderRule,\n Identity,\n ProductSelections,\n} from '@/lib/support/components/SizeSelectorPanel/operations'\nimport store from '@/store'\n\nexport default defineComponent({\n name: 'SizeSelectorPanel',\n components: {\n SelectInput,\n CheckboxInput,\n },\n props: {\n itemList: { type: Array as PropType, required: true, default: () => [] },\n value: { type: Array as PropType, required: true, default: () => [] },\n gender: { type: String, required: true, default: () => '' },\n identity: { type: Number, required: false, default: () => Identity.PARTICIPANT },\n },\n\n setup(props, ctx) {\n const internalValue = ref([])\n\n onMounted(async () => {\n await store.dispatch.sizeTypes.fetchAll(false) //get these cached up\n })\n\n /**\n * Move our prop into internal mutable state\n */\n watch(\n () => props.value,\n () => {\n if (!isEqual(internalValue.value, props.value)) {\n internalValue.value = cloneDeep(props.value)\n }\n },\n { immediate: true }\n )\n\n /**\n * The intention here is to clear size on a product that is not appropriate for a gender after the gender\n * has been switched\n */\n watch(\n () => props.gender,\n (new_gender) => {\n const vals = cloneDeep(props.value)\n\n for (let i = 0; i < vals.length; i++) {\n const p = findProduct(props.itemList, vals[i].productID)\n if (p) {\n if (!genderRule(new_gender, p.intendedForGender ?? '', props.identity) && vals[i].typeSizeID) {\n vals[i].typeSizeID = ''\n }\n }\n }\n if (!isEqual(internalValue.value, vals)) {\n internalValue.value = vals\n }\n }\n )\n\n /**\n * Trigger an input event if the internal model is updated\n */\n watch(\n () => internalValue.value,\n () => {\n //return only the product that are valid for this participant\n ctx.emit('input', validProducts(internalValue.value))\n },\n { deep: true }\n )\n\n /**\n * Takes the product id and size and sets it internally, should\n * produce an event with the watcher above.\n * @param id\n * @param size\n */\n function setSizeById(id: number, size: string) {\n const v = internalValue.value.findIndex((x) => x.productID == id)\n if (v >= 0) {\n internalValue.value.splice(v, 1, { ...internalValue.value[v], typeSizeID: size })\n }\n }\n\n function updateDNO(product: ProductSelections) {\n const v = internalValue.value.findIndex((x) => x.productID == product.id)\n if (v >= 0) {\n internalValue.value.splice(v, 1, { ...internalValue.value[v], doNotOrder: product.doNotOrder })\n }\n }\n\n function sizeByID(id: number) {\n const prod = props.value.find((x) => x.productID == id)\n return prod?.typeSizeID ?? ''\n }\n\n /**\n * Filter out any products that are not for the gender of the current participant or coach being edited\n */\n function validProducts(products: CoachProduct[]): CoachProduct[] {\n const x = products.filter((o) => {\n const p = findProduct(props.itemList, o.productID)\n if (p) {\n return genderRule(props.gender, p.intendedForGender ?? '', props.identity)\n }\n return false\n })\n return x\n }\n\n /**\n * Show products that have size info needed. Build the options above.\n */\n const productsToShow = computed(() => {\n // these products per thomas don't get passed back or shown on the UI, only one size.\n const p = productListToProductSelections(props.value, props.itemList, props.gender, props.identity)\n return p\n })\n\n return { productsToShow, sizeByID, setSizeById, updateDNO }\n },\n})\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SizeSelectorPanel.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SizeSelectorPanel.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./SizeSelectorPanel.vue?vue&type=template&id=08d26692&scoped=true&\"\nimport script from \"./SizeSelectorPanel.vue?vue&type=script&lang=ts&\"\nexport * from \"./SizeSelectorPanel.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./SizeSelectorPanel.vue?vue&type=style&index=0&id=08d26692&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"08d26692\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('FullBody',[_c('div',{staticClass:\"container-fluid\"},[_c('div',{staticClass:\"row pt-3 pb-2 pr-2\"},[_c('div',{staticClass:\"col-sm-auto\"},[_c('h5',{staticClass:\"px-3 py-1\"},[_c('router-link',{staticClass:\"text-primary\",attrs:{\"to\":\"./list\"}},[_vm._v(\"Participants\")]),_vm._v(\" > \"),_c('span',[_vm._v(_vm._s(_vm.isLeague && !_vm.isUpwardSelect ? 'Batch Evaluations' : 'Batch Products'))])],1)]),_c('div',{staticClass:\"col-sm text-right\"},[_c('button',{staticClass:\"btn btn-success mb-auto mr-2\",attrs:{\"disabled\":_vm.loading || _vm.saving || !_vm.selectedParticipant},on:{\"click\":_vm.saveParticipant}},[(_vm.loading || _vm.saving)?_c('loading',{attrs:{\"is-small\":\"\"}}):[_c('i',{staticClass:\"fa fa-check mr-2\"})],_vm._v(\" Save \")],2),_c('button',{staticClass:\"btn b btn-outline-dark mb-auto mr-2\",attrs:{\"disabled\":_vm.loading || _vm.saving || !_vm.selectedParticipant},on:{\"click\":_vm.cancel}},[(_vm.loading)?_c('loading',{attrs:{\"is-small\":\"\"}}):_vm._e(),_vm._v(\" Cancel \")],1)])])]),_c('div',{staticClass:\"bg-light-1 p-3 flex-grow-1\"},[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-xl-7\"},[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-sm\"},[(_vm.LeagueInfoMoreThanOneProgram(_vm.tabs))?_c('type-program-tab',{staticClass:\"underline-split bg-light-1 mb-2\",attrs:{\"programs\":_vm.tabs},model:{value:(_vm.currentProgram),callback:function ($$v) {_vm.currentProgram=$$v},expression:\"currentProgram\"}}):_vm._e()],1),_c('div',{staticClass:\"col-sm-auto p-1\"},[_c('DropDownMultiSelect',{key:_vm.gradesKey,attrs:{\"label\":_vm.isByAge ? 'Ages' : 'Grades',\"items\":_vm.visibleGrades.map(function (g) {\n return { id: g.upwardTypeID, description: _vm.isByAge ? g.ageByCutoff : g.description }\n })},model:{value:(_vm.selectedGrades),callback:function ($$v) {_vm.selectedGrades=$$v},expression:\"selectedGrades\"}})],1),_c('div',{staticClass:\"col-sm-auto p-1\"},[_c('DropDownMultiSelect',{key:_vm.gendersKey,attrs:{\"label\":\"Genders\",\"items\":[\n { id: 'M', description: 'Male' },\n { id: 'F', description: 'Female' } ]},model:{value:(_vm.selectedGenders),callback:function ($$v) {_vm.selectedGenders=$$v},expression:\"selectedGenders\"}})],1),_c('div',{staticClass:\"col-sm-auto p-1 mr-3\"},[_c('text-input',{attrs:{\"prependIcon\":\"search\"},model:{value:(_vm.searchTerm),callback:function ($$v) {_vm.searchTerm=$$v},expression:\"searchTerm\"}})],1)]),_c('DataTable',{staticClass:\"data-table-zebra mt-5\",attrs:{\"headers\":_vm.columnHeaders,\"items\":_vm.filtersParticipants,\"items-per-page\":15,\"dense\":\"\",\"sort-by\":\"name\"},on:{\"rowSelected\":_vm.rowSelected},scopedSlots:_vm._u([{key:\"item.typeGradeID\",fn:function(ref){\n var item = ref.item;\nreturn [_vm._v(\" \"+_vm._s(_vm.getProperGradeLabel(item.typeGradeID, false, ''))+\" \")]}}])})],1),_c('div',{staticClass:\"col-xl border-xl-left\"},[_c('div',{staticStyle:{\"position\":\"sticky\",\"top\":\"80px\"}},[(_vm.currentParticipant)?_c('h5',[_vm._v(_vm._s(_vm.currentParticipant.formattedNameFirstLast))]):_vm._e(),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-8\"},[(\n _vm.selectedPlayerProgram &&\n _vm.selectedPlayerProgram.evaluations &&\n _vm.selectedPlayerProgram.evaluations.length\n )?_c('player-evaluation-edit-grid',{model:{value:(_vm.selectedPlayerProgram.evaluations),callback:function ($$v) {_vm.$set(_vm.selectedPlayerProgram, \"evaluations\", $$v)},expression:\"selectedPlayerProgram.evaluations\"}}):_vm._e()],1),(_vm.selectedParticipant && _vm.league.playerUDFs && _vm.league.playerUDFs.length)?_c('div',{staticClass:\"col-md-8\"},[_c('hr'),_c('h6',{staticClass:\"mt-2\"},[_vm._v(\"User Defined Fields\")]),_c('u-d-f-panel',{attrs:{\"udf-list\":_vm.league.playerUDFs},model:{value:(_vm.playerUdfs),callback:function ($$v) {_vm.playerUdfs=$$v},expression:\"playerUdfs\"}})],1):_vm._e(),(_vm.showingProducts && _vm.selectedPlayerProgram && _vm.currentParticipant)?_c('div',{staticClass:\"col-md-8\"},[_c('hr'),_c('h6',{staticClass:\"mt-2\"},[_vm._v(\"Products\")]),_c('size-selector-panel',{attrs:{\"gender\":_vm.currentParticipant.gender,\"item-list\":_vm.productItems},model:{value:(_vm.selectedPlayerProgram.products),callback:function ($$v) {_vm.$set(_vm.selectedPlayerProgram, \"products\", $$v)},expression:\"selectedPlayerProgram.products\"}})],1):_vm._e()])])])])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { DataTableHeader } from 'vuetify/types'\n\nexport const leagueColumnHeaders: DataTableHeader[] = [\n { text: 'Name', value: 'name' },\n { text: 'Gender', value: 'gender' },\n { text: 'Grade', value: 'typeGradeID' },\n { text: 'Score', value: 'evaluationScore' },\n]\n\nexport const campColumnHeaders: DataTableHeader[] = [\n { text: 'Name', value: 'name' },\n { text: 'Gender', value: 'gender' },\n { text: 'Grade', value: 'typeGradeID' },\n]\n\nexport const leagueColumnHeadersByAge: DataTableHeader[] = [\n { text: 'Name', value: 'name' },\n { text: 'Gender', value: 'gender' },\n { text: 'Age', value: 'ageByCutoff' },\n { text: 'Score', value: 'evaluationScore' },\n]\n\nexport const campColumnHeadersByAge: DataTableHeader[] = [\n { text: 'Name', value: 'name' },\n { text: 'Gender', value: 'gender' },\n { text: 'Age', value: 'ageByCutoff' },\n]\n","import { PlayerProgram } from '@/GeneratedTypes/PlayerProgram'\n\nexport function getEmptyPlayerProgram(): PlayerProgram {\n return {\n typeProgramID: '',\n evaluations: [],\n adminNotes: '',\n carpoolLink: null,\n coachLinkIndividualID: 0,\n payments: [],\n pendingCoachLinkFirstName: '',\n pendingCoachLinkIndividualID: 0,\n pendingCoachLinkLastName: '',\n products: [],\n yearsExperience: 0,\n active: true,\n jerseyNumber: '',\n doNotDraft: false,\n }\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Vue, Watch } from 'vue-property-decorator'\n\nimport {\n namespace as participantStoreName,\n actionNames,\n mutationNames,\n getterNames,\n LoadProgramParticipantsArgs,\n} from '@/store/participants'\nimport { namespace as leagueStoreName } from '@/store/leagues'\nimport { leagueAbstractionNamespace } from '@/store/leagueAbstraction'\nimport { namespace } from 'vuex-class'\nimport { namespace as gradeStoreName } from '@/store/gradeTypes'\nimport * as gradeStore from '@/store/gradeTypes'\n\nconst participants = namespace(participantStoreName)\nconst league = namespace(leagueStoreName)\nconst leagueAbstraction = namespace(leagueAbstractionNamespace)\nconst gradeTypes = namespace(gradeStoreName)\n\n/**types */\nimport { LeaguePlayerInfo } from '@/GeneratedTypes/ListInfo/LeaguePlayerInfo'\nimport { League } from '@/GeneratedTypes/League'\nimport { LeagueProgram } from '@/GeneratedTypes/LeagueProgram'\nimport { PlayerInfoIDType } from '@/lib/support/models/LeaguePlayerInfo/data'\nimport { LeaguePlayer } from '@/GeneratedTypes/LeaguePlayer'\n\n/** external data */\nimport {\n leagueColumnHeaders,\n campColumnHeaders,\n leagueColumnHeadersByAge,\n campColumnHeadersByAge,\n} from './ext/batchParticipantHeaders'\n\n/**components */\nimport Loading from '@/elements/Loading.vue'\nimport FullBody from '@/components/FullBody.vue'\nimport TextInput from '@/elements/TextInput.vue'\nimport HorizontalTabs from '@/components/HorizontalNavTabs.vue'\nimport DataTable from '@/elements/DataTable/DataTable.vue'\nimport { DataTableSelection } from '@/models/DataTable/DataTableSelection'\nimport PlayerEvaluationEditGrid from '@/components/PlayerEvaluationEditGrid.vue'\nimport UDFPanel from '@/components/UDFPanel.vue'\n\n/** local components */\nimport TypeProgramTab from '@/components/TypeProgramTab.vue'\nimport { LeagueProgams2LeagueListItem } from '@/lib/support/models/LeagueListItem/LeaguePrograms2LeagueListItem'\nimport {\n LeagueInfoMoreThanOneProgram,\n LeagueListItemSeed,\n getEmptyLeagueListItem,\n} from '@/lib/support/models/LeagueListItem/data'\n\nimport { LeagueListItem } from '@/models/Program/LeagueListItem'\nimport { PlayerId } from '@/lib/support/models/LeaguePlayer/data'\nimport teamsClient from '@/clients/teamsClient'\nimport { DivisionTeamInfo } from '@/GeneratedTypes/ListInfo/DivisionTeamInfo'\nimport { PlayerProgram } from '@/GeneratedTypes/PlayerProgram'\nimport { getEmptyPlayerProgram } from '@/lib/support/models/PlayerProgram/data'\nimport { PlayerEvaluation } from '@/GeneratedTypes/PlayerEvaluation'\nimport participantsClient from '@/clients/participantsClient'\nimport { UDFValue } from '@/lib/support/components/UDFPanel/UDFValue'\nimport { PlayerProduct } from '@/GeneratedTypes/PlayerProduct'\nimport { ParticipantOrderProductInfo } from '@/GeneratedTypes/ListInfo/ParticipantOrderProductInfo'\nimport { UpwardGradeTypeID } from '@/GeneratedTypes/UpwardTypes/UpwardGradeTypeID'\nimport SizeSelectorPanel from '@/components/SizeSelectorPanel/SizeSelectorPanel.vue'\nimport ordersClient from '@/clients/ordersClient'\nimport { productListToProductSelections } from '@/lib/support/components/SizeSelectorPanel/operations'\nimport { Identity } from '@/lib/support/components/SizeSelectorPanel/operations'\nimport { UpwardOpportunityTypes } from '@/lib/common/upwardOpportunityTypes'\nimport DropDownMultiSelect from '@/components/DropDownMultiSelect.vue'\nimport { MultiSelectValue } from '@/lib/support/components/MultiSelect/MultiSelectValue'\nimport uuid from 'uuid'\nimport { getProperGradeLabel } from '@/services/gradeService'\n\n@Component({\n components: {\n FullBody,\n DataTable,\n HorizontalTabs,\n TextInput,\n TypeProgramTab,\n PlayerEvaluationEditGrid,\n Loading,\n UDFPanel,\n SizeSelectorPanel,\n DropDownMultiSelect,\n },\n methods: {\n LeagueInfoMoreThanOneProgram,\n getProperGradeLabel,\n },\n})\nexport default class ParticipantsBatchEdit extends Vue {\n saving = false\n searchTerm = ''\n selectedParticipant: LeaguePlayer | null = null\n playerUdfs: UDFValue[] | null = null\n\n @participants.Mutation(mutationNames.setCurrentProgram) setCurrentStoreProgram!: ({\n program,\n }: {\n program: string\n }) => void\n\n @participants.Mutation(mutationNames.updateParticipantData) updateParticipantData!: ({\n playerInfo,\n }: {\n playerInfo: LeaguePlayerInfo\n }) => void\n\n /** actions */\n @participants.Action(actionNames.setCurrentParticipantByID) setCurrentParticipantByID!: ({\n id,\n typeProgramID,\n }: {\n id: PlayerInfoIDType\n typeProgramID: string\n }) => Promise\n\n @participants.Action(actionNames.loadProgramParticipants) loadProgramParticipants!: (\n p: LoadProgramParticipantsArgs\n ) => void\n\n /** getters */\n @league.Getter('currentItem')\n league!: League\n\n @leagueAbstraction.Getter('currentItem') leagueAbstraction!: League\n @leagueAbstraction.Getter('programType') programType!: number\n @leagueAbstraction.Getter('isUpwardSelect') isUpwardSelect!: boolean\n @leagueAbstraction.Getter('isByAge') isByAge!: boolean\n\n @participants.Getter('participants')\n participants!: LeaguePlayerInfo[]\n\n currentParticipant: LeaguePlayerInfo | null = null\n\n @participants.Getter('currentProgram')\n currentStoreProgram!: string\n\n @participants.Getter(getterNames.participantUnderEdit)\n readonly participantTemplate!: LeaguePlayer\n\n @gradeTypes.Getter('byUpwardTypeId')\n getUpwardGradeTypeID!: (typeID: string) => UpwardGradeTypeID | null\n\n programChoice = 0\n get currentPlayerProgram(): PlayerProgram {\n if (this.participantTemplate?.programs?.[this.programChoice]) {\n return this.participantTemplate?.programs?.[this.programChoice]\n }\n return getEmptyPlayerProgram() //programs not loaded, or invalid program.\n }\n\n private teamInfo: DivisionTeamInfo[] = []\n private editEvaluations: PlayerEvaluation[] = []\n private productItems: ParticipantOrderProductInfo[] = []\n private editProducts: PlayerProduct[] = []\n private selectedGrades: MultiSelectValue[] = []\n private selectedGenders: MultiSelectValue[] = []\n private gradesKey: string = uuid.v4()\n private gendersKey: string = uuid.v4()\n\n private get UpwardLeagueId(): string {\n return this.$route.params.id ?? ''\n }\n\n get columnHeaders() {\n if (this.isByAge) {\n if (!this.isLeague) {\n return campColumnHeadersByAge\n }\n return leagueColumnHeadersByAge\n } else {\n if (!this.isLeague) {\n return campColumnHeaders\n }\n return leagueColumnHeaders\n }\n }\n\n get isLeague() {\n return this.programType == UpwardOpportunityTypes.LEAGUE\n }\n\n /**\n * Determines if products are shown\n */\n private get showingProducts() {\n return (\n this.productItems?.length &&\n this.editProducts?.length &&\n productListToProductSelections(\n this.editProducts,\n this.productItems,\n this.currentParticipant?.gender ?? '',\n Identity.PARTICIPANT\n ).length\n )\n }\n\n /***\n * Visible participants are influenced by the current tab\n */\n get visibleParticipants() {\n const participants = this.participants.map((p) => {\n return { ...p, name: `${p.lastName}, ${p.firstName}` }\n })\n\n const program = this.programByIndex(this.currentProgram)\n if (program && this.isLeague) {\n return participants.filter((x) => program.typeProgramID == x.typeProgramID)\n }\n return participants\n }\n\n get filtersParticipants() {\n return this.visibleParticipants\n .filter(\n (x) =>\n x.firstName &&\n x.lastName &&\n `${x.firstName} ${x.lastName!}`.toLocaleLowerCase().search(this.searchTerm.toLocaleLowerCase()) !=\n -1\n )\n .filter(\n (x) =>\n this.selectedGrades.length == 0 || this.selectedGrades.map((g) => g.id).includes(x.typeGradeID!)\n )\n .filter(\n (x) =>\n this.selectedGenders.length == 0 ||\n this.selectedGenders.map((g) => g.id.charAt(0)).includes(x.gender!)\n )\n .map((x) => {\n return { ...x, ageByCutoff: this.getUpwardGradeTypeID(x.typeGradeID!)?.ageByCutoff }\n })\n }\n\n get visibleGrades() {\n const d = [...new Set(this.visibleParticipants.map((x) => x.typeGradeID))]\n return gradeStore.gradeTypes.state.items.filter((g) => d.indexOf(g.upwardTypeID) >= 0)\n }\n\n get loading(): boolean {\n return !this.participants || this.participants.length === 0\n }\n\n /***\n * Returns the structure to define the tabs based on loaded league\n */\n /** index into this.leagues.programs[] variables */\n get currentProgram(): string {\n return this.currentStoreProgram\n }\n\n set currentProgram(p: string) {\n this.setCurrentStoreProgram({ program: p })\n }\n\n get tabs(): LeagueListItem {\n if (this.leagueAbstraction && this.leagueAbstraction.programs) {\n this.currentProgram = this.leagueAbstraction.programs[0].typeProgramID\n return LeagueProgams2LeagueListItem(this.leagueAbstraction.programs)\n }\n return getEmptyLeagueListItem(new LeagueListItemSeed())\n }\n\n get selectedPlayerProgram(): PlayerProgram | null {\n if (!this.currentProgram || !this.selectedParticipant || !this.selectedParticipant.programs) {\n return null\n }\n const playerProgram = this.selectedParticipant.programs.find(\n (p) => p.typeProgramID === this.currentProgram && p.active\n )\n if (!playerProgram) {\n return null\n }\n return playerProgram\n }\n\n /**\n * Returns the order list of things a participant needs to order\n */\n async getProducts() {\n this.productItems = (await ordersClient.getLeagueOrderItems(this.UpwardLeagueId)) ?? []\n }\n\n async setLocalCurrentParticipantID(id: PlayerInfoIDType) {\n this.saving = true\n await this.setCurrentParticipantByID({ id: id, typeProgramID: this.currentProgram })\n this.teamInfo = await teamsClient.retrieveTeamInfo({\n leagueID: this.UpwardLeagueId,\n individualId: id,\n })\n\n this.selectedParticipant = await participantsClient.retrieveParticipant(this.UpwardLeagueId, id)\n\n if (this.selectedParticipant) {\n this.playerUdfs = this.selectedParticipant.udFs\n }\n\n this.saving = false\n }\n\n rowSelected(x: DataTableSelection) {\n this.currentParticipant = x.item\n const id = PlayerId(x.item)\n if (id) {\n this.setLocalCurrentParticipantID(id)\n }\n }\n programByIndex(index: string): LeagueProgram | null {\n if (this?.league?.programs) {\n let id = this.league.programs.findIndex((x) => x.typeProgramID == index)\n if (id < 0) {\n id = 0\n }\n return this?.league?.programs![id] ?? null\n }\n return null\n }\n\n formerParticipantSearchSelected(pid: PlayerInfoIDType) {\n alert('selected former participant' + pid)\n }\n\n async saveParticipant() {\n if (!this.selectedPlayerProgram || !this.selectedParticipant) {\n return\n }\n\n this.saving = true\n this.selectedParticipant.udFs = this.playerUdfs\n await participantsClient.save(this.UpwardLeagueId, this.selectedParticipant)\n\n const playerInfo = await participantsClient.retrieveParticipantInfo(\n this.UpwardLeagueId,\n this.selectedParticipant.individualID\n )\n\n if (playerInfo) {\n this.updateParticipantData({ playerInfo: playerInfo })\n }\n this.currentParticipant = null\n this.selectedParticipant = null\n this.playerUdfs = []\n this.saving = false\n }\n\n cancel() {\n this.currentParticipant = null\n this.selectedParticipant = null\n this.playerUdfs = []\n }\n\n private async mounted() {\n await this.getProducts()\n }\n @Watch('currentPlayerProgram.products', { immediate: true })\n private onProductsChange() {\n this.editProducts = [...(this.currentPlayerProgram.products || [])]\n }\n @Watch('currentProgram', { immediate: true })\n private onProgramChange() {\n this.gradesKey = uuid.v4()\n this.gendersKey = uuid.v4()\n this.selectedGrades = []\n this.selectedGenders = []\n this.searchTerm = ''\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ParticipantsBatchEdit.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ParticipantsBatchEdit.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./ParticipantsBatchEdit.vue?vue&type=template&id=7b023202&scoped=true&\"\nimport script from \"./ParticipantsBatchEdit.vue?vue&type=script&lang=ts&\"\nexport * from \"./ParticipantsBatchEdit.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./ParticipantsBatchEdit.vue?vue&type=style&index=0&id=7b023202&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"7b023202\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ParticipantsBatchEdit.vue?vue&type=style&index=0&id=7b023202&lang=scss&scoped=true&\"","import { ParticipantOrderProductInfo } from '@/GeneratedTypes/ListInfo/ParticipantOrderProductInfo'\nimport { sizeTypes } from '@/store/sizeTypes'\n\nexport function getEmptyParticipantOrderProductInfo() {\n return {\n allowExchange: false,\n allowManualOrder: false,\n cmsProductDescription: '',\n cmsProductImageUrls: null,\n cmsProductName: '',\n cmsSizingGuideUrl: '',\n cmsUnitDescription: '',\n cost: 0,\n gpItemCategory: '',\n gpProgramAbbreviation: '',\n hasNumber: false,\n id: 0,\n includeInactives: false,\n intendedForGender: '',\n isCoachRatioItem: false,\n isPlayerRatioItem: false,\n isRequired: false,\n isSystemInternal: false,\n maximumExchangeQuantity: 0,\n maximumOrderQuantity: 0,\n oprRegistrationLabel: '',\n parentProductID: 0,\n parentUpwardProductID: '',\n productColorSizes: null,\n registrationLabel: '',\n sortOrder: 0,\n trackInPlayerDatabase: false,\n typeLeagueID: '',\n typeParticipantID: '',\n typeProductGroupID: '',\n typeProductTeamKitModeID: '',\n typeProgramID: '',\n upwardProductID: '',\n isColorBasedOnTeamAssignment: false,\n } as ParticipantOrderProductInfo\n}\n\n/**\n * changes a product size to something humans that speak english will find\n * understandable.\n * @param size\n * @return human language version of size\n */\nexport function size2human(size: string) {\n let retval = '???'\n const upwardSize = sizeTypes.state.items.find((x) => x.abbreviation === size)\n if (upwardSize) {\n retval = upwardSize.description!\n }\n\n return retval\n}\n","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SizeSelectorPanel.vue?vue&type=style&index=0&id=08d26692&lang=scss&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',_vm._l((_vm.udfList),function(udf){return _c('TextInput',{key:udf.udfid,attrs:{\"value\":_vm.getUDFValue(udf.udfid),\"name\":udf.udfid.toString(),\"label\":udf.label,\"sub-label\":udf.description,\"maxlength\":64},on:{\"input\":function($event){return _vm.updateUDFValue($event, udf.udfid)}}})}),1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { UDFValue } from '@/lib/support/components/UDFPanel/UDFValue'\n\n/**\n * Finds the udf by id in udfs and replaces the value with the one supplied\n * @param udf - value to replace\n * @param udfs - list of udfs\n */\nexport function setUDF(udf: UDFValue, udfs: UDFValue[]) {\n let idx = udfs.findIndex((x) => x.udfid == udf.udfid)\n if (udf.udfValue) {\n if (idx < 0) {\n idx = udfs.length\n }\n udfs[idx] = udf\n } else {\n if (idx >= 0) {\n udfs.splice(idx, 1) //if empty then remove the element\n }\n }\n}\n\n/**\n * Returns the UDF associated with the id or a new one if not found.\n * @param udfid id to find\n * @param udfs list of udfs\n */\nexport function getUDF(udfid: number, udfs: UDFValue[]) {\n const idx = udfs.findIndex((x) => x.udfid == udfid)\n\n if (idx >= 0) {\n return udfs[idx]\n }\n return { udfid: udfid, udfValue: '' }\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { defineComponent, ref, watch, PropType } from '@vue/composition-api'\nimport { getEmptyPlayerUDFs } from '@/lib/support/models/PlayerUDFValue/data'\n\nimport TextInput from '@/elements/TextInput.vue'\nimport { UDFDefinition } from '@/lib/support/components/UDFPanel/UDFDefinition'\nimport { UDFValue } from '@/lib/support/components/UDFPanel/UDFValue'\nimport { getUDF, setUDF } from '@/lib/components/UDFPanel/support'\nimport lodash from 'lodash'\n\nexport default defineComponent({\n name: 'UDFPanel',\n components: {\n TextInput,\n },\n props: {\n udfList: { type: Array as PropType, default: () => [], required: true },\n value: { type: Array as PropType, default: () => getEmptyPlayerUDFs(), required: true },\n },\n setup(props, ctx) {\n const editUdfs = ref(getEmptyPlayerUDFs())\n\n function input() {\n ctx.emit('input', editUdfs.value)\n }\n\n function getUDFValue(id: number) {\n const udf = getUDF(id, editUdfs.value)\n return udf.udfValue\n }\n\n function updateUDFValue(value: string, name: number) {\n setUDF({ udfid: name, udfValue: value }, editUdfs.value)\n input()\n }\n\n watch(\n () => props.value,\n () => {\n if (!lodash.isEqual(props.value, editUdfs.value)) {\n editUdfs.value = [...props.value]\n }\n },\n { deep: true, immediate: true }\n )\n\n return {\n getUDFValue,\n updateUDFValue,\n }\n },\n})\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./UDFPanel.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./UDFPanel.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./UDFPanel.vue?vue&type=template&id=1679acea&scoped=true&\"\nimport script from \"./UDFPanel.vue?vue&type=script&lang=ts&\"\nexport * from \"./UDFPanel.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"1679acea\",\n null\n \n)\n\nexport default component.exports","import { ProductColorSizeInfo } from '@/GeneratedTypes/ListInfo/ProductColorSizeInfo'\nimport { cloneDeep, uniqBy } from 'lodash'\nimport { size2human } from '../ParticipantOrderProductInfo/data'\n\n/**\n * Returns a valid list of sizes for a product option\n * This function will consolidate type variations for a given product.\n * @param list\n */\nexport function productList2ProductOption(list: ProductColorSizeInfo[]) {\n const v = cloneDeep(list)\n v.sort((a, b) => (a.sizeSortOrder > b.sizeSortOrder ? 1 : -1))\n const intermediate = v.map((y) => ({\n id: y.typeSizeID,\n description: size2human(y.typeSizeID ?? ''),\n }))\n\n return uniqBy(intermediate, 'id')\n}\n","/**\n * These are operations that support a size selector.\n * They were externalized to allow the showing of a label based on size selection criteria being relevant.\n */\n\nimport { CoachProduct } from '@/GeneratedTypes/CoachProduct'\nimport { ParticipantOrderProductInfo } from '@/GeneratedTypes/ListInfo/ParticipantOrderProductInfo'\nimport { productList2ProductOption } from '@/lib/support/models/ListInfo/ProductColorSizeInfo/data'\nimport { getEmptyParticipantOrderProductInfo } from '@/lib/support/models/ListInfo/ParticipantOrderProductInfo/data'\n\n/***\n * Hide product selection until gender is selected\n * @param gender gender selected\n * @param incoming gender rule of product\n * @return if the product should be shown.\n */\n\nexport function genderRule(gender: string, incoming: string, identity: Identity) {\n if (gender == 'F' && identity == Identity.COACH) {\n return incoming == '' || incoming == 'F' || incoming == 'M'\n } else if (gender == 'F' && identity == Identity.PARTICIPANT) {\n return incoming == '' || incoming == 'F'\n } else if (gender == 'M') {\n return incoming == '' || incoming == 'M'\n } else return false\n}\n\nexport interface ProductOption {\n id: string\n description: string\n}\nexport interface ProductSelections {\n id: number\n name: string\n doNotOrder: boolean\n options: ProductOption[]\n}\n\nexport enum Identity {\n COACH,\n PARTICIPANT,\n}\n\n/**\n * Not every product gets shown on UI, just show the ones where typeSizeID is selectable (not N/A) and\n * that matches the gender rule.\n * @param p\n * @param itemList\n * @param gender\n */\nexport const productListToProductSelections = (\n p: CoachProduct[],\n itemList: ParticipantOrderProductInfo[],\n gender: string,\n identity: Identity\n) => {\n return p\n .filter((o) => {\n const p = findProduct(itemList, o.productID)\n if (p) {\n return o.typeSizeID != 'N/A' && genderRule(gender, p.intendedForGender ?? '', identity)\n }\n return false\n })\n .map(\n (x) =>\n ({\n id: x.productID,\n name: findProduct(itemList, x.productID).registrationLabel,\n doNotOrder: x.doNotOrder,\n options: [\n //allows \"none\" if the product has not been ordered.\n ...(x.upwardOrderID && findProduct(itemList, x.productID)?.isRequired\n ? []\n : [{ id: 'NONE', description: 'Please select a size...' }]),\n //otherwise can't unset a size after an order is made since these trigger an exchange on the backend.\n ...productList2ProductOption(findProduct(itemList, x.productID).productColorSizes ?? []),\n ],\n } as ProductSelections)\n )\n}\n\n/**\n * Quick way to get a product by ID from the product list\n */\nexport function findProduct(itemList: ParticipantOrderProductInfo[], x: number) {\n return itemList.find((y) => y.id == x) ?? getEmptyParticipantOrderProductInfo()\n}\n"],"sourceRoot":""}