Team 2 (Smartian POB)
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m39s
Details
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m39s
Details
This commit is contained in:
parent
5b393fb6e6
commit
1b00642fdf
|
|
@ -38,8 +38,8 @@ $brandData = [
|
|||
['brand'=>'Breatheometer', 'slug'=>'breathe_o_meter_pob_units','pseudoId'=>'breathe_o_meter_pob_value'],
|
||||
['brand'=>'Tiova Inhaler', 'slug'=>'tiova_inhaler_with_d_pob_units','pseudoId'=>'tiova_inhaler_with_d_pob_value'],
|
||||
['brand'=>'Niveoli Inh', 'slug'=>'niveoli_inhaler_120_metered_dose_pob_units','pseudoId'=>'niveoli_inhaler_120_metered_dose_pob_value'],
|
||||
['brand'=>'Foracort 200 Synchrobreathe', 'slug'=>'foracort_200_synchrobreathe_pob_units','pseudoId'=>'foracort_200_synchrobreathe_pob_value'],
|
||||
['brand'=>'Foracort 400 Synchrobreathe', 'slug'=>'foracort_400_synchrobreathe_pob_units','pseudoId'=>'foracort_400_synchrobreathe_pob_value'],
|
||||
['brand'=>'Foracort Synchrobreathe 200 120s', 'slug'=>'foracort_200_synchrobreathe_pob_units','pseudoId'=>'foracort_200_synchrobreathe_pob_value'],
|
||||
['brand'=>'Foracort Synchrobreathe 400 120s', 'slug'=>'foracort_400_synchrobreathe_pob_units','pseudoId'=>'foracort_400_synchrobreathe_pob_value'],
|
||||
['brand'=>'Tiova Rotacaps', 'slug'=>'tiova_rotacaps_30_capsules_pob_units','pseudoId'=>'tiova_rotacaps_30_capsules_pob_value'],
|
||||
['brand'=>'Tiova Synchrobreathe', 'slug'=>'tiova_synchrobreathe_9_mcg_120_md_pob_units','pseudoId'=>'tiova_synchrobreathe_9_mcg_120_md_pob_value'],
|
||||
|
||||
|
|
@ -50,7 +50,8 @@ $brandData = [
|
|||
['brand'=>'Foracort 400 MDI (180 doses)', 'slug'=>'foracort_400_mdi_180_doses_pob_in_unit','pseudoId'=>'foracort_400_mdi_180_doses_pob_value'],
|
||||
['brand'=>'Foracort 400/12 INH', 'slug'=>'foracort_40012_inh_pob_in_unit','pseudoId'=>'foracort_40012_inh_pob_value'],
|
||||
['brand'=>'Foracort 400/12 Rotacaps', 'slug'=>'foracort_40012_rotacaps_pob_in_unit','pseudoId'=>'foracort_40012_rotacaps_pob_value'],
|
||||
|
||||
['brand'=>'Foracort Synchrobreathe 200 180s', 'slug'=>'foracort_synchrobreathe_200_180s_pob_in_unit','pseudoId'=>'foracort_synchrobreathe_200_180s_pob_in_value'],
|
||||
['brand'=>'Foracort Synchrobreathe 400 180s', 'slug'=>'foracort_synchrobreathe_400_180s_pob_in_unit','pseudoId'=>'foracort_synchrobreathe_400_180s_pob_in_value'],
|
||||
|
||||
|
||||
|
||||
|
|
@ -447,7 +448,7 @@ if (!empty($submissions->data->submissions)) {
|
|||
})
|
||||
|
||||
|
||||
$('#field-breathe_o_meter_pob_units,#field-new_revolizer_pob_units,#field-tiova_inhaler_with_d_pob_units,#field-foracort_100_rotacap_pob_units,#field-foracort_200_cfc_wit_pob_units,#field-foracort_200_rotacap_pob_units,#field-foracort_400_cfc_wit_pob_units,#field-foracort_400_rotacap_pob_units,#field-foracort_forte_inh_w_pob_units,#field-foracort_forte_rc_3_pob_units,#field-niveoli_inhaler_120_metered_dose_pob_units,#field-foracort_200_synchrobreathe_pob_units,#field-foracort_400_synchrobreathe_pob_units,#field-tiova_rotacaps_30_capsules_pob_units,#field-tiova_synchrobreathe_9_mcg_120_md_pob_units,#field-revolizer_pob_units,#field-tiova_hfa_inh_200_md_pob_units,#field-foracort_200_ciphaler_pob_units,#field-foracort_400_ciphaler_pob_units,#field-foracort_200_cfc_free_inh_120_mdi_pob_units,#field-foracort_200_rotacap_60_pob_units,#field-foracort_400_rotacap_60_pob_units,#field-foracort_100_synchrobreathe_pob_units,#field-foracort_200_synchrobreathe_pob_units,#field-foracort_400_synchrobreathe_120_md_pob_units,#field-foracort_200_cfc_free_inh_wdc_120_mdi_pob_units,#field-foracort_200_rotacaps_60s_pob_in_unit,#field-foracort_400_rotacaps_60s_pob_in_unit,#field-foracort_inhaler_180_pob_in_unit,#field-foracort_400_mdi_180_doses_pob_in_unit,#field-foracort_40012_inh_pob_in_unit,#field-foracort_40012_rotacaps_pob_in_unit').on('keyup',function(){
|
||||
/*$('#field-breathe_o_meter_pob_units,#field-new_revolizer_pob_units,#field-tiova_inhaler_with_d_pob_units,#field-foracort_100_rotacap_pob_units,#field-foracort_200_cfc_wit_pob_units,#field-foracort_200_rotacap_pob_units,#field-foracort_400_cfc_wit_pob_units,#field-foracort_400_rotacap_pob_units,#field-foracort_forte_inh_w_pob_units,#field-foracort_forte_rc_3_pob_units,#field-niveoli_inhaler_120_metered_dose_pob_units,#field-foracort_200_synchrobreathe_pob_units,#field-foracort_400_synchrobreathe_pob_units,#field-tiova_rotacaps_30_capsules_pob_units,#field-tiova_synchrobreathe_9_mcg_120_md_pob_units,#field-revolizer_pob_units,#field-tiova_hfa_inh_200_md_pob_units,#field-foracort_200_ciphaler_pob_units,#field-foracort_400_ciphaler_pob_units,#field-foracort_200_cfc_free_inh_120_mdi_pob_units,#field-foracort_200_rotacap_60_pob_units,#field-foracort_400_rotacap_60_pob_units,#field-foracort_100_synchrobreathe_pob_units,#field-foracort_200_synchrobreathe_pob_units,#field-foracort_400_synchrobreathe_120_md_pob_units,#field-foracort_200_cfc_free_inh_wdc_120_mdi_pob_units,#field-foracort_200_rotacaps_60s_pob_in_unit,#field-foracort_400_rotacaps_60s_pob_in_unit,#field-foracort_inhaler_180_pob_in_unit,#field-foracort_400_mdi_180_doses_pob_in_unit,#field-foracort_40012_inh_pob_in_unit,#field-foracort_40012_rotacaps_pob_in_unit').on('keyup',function(){
|
||||
|
||||
let a=parseInt($('#field-breathe_o_meter_pob_units').val())||0;
|
||||
let b=parseInt($('#field-new_revolizer_pob_units').val())||0;
|
||||
|
|
@ -603,20 +604,80 @@ if (!empty($submissions->data->submissions)) {
|
|||
//let totalValue=(productOfA+productOfB+priceOfC+productOfD+productOfE+productOfF+productOfG+productOfH+productOfI+productOfJ+productOfK+productOfL+productOfM+productOfN+productOfO+productOfP+productOfQ+productOfR+productOfS+productOfT+productOfU+productOfV+productOfW+productOfY+productOfZ+productOfAA+productOfAB+productOfAC+productOfAD+productOfAE+productOfAF);
|
||||
|
||||
let totalValue = (
|
||||
productOfA + productOfB + productOfC + productOfD + productOfE +
|
||||
productOfF + productOfG + productOfH + productOfI + productOfJ +
|
||||
productOfK + productOfL + productOfM + productOfN + productOfO +
|
||||
productOfP + productOfQ + productOfR + productOfS + productOfT +
|
||||
productOfU + productOfV + productOfW + productOfY + productOfZ +
|
||||
productOfAA + productOfAB + productOfAC + productOfAD + productOfAE +
|
||||
productOfAF
|
||||
);
|
||||
productOfA + productOfB + productOfC + productOfD + productOfE +
|
||||
productOfF + productOfG + productOfH + productOfI + productOfJ +
|
||||
productOfK + productOfL + productOfM + productOfN + productOfO +
|
||||
productOfP + productOfQ + productOfR + productOfS + productOfT +
|
||||
productOfU + productOfV + productOfW + productOfY + productOfZ +
|
||||
productOfAA + productOfAB + productOfAC + productOfAD + productOfAE +
|
||||
productOfAF
|
||||
);
|
||||
|
||||
|
||||
|
||||
$('#field-total_pob_units').val(total);
|
||||
$('#field-total_pob_value').val(totalValue);
|
||||
})
|
||||
})*/
|
||||
|
||||
const pobConfig = [
|
||||
{ unit: 'breathe_o_meter_pob_units', val: 'breathe_o_meter_pob_value', price: 426 },
|
||||
{ unit: 'new_revolizer_pob_units', val: 'new_revolizer_pob_value', price: 255 },
|
||||
{ unit: 'tiova_inhaler_with_d_pob_units', val: 'tiova_inhaler_with_d_pob_value', price: 408 },
|
||||
{ unit: 'foracort_100_rotacap_pob_units', val: 'foracort_100_rotacap_pob_value', price: 95 },
|
||||
{ unit: 'foracort_200_cfc_wit_pob_units', val: 'foracort_200_cfc_wit_pob_value', price: 260 },
|
||||
{ unit: 'foracort_200_rotacap_pob_units', val: 'foracort_200_rotacap_pob_value', price: 126 },
|
||||
{ unit: 'foracort_400_cfc_wit_pob_units', val: 'foracort_400_cfc_wit_pob_value', price: 296 },
|
||||
{ unit: 'foracort_400_rotacap_pob_units', val: 'foracort_400_rotacap_pob_value', price: 153 },
|
||||
{ unit: 'foracort_forte_inh_w_pob_units', val: 'foracort_forte_inh_w_pob_value', price: 606 },
|
||||
{ unit: 'foracort_forte_rc_3_pob_units', val: 'foracort_forte_rc_3_pob_value', price: 361 },
|
||||
{ unit: 'niveoli_inhaler_120_metered_dose_pob_units', val: 'niveoli_inhaler_120_metered_dose_pob_value', price: 185 },
|
||||
{ unit: 'foracort_200_synchrobreathe_pob_units', val: 'foracort_200_synchrobreathe_pob_value', price: 321 },
|
||||
{ unit: 'foracort_400_synchrobreathe_pob_units', val: 'foracort_400_synchrobreathe_pob_value', price: 357 },
|
||||
{ unit: 'tiova_rotacaps_30_capsules_pob_units', val: 'tiova_rotacaps_30_capsules_pob_value', price: 235 },
|
||||
{ unit: 'tiova_synchrobreathe_9_mcg_120_md_pob_units', val: 'tiova_synchrobreathe_9_mcg_120_md_pob_value', price: 305 },
|
||||
{ unit: 'revolizer_pob_units', val: 'revolizer_pob_value', price: 255 },
|
||||
{ unit: 'tiova_hfa_inh_200_md_pob_units', val: 'tiova_hfa_inh_200_md_pob_value', price: 408 },
|
||||
{ unit: 'foracort_200_ciphaler_pob_units', val: 'foracort_200_ciphaler_pob_value', price: 251 },
|
||||
{ unit: 'foracort_400_ciphaler_pob_units', val: 'foracort_400_ciphaler_pob_value', price: 305 },
|
||||
{ unit: 'foracort_200_cfc_free_inh_120_mdi_pob_units', val: 'foracort_200_cfc_free_inh_120_mdi_pob_value', price: 106 },
|
||||
{ unit: 'foracort_200_rotacap_60_pob_units', val: 'foracort_200_rotacap_60_pob_value', price: 251 },
|
||||
{ unit: 'foracort_400_rotacap_60_pob_units', val: 'foracort_400_rotacap_60_pob_value', price: 305 },
|
||||
{ unit: 'foracort_100_synchrobreathe_pob_units', val: 'foracort_100_synchrobreathe_pob_value', price: 223 },
|
||||
{ unit: 'foracort_400_synchrobreathe_120_md_pob_units', val: 'foracort_400_synchrobreathe_120_md_pob_value', price: 357 },
|
||||
{ unit: 'foracort_200_cfc_free_inh_wdc_120_mdi_pob_units', val: 'foracort_200_cfc_free_inh_wdc_120_mdi_pob_value', price: 260 },
|
||||
{ unit: 'foracort_200_rotacaps_60s_pob_in_unit', val: 'foracort_200_rotacaps_60s_pob_value', price: 251 },
|
||||
{ unit: 'foracort_400_rotacaps_60s_pob_in_unit', val: 'foracort_400_rotacaps_60s_pob_value', price: 305 },
|
||||
{ unit: 'foracort_inhaler_180_pob_in_unit', val: 'foracort_inhaler_180_pob_value', price: 390 },
|
||||
{ unit: 'foracort_400_mdi_180_doses_pob_in_unit', val: 'foracort_400_mdi_180_doses_pob_value', price: 445 },
|
||||
{ unit: 'foracort_40012_inh_pob_in_unit', val: 'foracort_40012_inh_pob_value', price: 666 },
|
||||
{ unit: 'foracort_40012_rotacaps_pob_in_unit', val: 'foracort_40012_rotacaps_pob_value', price: 361 },
|
||||
{ unit: 'foracort_synchrobreathe_200_180s_pob_in_unit', val: 'foracort_synchrobreathe_200_180s_pob_in_value', price: 484 },
|
||||
{ unit: 'foracort_synchrobreathe_400_180s_pob_in_unit', val: 'foracort_synchrobreathe_400_180s_pob_in_value', price: 539 }
|
||||
|
||||
|
||||
|
||||
];
|
||||
|
||||
|
||||
const selector = pobConfig.map(item => `#field-${item.unit}`).join(',');
|
||||
|
||||
$(selector).on('keyup input', function () {
|
||||
let totalUnits = 0;
|
||||
let totalValue = 0;
|
||||
|
||||
pobConfig.forEach(item => {
|
||||
const units = parseInt($(`#field-${item.unit}`).val(), 10) || 0;
|
||||
const productVal = units * item.price;
|
||||
|
||||
$(`#field-${item.val}`).val(productVal);
|
||||
|
||||
totalUnits += units;
|
||||
totalValue += productVal;
|
||||
});
|
||||
|
||||
$('#field-total_pob_units').val(totalUnits);
|
||||
$('#field-total_pob_value').val(totalValue);
|
||||
});
|
||||
|
||||
$('#field-total_pob_units').prop("readonly","true");
|
||||
$('#field-total_pob_value').prop("readonly","true");
|
||||
|
|
|
|||
Loading…
Reference in New Issue