Skip to content

Commit

Permalink
fix submission modal probably
Browse files Browse the repository at this point in the history
  • Loading branch information
3vorp committed Dec 22, 2024
1 parent af727c0 commit 9f96a31
Show file tree
Hide file tree
Showing 4 changed files with 166 additions and 156 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
"d3": "7.9.0",
"dompurify": "^3.2.3",
"dotenv": "^16.4.7",
"marked": "~15.0.3",
"marked": "~15.0.4",
"moment": "^2.30.1",
"pinia": "^2.3.0",
"prettier": "^3.4.2",
"prismjs": "~1.29.0",
"vite": "^6.0.3",
"vite": "^6.0.5",
"vue": "^2.7.16",
"vue-calendar-heatmap": "0.8.4",
"vue-graph": "0.8.7",
Expand All @@ -44,6 +44,6 @@
"devDependencies": {
"@types/d3": "^7.4.3",
"@types/prismjs": "^1.26.5",
"nodemon": "^3.1.7"
"nodemon": "^3.1.9"
}
}
2 changes: 1 addition & 1 deletion pages/gallery/modal/main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const PACK_SLIDER_ORDER = [
"classic_faithful_32x",
"classic_faithful_64x",
"classic_faithful_32x_progart",
"classic_faithful_64x_progart"
"classic_faithful_64x_progart",
];
export default {
Expand Down
41 changes: 17 additions & 24 deletions pages/pack/submission-modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -220,30 +220,23 @@ export default {
this.modalOpened = newValue;
},
modalOpened(newValue) {
this.$nextTick(() => {
if (!this.first) {
for (const [k, v] of Object.entries(this.data)) {
if (this.formData[k] === undefined) continue;
this.formData[k] = v;
}
} else {
// reset form on init
this.formData = {
id: null,
reference: null,
council_enabled: null,
channels: {
submit: null,
council: null,
results: null,
},
time_to_council: null,
time_to_results: null,
contributor_role: null,
};
if (this.data.id) this.formData.id = this.data.id;
}
});
if (this.first) {
// reset form on init
this.formData = {
id: null,
reference: null,
council_enabled: null,
channels: {
submit: null,
council: null,
results: null,
},
time_to_council: null,
time_to_results: null,
contributor_role: null,
};
if (this.data.id) this.formData.id = this.data.id;
} else this.formData = this.data;
this.$emit("input", newValue);
},
Expand Down
Loading

0 comments on commit 9f96a31

Please sign in to comment.