This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const ALL_PRODUCTS = 'ALL_PRODUCTS'; | |
export const ALL_PRODUCTS_SUCCESS = 'ALL_PRODUCTS_SUCCESS'; | |
export const ALL_PRODUCTS_FAILURE = 'ALL_PRODUCTS_FAILURE'; | |
export const PRODUCT_BY_ID = 'PRODUCT_BY_ID'; | |
export const PRODUCT_BY_ID_SUCCESS = 'PRODUCT_BY_ID_SUCCESS'; | |
export const ADD_PRODUCT = 'ADD_PRODUCT'; | |
export const ADD_PRODUCT_SUCCESS = 'ADD_PRODUCT_SUCCESS'; | |
export const ADD_PRODUCT_FAILURE = 'ADD_PRODUCT_FAILURE'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<form @submit.prevent="saveProduct"> | |
<div class="col-lg-5 col-md-5 col-sm-12 col-xs-12"> | |
<div class="form-group"> | |
<label>Name</label> | |
<input | |
type="text" | |
placeholder="Name" | |
v-model="model.name" | |
v-validate="'required'" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<product-form @save-product="addProduct" :model="model" :manufacturers="manufacturers"></product-form> | |
</template> | |
<script> | |
import ProductForm from '../../components/product/ProductForm.vue' | |
export default { | |
data() { | |
return { | |
model: {}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div id="app"> | |
<nav> | |
<div class="container"> | |
<ul class="nav__left"> | |
<!-- Navigation Links --> | |
<li><router-link to="/">Home</router-link></li> | |
<li><router-link to="/admin">Admin</router-link></li> | |
<li><router-link to="/cart">Cart</router-link></li> | |
</ul> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<li><router-link to="/">Home</router-link></li> | |
<li><router-link to="/admin">Admin</router-link></li> | |
<li><router-link to="/cart">Cart</router-link></li> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<div id="root"> | |
<!-- <button type="" v-bind:title="title">Hover over me</button> --> | |
<button :title="title">Hover over me</button> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<div id="root"> | |
<input type="text" name="input" v-model="message"> | |
<p>The value of the input is {{message}}</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias ll='ls -lGaf' | |
nano ~/.bash_profile | |
source ~/.bash_profile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php get_template_part('templates/content', 'store'); | |
/** | |
* | |
* https://roots.io/using-woocommerce-with-sage/ | |
* | |
* woocommerce_before_main_content hook. | |
* | |
* @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content) | |
* @hooked woocommerce_breadcrumb - 20 | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class JSONobject { | |
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export#Using_the_default_export | |
// If we want to export a single value or to have a fallback value for our module, we could use a default export | |
// using export we create a JavaScript ES6 Module which we can later on import | |
// The new "export default" standard is designed to interoperate with existing CommonJS and AMD modules. | |
// https://hacks.mozilla.org/2015/08/es6-in-depth-modules/ | |
// JavaScript classes provide a much simpler and clearer syntax to create objects and deal with inheritance. | |
fillFromJSON(json) { | |
if (!json) return; |