merge
This commit is contained in:
parent
cca389f1b0
commit
7764f4651c
17 changed files with 40 additions and 47 deletions
Binary file not shown.
|
|
@ -1 +0,0 @@
|
||||||
Uuid: inTVYmCtOtEsv5eV
|
|
||||||
Binary file not shown.
|
|
@ -1 +0,0 @@
|
||||||
Uuid: pXjr94mzDdcxVMVv
|
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,5 @@
|
||||||
|
Uuid: WrFkfiMVZuxwdYad
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Comments:
|
||||||
Binary file not shown.
|
|
@ -0,0 +1 @@
|
||||||
|
Uuid: 6pNYNJpB2BCTWAEn
|
||||||
|
|
@ -2,11 +2,11 @@ Title: Échantillon virtuel
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
Rawglass: - file://inTVYmCtOtEsv5eV
|
Rawglass: - file://WrFkfiMVZuxwdYad
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
Finishedglass: - file://pXjr94mzDdcxVMVv
|
Finishedglass: - file://6pNYNJpB2BCTWAEn
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,9 @@ tabs:
|
||||||
label: PDF
|
label: PDF
|
||||||
type: files
|
type: files
|
||||||
multiple: false
|
multiple: false
|
||||||
uploads: pdf
|
template: pdf
|
||||||
|
accept:
|
||||||
|
extension: pdf
|
||||||
description:
|
description:
|
||||||
type: textarea
|
type: textarea
|
||||||
size: tiny
|
size: tiny
|
||||||
|
|
@ -37,6 +39,6 @@ tabs:
|
||||||
moodboard:
|
moodboard:
|
||||||
label: Images
|
label: Images
|
||||||
type: files
|
type: files
|
||||||
uploads: image
|
template: image
|
||||||
layout: cards
|
layout: cards
|
||||||
size: medium
|
size: medium
|
||||||
|
|
|
||||||
|
|
@ -41,11 +41,11 @@ tabs:
|
||||||
label: Verre brut
|
label: Verre brut
|
||||||
type: files
|
type: files
|
||||||
multiple: false
|
multiple: false
|
||||||
uploads: pdf
|
template: pdf
|
||||||
finishedGlass:
|
finishedGlass:
|
||||||
label: Verre parachevé
|
label: Verre parachevé
|
||||||
type: files
|
type: files
|
||||||
mutliple: false
|
mutliple: false
|
||||||
uploads: pdf
|
template: pdf
|
||||||
stepName:
|
stepName:
|
||||||
type: hidden
|
type: hidden
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,9 @@ function getFileData($file) {
|
||||||
$data['tags'] = $file->tags()->split();
|
$data['tags'] = $file->tags()->split();
|
||||||
};
|
};
|
||||||
|
|
||||||
if($file->comments()->exists()) {
|
if($file->extension() == "pdf") {
|
||||||
$data['comments'] = Data::decode($file->comments()->value(), 'yaml');
|
$data['comments'] = $file->comments()->exists() && $file->comments() ? Data::decode($file->comments()->value(), 'yaml') : [];
|
||||||
}
|
}
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
@ -30,9 +30,6 @@ const licenseKey = import.meta.env.VITE_VPV_LICENSE;
|
||||||
useLicense({ licenseKey });
|
useLicense({ licenseKey });
|
||||||
|
|
||||||
const { openedFile, isCommentsOpen, comments } = storeToRefs(useDialogStore());
|
const { openedFile, isCommentsOpen, comments } = storeToRefs(useDialogStore());
|
||||||
const dialog = useDialogStore();
|
|
||||||
const router = useRouter();
|
|
||||||
const route = useRoute();
|
|
||||||
|
|
||||||
const draftComment = ref(null);
|
const draftComment = ref(null);
|
||||||
|
|
||||||
|
|
@ -44,9 +41,6 @@ watch(isCommentsOpen, (newVal) => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
openedFile.value = route.query.fileIndex
|
|
||||||
? dialog.content.files[route.query.fileIndex]
|
|
||||||
: dialog.content.files[0];
|
|
||||||
watch(openedFile, (newVal) => {
|
watch(openedFile, (newVal) => {
|
||||||
removeCommentMarkers();
|
removeCommentMarkers();
|
||||||
if (newVal.comments) {
|
if (newVal.comments) {
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,10 @@ watch(isOpen, (newValue) => {
|
||||||
router.push({ name: route.name });
|
router.push({ name: route.name });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
openedFile.value = route.query.fileIndex
|
||||||
|
? dialog.content.files[route.query.fileIndex]
|
||||||
|
: dialog.content.files[0];
|
||||||
|
|
||||||
// Functions
|
// Functions
|
||||||
async function validate() {
|
async function validate() {
|
||||||
const response = await api.validateBrief(
|
const response = await api.validateBrief(
|
||||||
|
|
|
||||||
|
|
@ -25,31 +25,28 @@
|
||||||
</button>
|
</button>
|
||||||
</header>
|
</header>
|
||||||
<div class="dialog__inner" id="verre-brut">
|
<div class="dialog__inner" id="verre-brut">
|
||||||
<VPdfViewer
|
<PdfViewer />
|
||||||
v-if="activeTab === 'rawGlass'"
|
|
||||||
:darkMode="true"
|
|
||||||
:initialThumbnailsVisible="true"
|
|
||||||
:src="step.files.static.rawGlass.url"
|
|
||||||
local="fr_FR"
|
|
||||||
@loaded="onPdfLoaded"
|
|
||||||
/>
|
|
||||||
<VPdfViewer
|
|
||||||
v-if="activeTab === 'finishedGlass'"
|
|
||||||
:darkMode="true"
|
|
||||||
:initialThumbnailsVisible="true"
|
|
||||||
:src="step.files.static.finishedGlass.url"
|
|
||||||
local="fr_FR"
|
|
||||||
@loaded="onPdfLoaded"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from "vue";
|
import { ref, watch } from "vue";
|
||||||
import { useVirtualSampleStore } from "../../../stores/virtualSample";
|
import { useVirtualSampleStore } from "../../../stores/virtualSample";
|
||||||
|
import PdfViewer from "../PdfViewer.vue";
|
||||||
|
import { storeToRefs } from "pinia";
|
||||||
|
import { useDialogStore } from "../../../stores/dialog";
|
||||||
|
|
||||||
const { step } = useVirtualSampleStore();
|
const { step } = useVirtualSampleStore();
|
||||||
|
const { openedFile } = storeToRefs(useDialogStore());
|
||||||
const activeTab = ref(Object.keys(step.files.static)[0]);
|
const activeTab = ref(Object.keys(step.files.static)[0]);
|
||||||
|
|
||||||
|
watch(
|
||||||
|
activeTab,
|
||||||
|
(newVal) => {
|
||||||
|
openedFile.value = step.files.static[newVal];
|
||||||
|
},
|
||||||
|
{ immediate: true }
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
||||||
|
|
@ -65,13 +65,6 @@
|
||||||
>
|
>
|
||||||
<span class="sr-only">Afficher les commentaires</span>
|
<span class="sr-only">Afficher les commentaires</span>
|
||||||
</button>
|
</button>
|
||||||
<Comments
|
|
||||||
v-if="isCommentsOpen"
|
|
||||||
:current-page-index="currentPageIndex"
|
|
||||||
:file="file"
|
|
||||||
:comments="file.comments"
|
|
||||||
@update:file="changeFile"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -82,21 +75,18 @@ import Dialog from "primevue/dialog";
|
||||||
import DynamicView from "./DynamicView.vue";
|
import DynamicView from "./DynamicView.vue";
|
||||||
import StaticView from "./StaticView.vue";
|
import StaticView from "./StaticView.vue";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { useDialogStore } from "../../../stores/dialog";
|
|
||||||
import { useVirtualSampleStore } from "../../../stores/virtualSample";
|
import { useVirtualSampleStore } from "../../../stores/virtualSample";
|
||||||
import { usePageStore } from "../../../stores/page";
|
import { useDialogStore } from "../../../stores/dialog";
|
||||||
|
|
||||||
const { file } = defineProps({
|
const { file } = defineProps({
|
||||||
file: Object,
|
file: Object,
|
||||||
});
|
});
|
||||||
|
|
||||||
const { page } = usePageStore();
|
|
||||||
const { comments } = storeToRefs(useDialogStore());
|
|
||||||
const { activeTab, currentFile, step } = storeToRefs(useVirtualSampleStore());
|
const { activeTab, currentFile, step } = storeToRefs(useVirtualSampleStore());
|
||||||
|
const { isCommentsOpen } = storeToRefs(useDialogStore());
|
||||||
|
|
||||||
// Variables
|
// Variables
|
||||||
const isOpen = ref(true);
|
const isOpen = ref(true);
|
||||||
const isCommentsOpen = ref(false);
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,12 @@ export const useDialogStore = defineStore("dialog", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
function updateFile(newFile) {
|
function updateFile(newFile) {
|
||||||
|
openedFile.value = newFile;
|
||||||
|
|
||||||
|
if (!content.value.files) return;
|
||||||
content.value.files = content.value.files.map((file) =>
|
content.value.files = content.value.files.map((file) =>
|
||||||
file.id === newFile.id ? newFile : file
|
file.id === newFile.id ? newFile : file
|
||||||
);
|
);
|
||||||
openedFile.value = newFile;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue