Skip to content

Commit b04bb77

Browse files
Merge branch 'dev'
2 parents 48e7ee4 + cd61703 commit b04bb77

File tree

18 files changed

+2869
-1332
lines changed

18 files changed

+2869
-1332
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fasp-core-ui",
3-
"version": "2.107.13602",
3+
"version": "2.108.13618",
44
"description": "Quantification Analytics Tool",
55
"private": false,
66
"homepage": "https://www.quantificationanalytics.org",

src/CommonComponent/JExcelCommonFunctions.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,6 @@ export function jExcelLoadedFunctionQuantimed(instance, number) {
303303
*/
304304
export function checkValidtion(type, colName, rowNo, value, elInstance, reg, greaterThan0, equalTo0, colNo) {
305305
if (type == "text") {
306-
console.log("Value Test@123",value);
307306
value=value.toString().replaceAll(' ','').trim();
308307
var col = (colName).concat(parseInt(rowNo) + 1);
309308
if (value == "" || value == undefined || value == "undefined") {

src/assets/img/locales/en.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2374,6 +2374,7 @@
23742374
"static.supplyPlanFormula.minMonthOfStockEx4": "Min= MAX (MIN MONTH OF STOCK,Min MoS Guardrail)",
23752375
"static.supplyPlanFormula.minMonthOfStockEx5": "Min = MAX (4,3)",
23762376
"static.supplyPlanFormula.minMonthOfStockEx2": "REORDER FREQUENCY = 3",
2377+
"static.supplyPlan.addNewBatch": "Input New Batch and Expiry Information",
23772378
"static.dashboard.consumption": "Consumption (Forecast vs. Actual)",
23782379
"static.supplyPlanFormula.minMonthOfStockEx3": "Min MoS Guardrail = 3(Based on realm)",
23792380
"static.supplyPlan.userEnteredBatches": "User-Entered Batches",
@@ -3160,6 +3161,7 @@
31603161
"static.dataset.manageProgramInfo": "Update Program Info",
31613162
"static.equivalancyUnit.equivalancyUnitManage": "Manage Equivalency Unit",
31623163
"static.extrpolation.graphTitlePart1": "Forecast for ",
3164+
"static.shipmentDataEntry.expiryDateMustBeGreaterThanAdjustmentDate": "Expiry date must be greater than Inventory Date",
31633165
"static.tree.monthlyEndNoSeasonality": "(No seasonality)",
31643166
"static.whatIf.supplyPlanSaved": "Supply plan saved successfully.",
31653167
"static.message.addBranchTemplate": "Branch Template Added Successfully",
@@ -3337,7 +3339,7 @@
33373339
"static.forecastingunit.forecastingunittext": "Enter Forecasting Unit",
33383340
"static.planningUnit.plannignUnitMeasure": "Enter Planning Unit UoM (Unit of Measure)",
33393341
"static.dataEntryAndAdjustments.ClickSubmit": "Click \"Submit\" to save any entered data",
3340-
"static.stockStatus.doYouWantToAggregate": "Do you want to aggregate selected programs",
3342+
"static.stockStatus.doYouWantToAggregate": "Do you want to aggregate selected products and/or programs?",
33413343
"static.ticket.header": "QAT Helpdesk",
33423344
"static.user.confirmNewPasswordLabel": "Confirm new password",
33433345
"static.realm.realm": "Realm",

src/assets/img/locales/fr.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2374,6 +2374,7 @@
23742374
"static.supplyPlanFormula.minMonthOfStockEx4": "Min = MAX (MOIS MIN DE STOCK, Garde-corps Min MoS)",
23752375
"static.supplyPlanFormula.minMonthOfStockEx5": "Min = MAX (4,3)",
23762376
"static.supplyPlanFormula.minMonthOfStockEx2": "FRÉQUENCE DE COMMANDE = 3",
2377+
"static.supplyPlan.addNewBatch": "Saisir les informations relatives au nouveau lot et à la date d`expiration",
23772378
"static.dashboard.consumption": "Consommation (prévue contre réelle)",
23782379
"static.supplyPlanFormula.minMonthOfStockEx3": "Garde-corps Min MoS = 3 (basé sur le royaume)",
23792380
"static.supplyPlan.userEnteredBatches": "Lots saisis par l`utilisateur",
@@ -3160,6 +3161,7 @@
31603161
"static.dataset.manageProgramInfo": "Mettre à jour les informations sur le programme",
31613162
"static.equivalancyUnit.equivalancyUnitManage": "Gestion de l'Unité d'Equivalence",
31623163
"static.extrpolation.graphTitlePart1": "Prévisions pour ",
3164+
"static.shipmentDataEntry.expiryDateMustBeGreaterThanAdjustmentDate": "La date d`expiration doit être supérieure à la date d`inventaire.",
31633165
"static.tree.monthlyEndNoSeasonality": "(Pas de saisonnalité)",
31643166
"static.whatIf.supplyPlanSaved": "Plan d`approvisionnement enregistré avec succès.",
31653167
"static.message.addBranchTemplate": "Modèle de branche ajouté avec succès",
@@ -3337,7 +3339,7 @@
33373339
"static.forecastingunit.forecastingunittext": "Entrez l`unité de prévision",
33383340
"static.planningUnit.plannignUnitMeasure": "Saisissez l`unité de planification UoM (unité de mesure)",
33393341
"static.dataEntryAndAdjustments.ClickSubmit": "Cliquer sur Soumettre pour enregistrer les données saisies",
3340-
"static.stockStatus.doYouWantToAggregate": "Voulez-vous regrouper les programmes sélectionnés",
3342+
"static.stockStatus.doYouWantToAggregate": "Souhaitez-vous regrouper des produits et/ou programmes sélectionnés ?",
33413343
"static.ticket.header": "Service d`assistance technique QAT",
33423344
"static.user.confirmNewPasswordLabel": "Confirmer le nouveau mot de passe",
33433345
"static.realm.realm": "Domaine",

src/assets/img/locales/pr.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2374,6 +2374,7 @@
23742374
"static.supplyPlanFormula.minMonthOfStockEx4": "Mín = Maior entre (MÍN MESES DE STOCK, Limite inferior do Mín a nivel do reino)",
23752375
"static.supplyPlanFormula.minMonthOfStockEx5": "Mín = Maior entre (4,3)",
23762376
"static.supplyPlanFormula.minMonthOfStockEx2": "FREQUÊNCIA DE PEDIDOS = 3",
2377+
"static.supplyPlan.addNewBatch": "Introduza o novo lote e as informações de validade",
23772378
"static.dashboard.consumption": "Consumo (Previsão vs. Real)",
23782379
"static.supplyPlanFormula.minMonthOfStockEx3": "Limite inferior do Mín a nivel do reino = 3",
23792380
"static.supplyPlan.userEnteredBatches": "Lotes inseridos pelo usuário",
@@ -3160,6 +3161,7 @@
31603161
"static.dataset.manageProgramInfo": "Atualizar informações do programa",
31613162
"static.equivalancyUnit.equivalancyUnitManage": "Gerenciar Unidade de Equivalência",
31623163
"static.extrpolation.graphTitlePart1": "Previsão para ",
3164+
"static.shipmentDataEntry.expiryDateMustBeGreaterThanAdjustmentDate": "A data de validade deve ser posterior à data de stock.",
31633165
"static.tree.monthlyEndNoSeasonality": "(Sem sazonalidade)",
31643166
"static.whatIf.supplyPlanSaved": "Plano de suprimento salvo com sucesso.",
31653167
"static.message.addBranchTemplate": "Modelo de filial adicionado com sucesso",
@@ -3337,7 +3339,7 @@
33373339
"static.forecastingunit.forecastingunittext": "Insira a unidade de previsão",
33383340
"static.planningUnit.plannignUnitMeasure": "Insira a U.M. (unidade de medida) da unidade de planeamento",
33393341
"static.dataEntryAndAdjustments.ClickSubmit": "Clique em \"Enviar\" para salvar os dados inseridos",
3340-
"static.stockStatus.doYouWantToAggregate": "Você deseja agregar programas selecionados",
3342+
"static.stockStatus.doYouWantToAggregate": "Você deseja agregar produtos e/ou programas selecionados?",
33413343
"static.ticket.header": "Central de Ajuda QAT",
33423344
"static.user.confirmNewPasswordLabel": "Confirmar a nova senha",
33433345
"static.realm.realm": "Reino",

src/assets/img/locales/sp.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2374,6 +2374,7 @@
23742374
"static.supplyPlanFormula.minMonthOfStockEx4": "Min = Mayor entre (MESES DE STOCK MIN, Límite inferior de MOS)",
23752375
"static.supplyPlanFormula.minMonthOfStockEx5": "Min = Mayor entre '(4,3)",
23762376
"static.supplyPlanFormula.minMonthOfStockEx2": "FRECUENCIA DE REORDEN = 3",
2377+
"static.supplyPlan.addNewBatch": "Ingrese la información del nuevo lote y la fecha de vencimiento.",
23772378
"static.dashboard.consumption": "Consumo: estimado vs. real",
23782379
"static.supplyPlanFormula.minMonthOfStockEx3": "Límite inferior de MOS = 3 (según el dominio)",
23792380
"static.supplyPlan.userEnteredBatches": "Lotes ingresados ​​por el usuario",
@@ -3160,6 +3161,7 @@
31603161
"static.dataset.manageProgramInfo": "Actualizar información del programa",
31613162
"static.equivalancyUnit.equivalancyUnitManage": "Administrar unidad de equivalencia",
31623163
"static.extrpolation.graphTitlePart1": "Estimación para ",
3164+
"static.shipmentDataEntry.expiryDateMustBeGreaterThanAdjustmentDate": "La fecha de vencimiento debe ser posterior a la fecha de inventario.",
31633165
"static.tree.monthlyEndNoSeasonality": "(Sin estacionalidad)",
31643166
"static.whatIf.supplyPlanSaved": "Plan de suministro guardado correctamente",
31653167
"static.message.addBranchTemplate": "Plantilla de ramal añadida con éxito",
@@ -3337,7 +3339,7 @@
33373339
"static.forecastingunit.forecastingunittext": "Ingresar el Producto base",
33383340
"static.planningUnit.plannignUnitMeasure": "Ingrese la unidad de medida del producto",
33393341
"static.dataEntryAndAdjustments.ClickSubmit": "Haga clic en \"Enviar\" para guardar los datos ingresados",
3340-
"static.stockStatus.doYouWantToAggregate": "¿Quieres agregar los programas seleccionados?",
3342+
"static.stockStatus.doYouWantToAggregate": "¿Quieres agregar productos y/o programas seleccionados?",
33413343
"static.ticket.header": "Servicio de asistencia técnica QAT",
33423344
"static.user.confirmNewPasswordLabel": "Confirmar la nueva contraseña",
33433345
"static.realm.realm": "Dominio",

src/views/CompareVersion/CompareVersion.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,8 @@ class CompareVersion extends Component {
461461
region: {
462462
id: regionList[r].regionId,
463463
label: regionList[r].label
464-
}
464+
},
465+
active: planningUnitList[pu].active
465466
})
466467
}
467468
}
@@ -471,7 +472,7 @@ class CompareVersion extends Component {
471472
forecastStopDate: datasetJson.currentVersion.forecastStopDate,
472473
notes: datasetJson.currentVersion.notes,
473474
},
474-
planningUnitList: list,
475+
planningUnitList: list.filter(x => x.active.toString() == "true"),
475476
regionList: datasetJson.regionList,
476477
programCode: datasetJson.programCode,
477478
label: datasetJson.label
@@ -495,7 +496,7 @@ class CompareVersion extends Component {
495496
}
496497
ReportService.forecastSummary(inputJson).then(response => {
497498
if (response.status == 200) {
498-
var responseData = response.data;
499+
var responseData = response.data.filter(x => x.planningUnit.active.toString() == "true");
499500
var json = {
500501
currentVersion: {
501502
forecastStartDate: versonListFilter.forecastStartDate,
@@ -649,7 +650,8 @@ class CompareVersion extends Component {
649650
region: {
650651
id: regionList[r].regionId,
651652
label: regionList[r].label
652-
}
653+
},
654+
active: planningUnitList[pu].active
653655
})
654656
}
655657
}
@@ -659,7 +661,7 @@ class CompareVersion extends Component {
659661
forecastStopDate: datasetJson.currentVersion.forecastStopDate,
660662
notes: datasetJson.currentVersion.notes,
661663
},
662-
planningUnitList: list,
664+
planningUnitList: list.filter(x => x.active.toString() == "true"),
663665
regionList: datasetJson.regionList,
664666
programCode: datasetJson.programCode,
665667
label: datasetJson.label
@@ -683,6 +685,7 @@ class CompareVersion extends Component {
683685
ReportService.forecastSummary(inputJson).then(response => {
684686
if (response.status == 200) {
685687
var responseData = response.data;
688+
var responseData = response.data.filter(x => x.planningUnit.active.toString() == "true");
686689
var json = {
687690
currentVersion: {
688691
forecastStartDate: versonListFilter.forecastStartDate,

src/views/Consumption/ConsumptionDetails.js

Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -644,32 +644,45 @@ export default class ConsumptionDetails extends React.Component {
644644
var batchInfoList = programJson.batchInfoList;
645645
var batchList = [];
646646
var shipmentList = programJson.shipmentList.filter(c => c.planningUnit.id == puList[pu].value && c.active.toString() == "true" && c.shipmentStatus.id == DELIVERED_SHIPMENT_STATUS);
647-
var consumptionBatchList=programJson.consumptionList.filter(c=>c.planningUnit.id==puList[pu].value).flatMap(consumption => consumption.batchInfoList);
648-
var inventoryBatchList=programJson.inventoryList.filter(c=>c.planningUnit.id==puList[pu].value).flatMap(inventory => inventory.batchInfoList);
649-
var shipmentBatchList=shipmentList.flatMap(shipment => shipment.batchInfoList);
647+
var consumptionBatchList = programJson.consumptionList.filter(c => c.planningUnit.id == puList[pu].value).flatMap(consumption => consumption.batchInfoList);
648+
var inventoryBatchList = programJson.inventoryList.filter(c => c.planningUnit.id == puList[pu].value).flatMap(inventory => inventory.batchInfoList);
649+
var shipmentBatchList = shipmentList.flatMap(shipment => shipment.batchInfoList);
650650
for (var sl = 0; sl < shipmentList.length; sl++) {
651651
var bdl = shipmentList[sl].batchInfoList;
652652
for (var bd = 0; bd < bdl.length; bd++) {
653653
var index = batchList.findIndex(c => c.batchNo == bdl[bd].batch.batchNo && moment(c.expiryDate).format("YYYY-MM") == moment(bdl[bd].batch.expiryDate).format("YYYY-MM"));
654654
if (index == -1) {
655-
var shipmentBatchListFiltered=shipmentBatchList.filter(c => c.batch.batchNo == bdl[bd].batch.batchNo && moment(c.batch.expiryDate).format("YYYY-MM") == moment(bdl[bd].batch.expiryDate).format("YYYY-MM"));
656-
var consumptionBatchListFiltered=consumptionBatchList.filter(c => c.batch.batchNo == bdl[bd].batch.batchNo && moment(c.batch.expiryDate).format("YYYY-MM") == moment(bdl[bd].batch.expiryDate).format("YYYY-MM"));
657-
var inventoryBatchListFiltered=inventoryBatchList.filter(c => c.batch.batchNo == bdl[bd].batch.batchNo && moment(c.batch.expiryDate).format("YYYY-MM") == moment(bdl[bd].batch.expiryDate).format("YYYY-MM"));
658-
var shipmentTotal=0;
659-
var consumptionTotal=0;
660-
var inventoryTotal=0;
661-
shipmentBatchListFiltered.map(item=>{
662-
shipmentTotal+=Number(item.shipmentQty);
655+
var shipmentBatchListFiltered = shipmentBatchList.filter(c => c.batch.batchNo == bdl[bd].batch.batchNo && moment(c.batch.expiryDate).format("YYYY-MM") == moment(bdl[bd].batch.expiryDate).format("YYYY-MM"));
656+
var consumptionBatchListFiltered = consumptionBatchList.filter(c => c.batch.batchNo == bdl[bd].batch.batchNo && moment(c.batch.expiryDate).format("YYYY-MM") == moment(bdl[bd].batch.expiryDate).format("YYYY-MM"));
657+
var inventoryBatchListFiltered = inventoryBatchList.filter(c => c.batch.batchNo == bdl[bd].batch.batchNo && moment(c.batch.expiryDate).format("YYYY-MM") == moment(bdl[bd].batch.expiryDate).format("YYYY-MM"));
658+
var shipmentTotal = 0;
659+
var consumptionTotal = 0;
660+
var inventoryTotal = 0;
661+
shipmentBatchListFiltered.map(item => {
662+
shipmentTotal += Number(item.shipmentQty);
663663
})
664-
consumptionBatchListFiltered.map(item=>{
665-
consumptionTotal+=Number(item.consumptionQty);
664+
consumptionBatchListFiltered.map(item => {
665+
consumptionTotal += Number(item.consumptionQty);
666666
})
667-
inventoryBatchListFiltered.map(item=>{
668-
inventoryTotal+=Number(item.adjustmentQty)
667+
inventoryBatchListFiltered.map(item => {
668+
inventoryTotal += Number(item.adjustmentQty)
669669
})
670670
var batchDetailsToPush = batchInfoList.filter(c => c.batchNo == bdl[bd].batch.batchNo && c.planningUnitId == puList[pu].value && moment(c.expiryDate).format("YYYY-MM") == moment(bdl[bd].batch.expiryDate).format("YYYY-MM"));
671671
if (batchDetailsToPush.length > 0) {
672-
batchDetailsToPush[0].qtyAvailable=Number(shipmentTotal)+Number(inventoryTotal)-Number(consumptionTotal);
672+
batchDetailsToPush[0].qtyAvailable = Number(shipmentTotal) + Number(inventoryTotal) - Number(consumptionTotal);
673+
batchList.push(batchDetailsToPush[0]);
674+
}
675+
}
676+
}
677+
}
678+
var inventoryList = programJson.inventoryList.filter(c => c.planningUnit.id == puList[pu].value && c.active.toString() == "true" && c.addNewBatch && c.addNewBatch.toString() == "true");
679+
for (var il = 0; il < inventoryList.length; il++) {
680+
var bdl = inventoryList[il].batchInfoList;
681+
for (var bd = 0; bd < bdl.length; bd++) {
682+
var index = batchList.findIndex(c => c.batchNo == bdl[bd].batch.batchNo && moment(c.expiryDate).format("YYYY-MM") == moment(bdl[bd].batch.expiryDate).format("YYYY-MM"));
683+
if (index == -1) {
684+
var batchDetailsToPush = batchInfoList.filter(c => c.batchNo == bdl[bd].batch.batchNo && c.planningUnitId == puList[pu].value && moment(c.expiryDate).format("YYYY-MM") == moment(bdl[bd].batch.expiryDate).format("YYYY-MM"));
685+
if (batchDetailsToPush.length > 0) {
673686
batchList.push(batchDetailsToPush[0]);
674687
}
675688
}
@@ -883,8 +896,10 @@ export default class ConsumptionDetails extends React.Component {
883896
onChange={(e) => { this.formSubmit(e, this.state.rangeValue); }}
884897
labelledBy={i18n.t('static.common.select')}
885898
filterOptions={filterOptions}
886-
overrideStrings={{ allItemsAreSelected: i18n.t('static.common.allitemsselected'),
887-
selectSomeItems: i18n.t('static.common.select')}}
899+
overrideStrings={{
900+
allItemsAreSelected: i18n.t('static.common.allitemsselected'),
901+
selectSomeItems: i18n.t('static.common.select')
902+
}}
888903
/>
889904
</div>
890905
</FormGroup>

0 commit comments

Comments
 (0)