Skip to content

Commit 0acb44d

Browse files
ValentinCrochemorealanpoulain
authored andcommitted
Rename create & book functions
1 parent 538a275 commit 0acb44d

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

templates/quasar/components/foo/FooCreate.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</template>
66
</Toolbar>
77

8-
<Form :errors="violations" @submit="submitForm" />
8+
<Form :errors="violations" @submit="create" />
99

1010
<Loading :showing="isLoading" />
1111
</template>
@@ -28,7 +28,7 @@ const breadcrumb = useBreadcrumb();
2828
const {{lc}}CreateStore = use{{titleUcFirst}}CreateStore();
2929
const { created, isLoading, violations, error } = storeToRefs({{lc}}CreateStore);
3030
31-
async function submitForm(item: {{titleUcFirst}}) {
31+
async function create(item: {{titleUcFirst}}) {
3232
await {{lc}}CreateStore.create(item);
3333
3434
if (!created?.value) {

templates/quasar/components/foo/FooUpdate.vue

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,7 @@
66
</template>
77
</Toolbar>
88

9-
<Form
10-
v-if="item"
11-
:values="item"
12-
:errors="violations"
13-
@submit="submitForm"
14-
/>
9+
<Form v-if="item" :values="item" :errors="violations" @submit="update" />
1510

1611
<Loading :showing="isLoading || deleteLoading" />
1712
</div>
@@ -72,7 +67,7 @@ async function deleteItem() {
7267
router.push({ name: '{{titleUcFirst}}List' });
7368
}
7469
75-
async function submitForm(item: {{titleUcFirst}}) {
70+
async function update(item: {{titleUcFirst}}) {
7671
await {{lc}}UpdateStore.update(item);
7772
7873
if (!updated?.value) {

0 commit comments

Comments
 (0)