basic layout template

This commit is contained in:
Min Zeya Phyo
2017-04-05 08:24:21 +06:30
parent bcdce092cc
commit 0ddc7bdb44
66 changed files with 7049 additions and 48 deletions

View File

@@ -0,0 +1 @@
json.array! @customers, :id, :name, :company, :contact_no, :email, :membership_id, :membership_type

View 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

View 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

View 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

View 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>

View File

@@ -0,0 +1,2 @@
<h1>Install#create</h1>
<p>Find me in app/views/install/create.html.erb</p>

View 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>

View File

@@ -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>

View 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>

View 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)

View 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 %>

View File

@@ -0,0 +1,6 @@
<h1>Editing Employee</h1>
<%= render 'form', employee: @employee %>
<%= link_to 'Show', @employee %> |
<%= link_to 'Back', employees_path %>

View 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>

View File

@@ -0,0 +1 @@
json.array! @employees, partial: 'employees/employee', as: :employee

View 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>

View File

@@ -0,0 +1,11 @@
<p id="notice"><%= notice %></p>
<p>
<strong>Name:</strong>
<%= @employee.name %>
</p>
<p>
<strong>Role:</strong>
<%= @employee.role %>
</p>

View File

@@ -0,0 +1 @@
json.partial! "employees/employee", employee: @employee