mdi-format-list-bulleted
diff --git a/frontend/src/stores/warehousePath.ts b/frontend/src/stores/warehousePath.ts
deleted file mode 100644
index dd83d28..0000000
--- a/frontend/src/stores/warehousePath.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-import { useAuthStore } from '@/stores/auth'
-import type { ErrorResponse } from '@/types/errors'
-import type { WarehousePath } from '@/types/warehousePath'
-import { translateErrors } from '@/utils/errors'
-import { defineStore } from 'pinia'
-import { computed, ref } from 'vue'
-
-export const useWarehousePathStore = defineStore('warehousePath', () => {
- const warehousePaths = ref
([])
- const errors = ref([])
- const authStore = useAuthStore()
-
- const defaultDevPath = computed(() => {
- return warehousePaths.value.find((wp) => wp.folder_name === '/.hidden/dev')
- })
-
- const warehousePathOptions = computed(() =>
- warehousePaths.value.map((wp) => ({
- displayText: `${wp.warehouse_name}: ${wp.folder_name}`,
- value: wp.path_id,
- })),
- )
-
- const fetchWarehousePaths = async () => {
- const service = await authStore.getApiService('warehouse-paths')
- try {
- errors.value = []
- warehousePaths.value = await service.get('')
- } catch (_error) {
- console.error('Failed to fetch warehouse paths', _error)
- errors.value = translateErrors(_error as ErrorResponse)
- }
- }
-
- return {
- // State
- warehousePaths,
- errors,
- // Computed
- defaultDevPath,
- warehousePathOptions,
- // Actions
- fetchWarehousePaths,
- }
-})
diff --git a/frontend/src/types/book.ts b/frontend/src/types/book.ts
index 273fcf8..784159c 100644
--- a/frontend/src/types/book.ts
+++ b/frontend/src/types/book.ts
@@ -5,9 +5,8 @@ export interface Producer {
}
export interface BookLocation {
- warehouse_path_id: string
warehouse_name: string
- folder_name: string
+ path: string
filename: string
status: string
}
@@ -26,7 +25,6 @@ export interface Book {
zimcheck_result: Record
zim_metadata: Record
events: string[]
- producer: Producer
current_locations: BookLocation[]
target_locations: BookLocation[]
}
diff --git a/frontend/src/types/title.ts b/frontend/src/types/title.ts
index a108fe7..04b3847 100644
--- a/frontend/src/types/title.ts
+++ b/frontend/src/types/title.ts
@@ -6,33 +6,28 @@ export interface WarehousePathInfo {
warehouse_name: string
}
+export interface TitleCollection {
+ collection_id: string
+ collection_name: string
+ path: string
+}
+
export interface Title {
id: string
name: string
- producer_unique_id: string
- producer_display_name: string | null
- producer_display_url: string | null
- dev_warehouse_paths: WarehousePathInfo[]
- prod_warehouse_paths: WarehousePathInfo[]
- in_prod: boolean
+ maturity: string
events: string[]
books: BookLight[]
+ collections: TitleCollection[]
}
export interface TitleLight {
id: string
name: string
- producer_unique_id: string
- producer_display_name: string | null
- producer_display_url: string | null
+ maturity: string
}
export interface TitleCreate {
name: string
- producer_unique_id: string
- producer_display_name?: string
- producer_display_url?: string
- dev_warehouse_path_ids: string[]
- prod_warehouse_path_ids: string[]
- in_prod?: boolean
+ maturity: string
}
diff --git a/frontend/src/types/warehousePath.ts b/frontend/src/types/warehousePath.ts
deleted file mode 100644
index 26c557b..0000000
--- a/frontend/src/types/warehousePath.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-export interface WarehousePath {
- path_id: string
- folder_name: string
- warehouse_id: string
- warehouse_name: string
-}
diff --git a/frontend/src/views/BookView.vue b/frontend/src/views/BookView.vue
index a89c760..0a832de 100644
--- a/frontend/src/views/BookView.vue
+++ b/frontend/src/views/BookView.vue
@@ -64,16 +64,6 @@
-
-
- | Producer |
-
-
- {{ book.producer.display_name }}
-
- ({{ book.producer.unique_id }})
- |
-
| Article Count |
@@ -141,10 +131,10 @@
|
| {{ location.warehouse_name }} |
- {{ location.folder_name }} |
+ {{ location.path }} |
{{ location.filename }}
|
@@ -170,10 +160,10 @@
| {{ location.warehouse_name }} |
- {{ location.folder_name }} |
+ {{ location.path }} |
{{ location.filename }}
|
diff --git a/frontend/src/views/TitleView.vue b/frontend/src/views/TitleView.vue
index cad5771..d130869 100644
--- a/frontend/src/views/TitleView.vue
+++ b/frontend/src/views/TitleView.vue
@@ -23,53 +23,26 @@
{{ title.name }}
+
- | Producer |
-
-
-
- {{ title.producer_display_name }}
-
- ({{ title.producer_unique_id }})
-
- {{ title.producer_unique_id }}
- |
-
-
- | Dev Warehouse Paths |
-
-
-
- {{ path.warehouse_name }}: {{ path.folder_name }}
-
-
- No dev warehouse paths
- |
-
-
- | Prod Warehouse Paths |
+ Collections |
-
+
- {{ path.warehouse_name }}: {{ path.folder_name }}
+ {{ tc.collection_name }}: {{ tc.path }}
- No prod warehouse paths
+ This title is not published in any collection
|
- | In Production |
+ Maturity |
- {{ title.in_prod ? 'Yes' : 'No' }}
+ {{ title.maturity }}
|
diff --git a/frontend/src/views/TitlesView.vue b/frontend/src/views/TitlesView.vue
index fc391d9..aa20d20 100644
--- a/frontend/src/views/TitlesView.vue
+++ b/frontend/src/views/TitlesView.vue
@@ -49,7 +49,7 @@ import { useRouter } from 'vue-router'
// Define headers for the table
const headers = [
{ title: 'Name', value: 'name' },
- { title: 'Producer', value: 'producer' },
+ { title: 'Maturity', value: 'maturity' },
]
// Reactive state