| | |
| | | } |
| | | async function getBaseModuleGetAllSubModule(module: TreeModuleDtoGroupDto, type: SubModuleType) { |
| | | try { |
| | | const defaultGroup = currentDrawerModule.value.groups.find((g) => g.group === 'default'); |
| | | const defaultGroup = currentDrawerModule.value.groups.find((g) => g.group === 'default') ?? {}; |
| | | if (type === SubModuleType.Column) { |
| | | drawerState.tableData = defaultGroup.fields; |
| | | drawerState.tableData = defaultGroup.fields ?? []; |
| | | } else { |
| | | drawerState.tableData = defaultGroup.buttonLocations.find( |
| | | (b) => b.location === SubModuleKey[type] |
| | | ); |
| | | drawerState.tableData = |
| | | defaultGroup.buttonLocations?.find((b) => b.location === SubModuleKey[type])?.buttons ?? []; |
| | | } |
| | | drawerVisible.value = true; |
| | | } catch (error) {} |