resolve conflict
This commit is contained in:
parent
fa34aed357
commit
d4fe38e65a
16 changed files with 92 additions and 19 deletions
|
|
@ -15,6 +15,8 @@
|
|||
placeholder="Ajoutez une description générale de votre projet…"
|
||||
rows="3"
|
||||
class="border border-grey-200 | rounded-xl | p-16 | w-full"
|
||||
v-model="page.content.description"
|
||||
@input="savePage()"
|
||||
></textarea>
|
||||
</div>
|
||||
<fieldset class="project-details__filters | flex-1">
|
||||
|
|
@ -223,14 +225,6 @@ const { page } = usePageStore();
|
|||
const toast = useToast();
|
||||
const selectedTags = ref([]);
|
||||
|
||||
const beforeSend = (event) => {
|
||||
const formData = event.formData;
|
||||
formData.append(
|
||||
"pageUri",
|
||||
"projects/miss-dior-blooming-bouquet/client-brief"
|
||||
);
|
||||
};
|
||||
|
||||
const modal = ref(null);
|
||||
watch(modal, (newValue) => {
|
||||
if (newValue) {
|
||||
|
|
@ -246,7 +240,34 @@ watch(modal, (newValue) => {
|
|||
|
||||
const images = ref(page.images);
|
||||
|
||||
const onAdvancedUpload = (event) => {
|
||||
const isWaitingForSave = ref(false);
|
||||
function savePage() {
|
||||
if (!isWaitingForSave.value) {
|
||||
isWaitingForSave.value = true;
|
||||
setTimeout(() => {
|
||||
const headers = {
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
pageUri: page.uri,
|
||||
properties: [
|
||||
{
|
||||
name: "description",
|
||||
value: page.content.description,
|
||||
},
|
||||
],
|
||||
}),
|
||||
};
|
||||
fetch("/save-page.json", headers)
|
||||
.then((res) => res.json())
|
||||
.then((json) => {
|
||||
isWaitingForSave.value = false;
|
||||
console.log(json);
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
}
|
||||
|
||||
function onAdvancedUpload(event) {
|
||||
if (event.xhr.status === 200) {
|
||||
toast.add({
|
||||
severity: "success",
|
||||
|
|
@ -266,7 +287,15 @@ const onAdvancedUpload = (event) => {
|
|||
});
|
||||
console.error(JSON.parse(event.xhr.response));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function beforeSend(event) {
|
||||
const formData = event.formData;
|
||||
formData.append(
|
||||
"pageUri",
|
||||
"projects/miss-dior-blooming-bouquet/client-brief"
|
||||
);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue