summaryrefslogtreecommitdiff
path: root/iridescence/src/components/admin/NewProduct.vue
diff options
context:
space:
mode:
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
};
},