Merge branch 'master' into dashboard-fix
This commit is contained in:
commit
f846230351
|
|
@ -99,6 +99,10 @@ class DataExportSerializerMixin:
|
|||
fields.update(self.get_child_fields(name, field))
|
||||
continue
|
||||
|
||||
# Skip 'many' fields (e.g. nested serializers)
|
||||
if getattr(field, 'many', False):
|
||||
continue
|
||||
|
||||
fields[name] = field
|
||||
|
||||
return fields
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@
|
|||
"rollup": "^4.61.1",
|
||||
"rollup-plugin-license": "^3.7.1",
|
||||
"typescript": "^5.9.3",
|
||||
"vite": "^6.4.2",
|
||||
"vite": "^7.0.0",
|
||||
"vite-plugin-babel-macros": "^1.0.6",
|
||||
"vite-plugin-dts": "^5.0.2",
|
||||
"vite-plugin-externals": "^0.6.2",
|
||||
|
|
@ -142,6 +142,8 @@
|
|||
},
|
||||
"resolutions": {
|
||||
"undici": "^6.24.0",
|
||||
"vite": "^6.4.2"
|
||||
"vite": "^7",
|
||||
"js-yaml": "^4",
|
||||
"esbuild": "^0.28"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -218,7 +218,10 @@ export default function PartDetail() {
|
|||
// Fetch information on parts which are revisions of *this* part
|
||||
const partRevisionQuery = useQuery({
|
||||
refetchOnMount: true,
|
||||
enabled: revisionsEnabled && !!part && !!part.revision_count,
|
||||
enabled:
|
||||
revisionsEnabled &&
|
||||
!!part &&
|
||||
(!!part.revision_count || !!part.revision_of),
|
||||
queryKey: ['part_revisions', part.pk, part.revision_count],
|
||||
queryFn: async () =>
|
||||
api
|
||||
|
|
@ -227,7 +230,23 @@ export default function PartDetail() {
|
|||
revision_of: part.pk
|
||||
}
|
||||
})
|
||||
.then((response) => response.data)
|
||||
.then(async (response) => {
|
||||
let data = response.data;
|
||||
|
||||
// If the part is also a revision, fetch upstream revision information too
|
||||
if (!!part.revision_of) {
|
||||
await api
|
||||
.get(apiUrl(ApiEndpoints.part_list), {
|
||||
params: {
|
||||
revision_of: part.revision_of
|
||||
}
|
||||
})
|
||||
.then((response) => {
|
||||
data = [...data, ...response.data];
|
||||
});
|
||||
}
|
||||
return data;
|
||||
})
|
||||
});
|
||||
|
||||
const partRevisionOptions: any[] = useMemo(() => {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue