summaryrefslogtreecommitdiff
path: root/iridescence/src/components/admin/NewProduct.vue
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2020-11-08 21:26:34 -0500
committerAdam T. Carpenter <atc@53hor.net>2020-11-08 21:26:34 -0500
commitc5280144de096c274f185fade287ccd63b954ceb (patch)
tree169f1c2ad86c68e5ccb37494398c5e2db33dca3d /iridescence/src/components/admin/NewProduct.vue
parent7dd36c0e699a1154c7163f25bf488fbd63edeafe (diff)
downloadtheglassyladies-c5280144de096c274f185fade287ccd63b954ceb.tar.xz
theglassyladies-c5280144de096c274f185fade287ccd63b954ceb.zip
fixed up product models and api calls, working on new product form
Diffstat (limited to 'iridescence/src/components/admin/NewProduct.vue')
-rw-r--r--iridescence/src/components/admin/NewProduct.vue20
1 files changed, 7 insertions, 13 deletions
diff --git a/iridescence/src/components/admin/NewProduct.vue b/iridescence/src/components/admin/NewProduct.vue
index 8c45f0b..511ae9c 100644
--- a/iridescence/src/components/admin/NewProduct.vue
+++ b/iridescence/src/components/admin/NewProduct.vue
@@ -17,7 +17,9 @@
<button class="delete" @click="toggleModal"></button>
</header>
<section class="modal-card-body">
- <ProductEditCard v-bind:current-product="product"></ProductEditCard>
+ <ProductEditCard
+ v-bind:current-product="newProduct"
+ ></ProductEditCard>
</section>
<footer class="modal-card-foot"></footer>
</div>
@@ -27,26 +29,18 @@
</template>
<script>
-import ProductEditCard from "./ProductEditCard.vue";
+import Product from "../../models/product";
+import ProductEditCard from "./ProductEditCard";
export default {
- name: "AddNewProduct",
+ name: "NewProduct",
components: {
ProductEditCard
},
data: function() {
return {
modalEnabled: false,
- product: {
- id: 0,
- name: "",
- quantity: 0,
- cents: 0,
- imgPath: "",
- description: "",
- featured: false,
- categories: []
- },
+ newProduct: new Product(),
addAnother: false
};
},