Lines 1-12
Link Here
|
1 |
<template> |
1 |
<template> |
2 |
<div v-if="!initialized">{{ $__("Loading") }}</div> |
2 |
<div v-if="!initialized">{{ $__("Loading") }}</div> |
3 |
<template v-else> |
3 |
<main id="vendors_add" v-else> |
4 |
<h1 v-if="vendor.id"> |
4 |
<h1 v-if="vendor.id"> |
5 |
{{ $__("Edit vendor #%s").format(vendor.id) }} |
5 |
{{ $__("Edit vendor #%s").format(vendor.id) }} |
6 |
</h1> |
6 |
</h1> |
7 |
<h1 v-else>{{ $__("Add vendor") }}</h1> |
7 |
<h1 v-else>{{ $__("Add vendor") }}</h1> |
8 |
<Toolbar :sticky="true"> |
8 |
<Toolbar :sticky="true"> |
9 |
<ButtonSubmit :text="$__('Save')" icon="save" /> |
9 |
<ButtonSubmit :text="$__('Save')" icon="save" :form="vendorForm" /> |
10 |
<ToolbarButton |
10 |
<ToolbarButton |
11 |
:to="{ name: 'VendorList' }" |
11 |
:to="{ name: 'VendorList' }" |
12 |
:title="$__('Cancel')" |
12 |
:title="$__('Cancel')" |
Lines 15-21
Link Here
|
15 |
> |
15 |
> |
16 |
</ToolbarButton> |
16 |
</ToolbarButton> |
17 |
</Toolbar> |
17 |
</Toolbar> |
18 |
<form @submit="onSubmit($event)" id="add_vendor"> |
18 |
<form @submit="onSubmit($event)" ref="vendorForm"> |
19 |
<VendorDetails :vendor="vendor" /> |
19 |
<VendorDetails :vendor="vendor" /> |
20 |
<VendorContacts :vendor="vendor" /> |
20 |
<VendorContacts :vendor="vendor" /> |
21 |
<VendorInterfaces :vendor="vendor" /> |
21 |
<VendorInterfaces :vendor="vendor" /> |
Lines 25-31
Link Here
|
25 |
:discountValid="discountValid" |
25 |
:discountValid="discountValid" |
26 |
/> |
26 |
/> |
27 |
</form> |
27 |
</form> |
28 |
</template> |
28 |
</main> |
29 |
</template> |
29 |
</template> |
30 |
|
30 |
|
31 |
<script> |
31 |
<script> |
Lines 38-45
import VendorOrderingInformation from "./VendorOrderingInformation.vue";
Link Here
|
38 |
import VendorInterfaces from "./VendorInterfaces.vue"; |
38 |
import VendorInterfaces from "./VendorInterfaces.vue"; |
39 |
import Toolbar from "../Toolbar.vue"; |
39 |
import Toolbar from "../Toolbar.vue"; |
40 |
import ToolbarButton from "../ToolbarButton.vue"; |
40 |
import ToolbarButton from "../ToolbarButton.vue"; |
|
|
41 |
import { ref } from "vue"; |
41 |
|
42 |
|
42 |
export default { |
43 |
export default { |
|
|
44 |
setup() { |
45 |
const vendorForm = ref(); |
46 |
return { |
47 |
vendorForm, |
48 |
}; |
49 |
}, |
43 |
data() { |
50 |
data() { |
44 |
return { |
51 |
return { |
45 |
vendor: { |
52 |
vendor: { |