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 class="text-gray-900"> | |
| <modal name="modal-order" :width="600" :height="750" @before-open="beforeOpen" @opened="opened"> | |
| <div class="p-2 m-2 border-b border-gray-300 flex flex-row items-center justify-between"> | |
| <p class="text-2xl font-bold">{{ showTableName }}</p> | |
| <label class="material-icons text-red-600 font-extrabold" @click.prevent="hideModal">close</label> | |
| </div> | |
| <div class="p-4 space-y-5"> | |
| <div class="flex flex-col"> | |
| <label for="table-name">Table</label> |
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 class="flex flex-col items-center"> | |
| <div class="grid grid-cols-4 gap-40"> | |
| <a href="#" @click.prevent="showModal(order)" v-for="order in allOrders" :key="order.id"> | |
| <div class="bg-blue-500 p-16 rounded w-48 flex justify-center"> | |
| <p class="text-4xl font-bold">{{ order.table_name }}</p> | |
| </div> | |
| </a> | |
| </div> | |
| <t-button variant="success" class="mt-10 font-semibold" @click.prevent="showModal()">Add New Reservation</t-button> |
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
| xcode-select --install | |
| /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| brew update | |
| brew cask install iterm2 | |
| # update iterm2 settings -> colors, keep directory open new shell, keyboard shortcuts | |
| brew install bash # latest version of bash | |
| # set brew bash as default shell | |
| brew install fortune | |
| brew install cowsay | |
| brew install git |
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
| <script> | |
| import { mapGetters, mapActions } from 'vuex' | |
| import ModalOrder from './ModalOrder' | |
| export default { | |
| name: 'OrderComponent', | |
| components: { | |
| ModalOrder | |
| }, | |
| methods: { |
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
| <script> | |
| import { mapActions } from 'vuex' | |
| export default { | |
| name: "ModalOrder", | |
| data() { | |
| return { | |
| order : { | |
| code: '', | |
| table_name: '', | |
| customer_name: '', |
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
| import axios from 'axios' | |
| import Vue from 'vue' | |
| const url = 'http://localhost:5000/api/v1/orders/' | |
| const state = { orders: [] } | |
| const actions = { | |
| async getReservations({ commit }) { | |
| const response = await axios.get(url) |
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
| import Vuex from 'vuex' | |
| import Vue from 'vue' | |
| import orders from './modules/orders' | |
| // install vuex | |
| Vue.use(Vuex) | |
| // create a store | |
| export default new Vuex.Store({ | |
| modules: { |
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
| import OrderComponent from './components/OrderComponent.vue' | |
| export default [ | |
| { path: '/', component: OrderComponent}, | |
| ] |
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> | |
| <modal name="modal-order" @before-open="beforeOpen" @opened="opened"> | |
| <form @submit.prevent="onSubmit"> | |
| <h1>{{ showTableName }}</h1> | |
| <div class="form-group"> | |
| <label for="table-name">Table</label> | |
| <input type="text" v-model.lazy="order.table_name" @keydown.shift.tab.prevent="" ref="table_name"> | |
| </div> | |
| <div class="form-group"> |
NewerOlder