refactor: Update category value handling to make menuObjid optional

- Modified the addCategoryValue function to allow menuObjid to be optional, accommodating scenarios where it may not be provided, such as in global management screens.
- Adjusted related service and controller logic to handle the absence of menuObjid gracefully, ensuring that the application remains robust and user-friendly.
- Enhanced the frontend components to reflect these changes, improving the overall user experience when adding category values across multiple companies.
This commit is contained in:
kjs
2026-04-10 14:17:35 +09:00
parent 5842a91c7f
commit b8860e56e5
5 changed files with 47 additions and 53 deletions
+2 -2
View File
@@ -80,7 +80,7 @@ export async function getCategoryValues(
*/
export async function addCategoryValue(
value: TableCategoryValue,
menuObjid: number
menuObjid?: number
) {
try {
const response = await apiClient.post<{
@@ -88,7 +88,7 @@ export async function addCategoryValue(
data: TableCategoryValue;
}>("/table-categories/values", {
...value,
menuObjid, // ← menuObjid 포함
menuObjid: menuObjid || undefined,
});
return response.data;
} catch (error: any) {