Add archived department filtering feature for superusers, including E2E tests, UI updates, and OpenAPI enhancements. Extend department table with archived toggle switch and update translations.

This commit is contained in:
Jeppe Bundgaard
2026-05-07 12:54:31 +02:00
parent dc2840e023
commit fb162eef6c
13 changed files with 365 additions and 97 deletions
@@ -101,6 +101,14 @@ export const getDepartmentName = async (id) => {
required: false
}
},
archived: {
label: t('objects.departments.columns.archived'),
type: "boolean",
sortable: true,
creation: {
required: false
}
},
longitude: {
label: t('objects.departments.columns.longitude'),
type: "number",
@@ -177,6 +185,14 @@ export const getDepartmentName = async (id) => {
parseInt(dimension)
)
},
archived: async (id, archived) => {
return ObjectsGlobal.set.column(
Departments.meta.endpoint,
id,
"archived",
ObjectsGlobal.parse.boolean(archived)
)
},
longitude: async (id, longitude) => {
return ObjectsGlobal.set.column(
Departments.meta.endpoint,
@@ -237,4 +253,4 @@ export const getDepartmentName = async (id) => {
);
}
};
</script>
</script>
@@ -307,7 +307,7 @@ export const ObjectsGlobal = {
},
parse: {
boolean: (value) => {
return value === 'true' || value === true;
return value === 'true' || value === '1' || value === true || value === 1;
},
number: (value) => {
return parseInt(value);