basic layout template
This commit is contained in:
1
app/views/api/customers/index.json.jbuilder
Normal file
1
app/views/api/customers/index.json.jbuilder
Normal file
@@ -0,0 +1 @@
|
||||
json.array! @customers, :id, :name, :company, :contact_no, :email, :membership_id, :membership_type
|
||||
4
app/views/api/customers/show.json.jbuilder
Normal file
4
app/views/api/customers/show.json.jbuilder
Normal file
@@ -0,0 +1,4 @@
|
||||
json.extract! @customer, :id, :name, :company, :contact_no, :membership_type, :membership_id, :created_at
|
||||
json.invoices do
|
||||
json.array! @customer.lastest_invoices ,:id, :receipt_no, :receipt_date, :sale_status, :payment_status
|
||||
end
|
||||
14
app/views/api/restaurant/orders/create.json.jbuilder
Normal file
14
app/views/api/restaurant/orders/create.json.jbuilder
Normal file
@@ -0,0 +1,14 @@
|
||||
if @status == true
|
||||
json.status :success
|
||||
json.id @order.id
|
||||
json.order_items do
|
||||
json.array! @order.order_items, :item_code, :item_name, :qty, :options, :variants, :remarks
|
||||
end
|
||||
else
|
||||
json.status :error
|
||||
if @error_messages
|
||||
json.error_messages @error_messages
|
||||
else
|
||||
json.error_messages @order.errors
|
||||
end
|
||||
end
|
||||
0
app/views/api/restaurant/orders/show.json.jbuilder
Normal file
0
app/views/api/restaurant/orders/show.json.jbuilder
Normal file
7
app/views/api/restaurant/orders/update.json.jbuilder
Normal file
7
app/views/api/restaurant/orders/update.json.jbuilder
Normal file
@@ -0,0 +1,7 @@
|
||||
if @status == true
|
||||
json.status :success
|
||||
json.id @order.id
|
||||
else
|
||||
json.status :error
|
||||
json.error_messages @order.error_messages
|
||||
end
|
||||
17
app/views/install/_form.html.erb
Normal file
17
app/views/install/_form.html.erb
Normal file
@@ -0,0 +1,17 @@
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Business Name</label>
|
||||
<input type="text" class="form-control" id="restaurant_name" aria-describedby="business_name" placeholder="Enter business name">
|
||||
<small id="business_name" class="form-text text-muted">Name of business this system is license to</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="lblAdministrator">Administrator Username</label>
|
||||
<input type="text" class="form-control" id="admin_user" aria-describedby="admin_user" placeholder="Administrator Username">
|
||||
<small id="admin_user" class="form-text text-muted">First Employee who will be assign as administrator</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="admin_password">Password</label>
|
||||
<input type="password" class="form-control" id="admin_password" placeholder="Password">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Install</button>
|
||||
</form>
|
||||
2
app/views/install/create.html.erb
Normal file
2
app/views/install/create.html.erb
Normal file
@@ -0,0 +1,2 @@
|
||||
<h1>Install#create</h1>
|
||||
<p>Find me in app/views/install/create.html.erb</p>
|
||||
17
app/views/install/index.html.erb
Normal file
17
app/views/install/index.html.erb
Normal file
@@ -0,0 +1,17 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-md-3"></div>
|
||||
<div class="col-lg-6 col-md-6 ">
|
||||
<div class="card">
|
||||
|
||||
<div class="card-block">
|
||||
<h4 class="card-title text-center">New Restaurant Installation</h4>
|
||||
<br/>
|
||||
<h6 class="card-subtitle mb-2 text-muted">Welcome to new installation of SmartSales Restaurant Edition</h6>
|
||||
<p class="card-text">Please provide us with following details to setup necessary user account and base system settings.</p>
|
||||
<%= render "install/form" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3"></div>
|
||||
|
||||
</div>
|
||||
@@ -1,4 +1,4 @@
|
||||
<nav class="navbar navbar-toggleable-md navbar-inverse fixed-top bg-inverse">
|
||||
<nav class="navbar navbar-toggleable-md fixed-top navbar-light">
|
||||
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
22
app/views/layouts/installation.html.erb
Normal file
22
app/views/layouts/installation.html.erb
Normal file
@@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
|
||||
<meta name="description" content=""/>
|
||||
<meta name="author" content=""/>
|
||||
|
||||
<title>Film Buff</title>
|
||||
<%= csrf_meta_tags %>
|
||||
|
||||
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
|
||||
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<%= yield %>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
2
app/views/settings/employees/_employee.json.jbuilder
Normal file
2
app/views/settings/employees/_employee.json.jbuilder
Normal file
@@ -0,0 +1,2 @@
|
||||
json.extract! employee, :id, :name, :role, :encrypted_access_code, :created_at, :updated_at
|
||||
json.url employee_url(employee, format: :json)
|
||||
14
app/views/settings/employees/_form.html.erb
Normal file
14
app/views/settings/employees/_form.html.erb
Normal file
@@ -0,0 +1,14 @@
|
||||
<%= simple_form_for([:settings,@employee]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs">
|
||||
<%= f.input :name %>
|
||||
<%= f.input :role, :collection => Lookup.collection_of("employee_roles") %>
|
||||
<%= f.input :password %>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.button :submit %>
|
||||
</div>
|
||||
<% end %>
|
||||
6
app/views/settings/employees/edit.html.erb
Normal file
6
app/views/settings/employees/edit.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<h1>Editing Employee</h1>
|
||||
|
||||
<%= render 'form', employee: @employee %>
|
||||
|
||||
<%= link_to 'Show', @employee %> |
|
||||
<%= link_to 'Back', employees_path %>
|
||||
34
app/views/settings/employees/index.html.erb
Normal file
34
app/views/settings/employees/index.html.erb
Normal file
@@ -0,0 +1,34 @@
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= %>">Home</a></li>
|
||||
<li>Employee</li>
|
||||
<span style="float: right">
|
||||
<%= link_to t('.new', :default => t("helpers.links.new")),new_settings_employee_path,:class => 'btn btn-primary btn-sm' %>
|
||||
</span>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div class="card">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Role</th>
|
||||
<th colspan="3"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @employees.each do |employee| %>
|
||||
<tr>
|
||||
<td><%= employee.name %></td>
|
||||
<td><%= employee.role %></td>
|
||||
<td><%= link_to 'Show', employee[:setting] %></td>
|
||||
<td><%= link_to 'Edit', edit_settings_employee_path(employee) %></td>
|
||||
<td><%= link_to 'Destroy', employee[:setting], method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
1
app/views/settings/employees/index.json.jbuilder
Normal file
1
app/views/settings/employees/index.json.jbuilder
Normal file
@@ -0,0 +1 @@
|
||||
json.array! @employees, partial: 'employees/employee', as: :employee
|
||||
11
app/views/settings/employees/new.html.erb
Normal file
11
app/views/settings/employees/new.html.erb
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
<div class="span12">
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= root_path %>">Home</a></li>
|
||||
<li><a href="<%= settings_employees_path %>">Employees</a></li>
|
||||
<li>New</li>
|
||||
</ul>
|
||||
</div>
|
||||
<%= render 'form', employee: @employee %>
|
||||
</div>
|
||||
11
app/views/settings/employees/show.html.erb
Normal file
11
app/views/settings/employees/show.html.erb
Normal file
@@ -0,0 +1,11 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<p>
|
||||
<strong>Name:</strong>
|
||||
<%= @employee.name %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Role:</strong>
|
||||
<%= @employee.role %>
|
||||
</p>
|
||||
1
app/views/settings/employees/show.json.jbuilder
Normal file
1
app/views/settings/employees/show.json.jbuilder
Normal file
@@ -0,0 +1 @@
|
||||
json.partial! "employees/employee", employee: @employee
|
||||
Reference in New Issue
Block a user