|
@@ -253,15 +253,38 @@
|
|
|
})
|
|
|
}
|
|
|
|
|
|
- function converter_setup_data(popup_option) {
|
|
|
- popup_option['BladeRoute'] = `front.dabory.erp.${popup_option['Component']}`;
|
|
|
+ function converter_setup_data(popup_option, setup_pick) {
|
|
|
+ var theme = "{{ env('DBR_THEME') }}";
|
|
|
+ const dabory_path = "{{ daboryPath('themes/' . env('DBR_THEME')) . '/erp/resources'}}";
|
|
|
+ // var blade_path = 'themes.'+theme;
|
|
|
+ // console.log('blade_path',blade_path);
|
|
|
+
|
|
|
+ // view('themes.erponly.popup-setup.form-a.theme-setup-example-form');
|
|
|
+ // console.log('blade_path : ', blade_path);
|
|
|
+ if(setup_pick == 'theme-setup-pick'){
|
|
|
+ popup_option['BladeRoute'] = `themes.${theme}.${popup_option['Component']}`;
|
|
|
+ }else{
|
|
|
+ popup_option['BladeRoute'] = `front.dabory.erp.${popup_option['Component']}`;
|
|
|
+ }
|
|
|
+ console.log('popup_option : ', popup_option);
|
|
|
+ // popup_option['BladeRoute'] = `front.dabory.erp.${popup_option['Component']}`;
|
|
|
+ // popup_option['BladeRoute'] = `${popup_option['Component']}`;
|
|
|
popup_option['ModalClassName'] = paramCase(popup_option['Component']);
|
|
|
return popup_option;
|
|
|
}
|
|
|
|
|
|
async function show_select_popup(id, c1) {
|
|
|
- const setup_pick = setupType1.DisplayVars.IsThemeSetup ? 'theme-setup-pick' : 'setup-pick'
|
|
|
- const theme_dir = setup_pick === 'theme-setup-pick' ? "{{ env('DBR_THEME') }}/erp" : '';
|
|
|
+ let setup_pick;
|
|
|
+ if(setupType1.DisplayVars.IsThemeSetup){
|
|
|
+ setup_pick = 'theme-setup-pick';
|
|
|
+ var theme = "{{ env('DBR_THEME') }}";
|
|
|
+ var theme_dir = setup_pick === 'theme-setup-pick' ? `${theme}/erp` : '';
|
|
|
+ }else{
|
|
|
+ setup_pick = 'setup-pick';
|
|
|
+ }
|
|
|
+ // const setup_pick = setupType1.DisplayVars.IsThemeSetup ? 'theme-setup-pick' : 'setup-pick'
|
|
|
+ // const theme = "{{ env('DBR_THEME') }}";
|
|
|
+ // const theme_dir = setup_pick === 'theme-setup-pick' ? `${theme}/erp` : '';
|
|
|
|
|
|
if ($('.setupType1-table').find('#c1-tag').prop('disabled')) return;
|
|
|
$('.setupType1-table').find(`input[name='bd-cursor-state']`).prop('disabled', true)
|
|
@@ -270,8 +293,10 @@
|
|
|
// let response = await get_api_data('setup-pick', {
|
|
|
// Page: [ { Id: Number(id) } ]
|
|
|
// })
|
|
|
-
|
|
|
- let response = await get_api_data(setup_pick, { Page: [{ Id: Number(id) }] });
|
|
|
+ console.log('setup_pick : ', setup_pick);
|
|
|
+ let response = await get_api_data(setup_pick, {
|
|
|
+ Page: [ { Id: Number(id) } ]
|
|
|
+ });
|
|
|
|
|
|
console.log(response);
|
|
|
|
|
@@ -279,13 +304,15 @@
|
|
|
let setup_json = setup.SetupJson ? JSON.parse(setup.SetupJson) : {}
|
|
|
const brand_code = setup.BrandCode
|
|
|
const parameter_type = camelCase(setup['Parameter'].split('/')[3])
|
|
|
+ console.log('setup : ', setup);
|
|
|
+ // return;
|
|
|
|
|
|
setup = converter_setup_data({
|
|
|
Caption: setup['SetupName'],
|
|
|
Component: setup['Component'],
|
|
|
ParameterDir: setup['Parameter'],
|
|
|
ParameterType: parameter_type,
|
|
|
- })
|
|
|
+ }, setup_pick)
|
|
|
|
|
|
// response = await get_para_data(setup['ParameterType'], setup['ParameterDir'], getParameterByName('bpa'))
|
|
|
response = await get_para_data(setup['ParameterType'], setup['ParameterDir'], getParameterByName('bpa'), theme_dir)
|