Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<ModelsManagerWrapper :project="project" :models="models" />
<ModelsManagerWrapper :project="project" :models="models" modelType="DWG" />
</template>

<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ import ModelsActionBar from "../models-action-bar/ModelsActionBar.vue";
import ModelsDeleteModal from "../models-delete-modal/ModelsDeleteModal.vue";
import ModelsTable from "../models-table/ModelsTable.vue";

const tabsDef = [{ id: "upload" }, { id: "split" }, { id: "archive" }];
const tabsDef = {
DWG: [{ id: "upload" }, { id: "archive" }],
IFC: [{ id: "upload" }, { id: "split" }, { id: "archive" }],
PDF: [{ id: "upload" }, { id: "archive" }]
};

export default {
components: {
Expand All @@ -84,19 +88,24 @@ export default {
models: {
type: Array,
required: true
},
modelType: {
type: String,
default: "IFC",
validator: value => ["DWG", "IFC", "PDF"].includes(value)
}
},
setup(props) {
const { t } = useI18n();
const { updateModels, downloadModels: download } = useModels();

const tabs = computed(() =>
tabsDef.map(tab => ({
tabsDef[props.modelType].map(tab => ({
...tab,
label: t(`ModelsManager.tabs.${tab.id}`)
}))
);
const currentTab = ref(tabsDef[0].id);
const currentTab = ref(tabs.value[0].id);
const selectTab = tab => (currentTab.value = tab.id);

const modelLists = reactive({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<ModelsManagerWrapper :project="project" :models="models" />
<ModelsManagerWrapper :project="project" :models="models" modelType="PDF" />
</template>

<script>
Expand Down