Merge branch 'august_spring' of bitbucket.org:code2lab/sxrestaurant into august_spring

This commit is contained in:
Nweni
2017-08-22 14:12:04 +06:30
39 changed files with 1413 additions and 945 deletions

2
.idea/.generators generated
View File

@@ -5,4 +5,4 @@ You are allowed to:
2. Remove generators 2. Remove generators
3. Add installed generators 3. Add installed generators
To add new installed generators automatically delete this file and reload the project. To add new installed generators automatically delete this file and reload the project.
--><GeneratorsGroup><Generator name="assets" /><Generator name="cancan:ability" /><Generator name="channel" /><Generator name="coffee:assets" /><Generator name="controller" /><Generator name="factory_girl:model" /><Generator name="generator" /><Generator name="helper" /><Generator name="integration_test" /><Generator name="jbuilder" /><Generator name="job" /><Generator name="js:assets" /><Generator name="kaminari:config" /><Generator name="kaminari:views" /><Generator name="mailer" /><Generator name="migration" /><Generator name="model" /><Generator name="resource" /><Generator name="rspec:controller" /><Generator name="rspec:feature" /><Generator name="rspec:helper" /><Generator name="rspec:install" /><Generator name="rspec:integration" /><Generator name="rspec:job" /><Generator name="rspec:mailer" /><Generator name="rspec:model" /><Generator name="rspec:observer" /><Generator name="rspec:request" /><Generator name="rspec:scaffold" /><Generator name="rspec:view" /><Generator name="scaffold" /><Generator name="scaffold_controller" /><Generator name="sidekiq:worker" /><Generator name="simple_form:install" /><Generator name="system_test" /><Generator name="task" /><Generator name="test_unit:controller" /><Generator name="test_unit:generator" /><Generator name="test_unit:helper" /><Generator name="test_unit:integration" /><Generator name="test_unit:job" /><Generator name="test_unit:mailer" /><Generator name="test_unit:model" /><Generator name="test_unit:plugin" /><Generator name="test_unit:scaffold" /><Generator name="test_unit:system" /><Generator name="uploader" /></GeneratorsGroup></Settings> --><GeneratorsGroup><Generator name="assets" /><Generator name="cancan:ability" /><Generator name="channel" /><Generator name="coffee:assets" /><Generator name="controller" /><Generator name="factory_girl:model" /><Generator name="generator" /><Generator name="helper" /><Generator name="integration_test" /><Generator name="jbuilder" /><Generator name="job" /><Generator name="js:assets" /><Generator name="kaminari:config" /><Generator name="kaminari:views" /><Generator name="mailer" /><Generator name="migration" /><Generator name="model" /><Generator name="nested_form:install" /><Generator name="resource" /><Generator name="rspec:controller" /><Generator name="rspec:feature" /><Generator name="rspec:helper" /><Generator name="rspec:install" /><Generator name="rspec:integration" /><Generator name="rspec:job" /><Generator name="rspec:mailer" /><Generator name="rspec:model" /><Generator name="rspec:observer" /><Generator name="rspec:request" /><Generator name="rspec:scaffold" /><Generator name="rspec:view" /><Generator name="scaffold" /><Generator name="scaffold_controller" /><Generator name="sidekiq:worker" /><Generator name="simple_form:install" /><Generator name="system_test" /><Generator name="task" /><Generator name="test_unit:controller" /><Generator name="test_unit:generator" /><Generator name="test_unit:helper" /><Generator name="test_unit:integration" /><Generator name="test_unit:job" /><Generator name="test_unit:mailer" /><Generator name="test_unit:model" /><Generator name="test_unit:plugin" /><Generator name="test_unit:scaffold" /><Generator name="test_unit:system" /><Generator name="uploader" /></GeneratorsGroup></Settings>

View File

@@ -181,6 +181,7 @@
<orderEntry type="library" scope="PROVIDED" name="multi_json (v1.12.1, rbenv: 2.3.3) [gem]" level="application" /> <orderEntry type="library" scope="PROVIDED" name="multi_json (v1.12.1, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="multi_xml (v0.6.0, rbenv: 2.3.3) [gem]" level="application" /> <orderEntry type="library" scope="PROVIDED" name="multi_xml (v0.6.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mysql2 (v0.4.6, rbenv: 2.3.3) [gem]" level="application" /> <orderEntry type="library" scope="PROVIDED" name="mysql2 (v0.4.6, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="nested_form (v0.3.2, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="nio4r (v2.1.0, rbenv: 2.3.3) [gem]" level="application" /> <orderEntry type="library" scope="PROVIDED" name="nio4r (v2.1.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.8.0, rbenv: 2.3.3) [gem]" level="application" /> <orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.8.0, rbenv: 2.3.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="pdf-core (v0.7.0, rbenv: 2.3.3) [gem]" level="application" /> <orderEntry type="library" scope="PROVIDED" name="pdf-core (v0.7.0, rbenv: 2.3.3) [gem]" level="application" />

485
.idea/workspace.xml generated
View File

@@ -2,26 +2,11 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="89ca96af-a0e4-4fe4-b9a3-9969f22d7079" name="Default" comment=""> <list default="true" id="89ca96af-a0e4-4fe4-b9a3-9969f22d7079" name="Default" comment="">
<change type="MOVED" beforePath="$PROJECT_DIR$/app/controllers/commissioners_controller.rb" afterPath="$PROJECT_DIR$/app/controllers/origami/commissioners_controller.rb" />
<change type="MOVED" beforePath="$PROJECT_DIR$/app/controllers/commissions_controller.rb" afterPath="$PROJECT_DIR$/app/controllers/origami/commissions_controller.rb" />
<change type="MOVED" beforePath="$PROJECT_DIR$/app/views/commissioners/_commissioner.json.jbuilder" afterPath="$PROJECT_DIR$/app/views/origami/commissioners/_commissioner.json.jbuilder" />
<change type="MOVED" beforePath="$PROJECT_DIR$/app/views/commissioners/_form.html.erb" afterPath="$PROJECT_DIR$/app/views/origami/commissioners/_form.html.erb" />
<change type="MOVED" beforePath="$PROJECT_DIR$/app/views/commissioners/edit.html.erb" afterPath="$PROJECT_DIR$/app/views/origami/commissioners/edit.html.erb" />
<change type="MOVED" beforePath="$PROJECT_DIR$/app/views/commissioners/index.html.erb" afterPath="$PROJECT_DIR$/app/views/origami/commissioners/index.html.erb" />
<change type="MOVED" beforePath="$PROJECT_DIR$/app/views/commissioners/index.json.jbuilder" afterPath="$PROJECT_DIR$/app/views/origami/commissioners/index.json.jbuilder" />
<change type="MOVED" beforePath="$PROJECT_DIR$/app/views/commissioners/new.html.erb" afterPath="$PROJECT_DIR$/app/views/origami/commissioners/new.html.erb" />
<change type="MOVED" beforePath="$PROJECT_DIR$/app/views/commissioners/show.html.erb" afterPath="$PROJECT_DIR$/app/views/origami/commissioners/show.html.erb" />
<change type="MOVED" beforePath="$PROJECT_DIR$/app/views/commissioners/show.json.jbuilder" afterPath="$PROJECT_DIR$/app/views/origami/commissioners/show.json.jbuilder" />
<change type="MOVED" beforePath="$PROJECT_DIR$/app/views/commissions/_commission.json.jbuilder" afterPath="$PROJECT_DIR$/app/views/origami/commissions/_commission.json.jbuilder" />
<change type="MOVED" beforePath="$PROJECT_DIR$/app/views/commissions/_form.html.erb" afterPath="$PROJECT_DIR$/app/views/origami/commissions/_form.html.erb" />
<change type="MOVED" beforePath="$PROJECT_DIR$/app/views/commissions/edit.html.erb" afterPath="$PROJECT_DIR$/app/views/origami/commissions/edit.html.erb" />
<change type="MOVED" beforePath="$PROJECT_DIR$/app/views/commissions/index.html.erb" afterPath="$PROJECT_DIR$/app/views/origami/commissions/index.html.erb" />
<change type="MOVED" beforePath="$PROJECT_DIR$/app/views/commissions/index.json.jbuilder" afterPath="$PROJECT_DIR$/app/views/origami/commissions/index.json.jbuilder" />
<change type="MOVED" beforePath="$PROJECT_DIR$/app/views/commissions/new.html.erb" afterPath="$PROJECT_DIR$/app/views/origami/commissions/new.html.erb" />
<change type="MOVED" beforePath="$PROJECT_DIR$/app/views/commissions/show.html.erb" afterPath="$PROJECT_DIR$/app/views/origami/commissions/show.html.erb" />
<change type="MOVED" beforePath="$PROJECT_DIR$/app/views/commissions/show.json.jbuilder" afterPath="$PROJECT_DIR$/app/views/origami/commissions/show.json.jbuilder" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/config/routes.rb" afterPath="$PROJECT_DIR$/config/routes.rb" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/home/dashboard.html.erb" afterPath="$PROJECT_DIR$/app/views/home/dashboard.html.erb" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/home/index.html.erb" afterPath="$PROJECT_DIR$/app/views/home/index.html.erb" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/layouts/_header.html.erb" afterPath="$PROJECT_DIR$/app/views/layouts/_header.html.erb" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/origami/home/show.html.erb" afterPath="$PROJECT_DIR$/app/views/origami/home/show.html.erb" />
</list> </list>
<ignored path="$PROJECT_DIR$/.bundle/" /> <ignored path="$PROJECT_DIR$/.bundle/" />
<ignored path="$PROJECT_DIR$/components/" /> <ignored path="$PROJECT_DIR$/components/" />
@@ -41,98 +26,71 @@
<file leaf-file-name="20170821093252_create_commissions.rb" pinned="false" current-in-tab="false"> <file leaf-file-name="20170821093252_create_commissions.rb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/db/migrate/20170821093252_create_commissions.rb"> <entry file="file://$PROJECT_DIR$/db/migrate/20170821093252_create_commissions.rb">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="36"> <state relative-caret-position="198">
<caret line="2" column="36" lean-forward="true" selection-start-line="2" selection-start-column="36" selection-end-line="2" selection-end-column="36" /> <caret line="11" column="0" lean-forward="false" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="commissioners_controller.rb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/controllers/origami/commissioners_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="36">
<caret line="2" column="0" lean-forward="true" selection-start-line="2" selection-start-column="0" selection-end-line="2" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="commissions_controller.rb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/controllers/origami/commissions_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1010">
<caret line="59" column="38" lean-forward="true" selection-start-line="59" selection-start-column="38" selection-end-line="59" selection-end-column="38" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="new.html.erb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/views/origami/commissions/new.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="36">
<caret line="2" column="14" lean-forward="false" selection-start-line="2" selection-start-column="14" selection-end-line="2" selection-end-column="14" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="_form.html.erb" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/app/views/origami/commissions/_form.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="126">
<caret line="7" column="27" lean-forward="true" selection-start-line="7" selection-start-column="27" selection-end-line="7" selection-end-column="27" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="index.html.erb" pinned="false" current-in-tab="false"> <file leaf-file-name="index.html.erb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/views/origami/commissions/index.html.erb"> <entry file="file://$PROJECT_DIR$/app/views/origami/home/index.html.erb">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="234"> <state relative-caret-position="-1931">
<caret line="13" column="10" lean-forward="true" selection-start-line="13" selection-start-column="10" selection-end-line="13" selection-end-column="10" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="cash_outs_controller.rb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/controllers/origami/cash_outs_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="57" lean-forward="false" selection-start-line="0" selection-start-column="36" selection-end-line="0" selection-end-column="57" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="commissioner.rb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/models/commissioner.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="38" lean-forward="false" selection-start-line="0" selection-start-column="38" selection-end-line="0" selection-end-column="38" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="booking_order.rb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/models/booking_order.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="commission.rb" pinned="false" current-in-tab="false"> <file leaf-file-name="show.html.erb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/models/commission.rb"> <entry file="file://$PROJECT_DIR$/app/views/origami/home/show.html.erb">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0"> <state relative-caret-position="178">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> <caret line="367" column="0" lean-forward="false" selection-start-line="367" selection-start-column="0" selection-end-line="367" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="20170822034139_create_product_commissions.rb" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/db/migrate/20170822034139_create_product_commissions.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="126">
<caret line="7" column="28" lean-forward="true" selection-start-line="7" selection-start-column="28" selection-end-line="7" selection-end-column="28" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="dashboard.html.erb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/views/home/dashboard.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="144">
<caret line="8" column="35" lean-forward="false" selection-start-line="8" selection-start-column="35" selection-end-line="8" selection-end-column="35" />
<folding>
<element signature="n#style#0;n#div#0;n#div#2;n#!!top" expanded="true" />
<element signature="n#style#0;n#div#3;n#!!top" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="index.html.erb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/views/home/index.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1679">
<caret line="12" column="26" lean-forward="false" selection-start-line="12" selection-start-column="26" selection-end-line="12" selection-end-column="26" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="_header.html.erb" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/views/layouts/_header.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="28">
<caret line="68" column="0" lean-forward="false" selection-start-line="68" selection-start-column="0" selection-end-line="68" selection-end-column="0" />
<folding /> <folding />
</state> </state>
</provider> </provider>
@@ -142,11 +100,12 @@
</component> </component>
<component name="FindInProjectRecents"> <component name="FindInProjectRecents">
<findStrings> <findStrings>
<find>origami</find>
<find>table_invoice</find> <find>table_invoice</find>
<find>sale_id</find> <find>sale_id</find>
<find>oqs</find> <find>oqs</find>
<find>void</find> <find>void</find>
<find>red</find>
<find>origami</find>
</findStrings> </findStrings>
</component> </component>
<component name="Git.Settings"> <component name="Git.Settings">
@@ -160,7 +119,6 @@
<option value="$PROJECT_DIR$/app/controllers/origami/void_controller.rb" /> <option value="$PROJECT_DIR$/app/controllers/origami/void_controller.rb" />
<option value="$PROJECT_DIR$/app/controllers/origami/home_controller.rb" /> <option value="$PROJECT_DIR$/app/controllers/origami/home_controller.rb" />
<option value="$PROJECT_DIR$/app/views/origami/payments/show.html.erb" /> <option value="$PROJECT_DIR$/app/views/origami/payments/show.html.erb" />
<option value="$PROJECT_DIR$/app/views/origami/home/show.html.erb" />
<option value="$PROJECT_DIR$/app/views/origami/home/index.html.erb" /> <option value="$PROJECT_DIR$/app/views/origami/home/index.html.erb" />
<option value="$PROJECT_DIR$/app/views/origami/rooms/show.html.erb" /> <option value="$PROJECT_DIR$/app/views/origami/rooms/show.html.erb" />
<option value="$PROJECT_DIR$/app/views/origami/orders/show.html.erb" /> <option value="$PROJECT_DIR$/app/views/origami/orders/show.html.erb" />
@@ -168,7 +126,6 @@
<option value="$PROJECT_DIR$/.idea/workspace.xml" /> <option value="$PROJECT_DIR$/.idea/workspace.xml" />
<option value="$PROJECT_DIR$/app/views/home/show.html.erb" /> <option value="$PROJECT_DIR$/app/views/home/show.html.erb" />
<option value="$PROJECT_DIR$/app/models/ability.rb" /> <option value="$PROJECT_DIR$/app/models/ability.rb" />
<option value="$PROJECT_DIR$/app/views/home/dashboard.html.erb" />
<option value="$PROJECT_DIR$/app/views/origami/sale_edit/edit.html.erb" /> <option value="$PROJECT_DIR$/app/views/origami/sale_edit/edit.html.erb" />
<option value="$PROJECT_DIR$/app/controllers/origami/sale_edit_controller.rb" /> <option value="$PROJECT_DIR$/app/controllers/origami/sale_edit_controller.rb" />
<option value="$PROJECT_DIR$/.gitignore" /> <option value="$PROJECT_DIR$/.gitignore" />
@@ -179,9 +136,21 @@
<option value="$PROJECT_DIR$/config/routes.rb" /> <option value="$PROJECT_DIR$/config/routes.rb" />
<option value="$PROJECT_DIR$/app/controllers/origami/commissioners_controller.rb" /> <option value="$PROJECT_DIR$/app/controllers/origami/commissioners_controller.rb" />
<option value="$PROJECT_DIR$/app/controllers/origami/commissions_controller.rb" /> <option value="$PROJECT_DIR$/app/controllers/origami/commissions_controller.rb" />
<option value="$PROJECT_DIR$/app/views/origami/commissioners/_form.html.erb" />
<option value="$PROJECT_DIR$/app/views/origami/commissions/_form.html.erb" />
<option value="$PROJECT_DIR$/app/views/origami/commissioners/show.html.erb" />
<option value="$PROJECT_DIR$/app/views/origami/commissions/show.html.erb" />
<option value="$PROJECT_DIR$/app/views/origami/commissioners/edit.html.erb" />
<option value="$PROJECT_DIR$/app/views/origami/commissioners/index.html.erb" />
<option value="$PROJECT_DIR$/app/views/origami/commissioners/new.html.erb" />
<option value="$PROJECT_DIR$/app/views/origami/commissions/edit.html.erb" />
<option value="$PROJECT_DIR$/app/views/origami/commissions/index.html.erb" /> <option value="$PROJECT_DIR$/app/views/origami/commissions/index.html.erb" />
<option value="$PROJECT_DIR$/app/views/origami/commissions/new.html.erb" /> <option value="$PROJECT_DIR$/app/views/origami/commissions/new.html.erb" />
<option value="$PROJECT_DIR$/app/views/origami/commissions/_form.html.erb" /> <option value="$PROJECT_DIR$/app/views/origami/home/show.html.erb" />
<option value="$PROJECT_DIR$/db/migrate/20170822034139_create_product_commissions.rb" />
<option value="$PROJECT_DIR$/app/views/home/index.html.erb" />
<option value="$PROJECT_DIR$/app/views/layouts/_header.html.erb" />
<option value="$PROJECT_DIR$/app/views/home/dashboard.html.erb" />
</list> </list>
</option> </option>
</component> </component>
@@ -192,10 +161,10 @@
<sorting>DEFINITION_ORDER</sorting> <sorting>DEFINITION_ORDER</sorting>
</component> </component>
<component name="ProjectFrameBounds"> <component name="ProjectFrameBounds">
<option name="x" value="1440" /> <option name="x" value="1441" />
<option name="y" value="22" /> <option name="y" value="22" />
<option name="width" value="1920" /> <option name="width" value="1919" />
<option name="height" value="724" /> <option name="height" value="722" />
</component> </component>
<component name="ProjectLevelVcsManager"> <component name="ProjectLevelVcsManager">
<ConfirmationsSetting value="1" id="Add" /> <ConfirmationsSetting value="1" id="Add" />
@@ -215,22 +184,8 @@
<foldersAlwaysOnTop value="true" /> <foldersAlwaysOnTop value="true" />
</navigator> </navigator>
<panes> <panes>
<pane id="Scratches" />
<pane id="RailsProjectView" /> <pane id="RailsProjectView" />
<pane id="Scope"> <pane id="Scratches" />
<subPane subId="Project Files">
<PATH>
<PATH_ELEMENT USER_OBJECT="Root">
<option name="myItemId" value="" />
<option name="myItemType" value="" />
</PATH_ELEMENT>
<PATH_ELEMENT USER_OBJECT="sxrestaurant">
<option name="myItemId" value="" />
<option name="myItemType" value="" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
<pane id="ProjectPane"> <pane id="ProjectPane">
<subPane> <subPane>
<PATH> <PATH>
@@ -343,33 +298,7 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT> </PATH_ELEMENT>
<PATH_ELEMENT> <PATH_ELEMENT>
<option name="myItemId" value="origami" /> <option name="myItemId" value="home" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="sxrestaurant" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="sxrestaurant" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="app" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="views" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="origami" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="commissioners" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT> </PATH_ELEMENT>
</PATH> </PATH>
@@ -447,12 +376,27 @@
</PATH> </PATH>
</subPane> </subPane>
</pane> </pane>
<pane id="Scope">
<subPane subId="Project Files">
<PATH>
<PATH_ELEMENT USER_OBJECT="Root">
<option name="myItemId" value="" />
<option name="myItemType" value="" />
</PATH_ELEMENT>
<PATH_ELEMENT USER_OBJECT="sxrestaurant">
<option name="myItemId" value="" />
<option name="myItemType" value="" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
</panes> </panes>
</component> </component>
<component name="PropertiesComponent"> <component name="PropertiesComponent">
<property name="WebServerToolWindowFactoryState" value="false" /> <property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" /> <property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="add_unversioned_files" value="$PROJECT_DIR$/config/database.yml" /> <property name="add_unversioned_files" value="$PROJECT_DIR$/config/database.yml" />
<property name="SearchEverywhereHistoryKey" value="header&#9;FILE&#9;file:///Users/zinlinphyo/Documents/projectX/code2lab/ror/sxrestaurant/app/views/layouts/_header.html.erb" />
</component> </component>
<component name="RecentsManager"> <component name="RecentsManager">
<key name="MoveFile.RECENT_KEYS"> <key name="MoveFile.RECENT_KEYS">
@@ -773,6 +717,9 @@
<option name="remove_strategy" value="false" /> <option name="remove_strategy" value="false" />
</component> </component>
<component name="SpringUtil" SPRING_PRE_LOADER_OPTION="true" /> <component name="SpringUtil" SPRING_PRE_LOADER_OPTION="true" />
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager"> <component name="TaskManager">
<task active="true" id="Default" summary="Default task"> <task active="true" id="Default" summary="Default task">
<changelist id="89ca96af-a0e4-4fe4-b9a3-9969f22d7079" name="Default" comment="" /> <changelist id="89ca96af-a0e4-4fe4-b9a3-9969f22d7079" name="Default" comment="" />
@@ -784,35 +731,36 @@
<workItem from="1498465879846" duration="18792000" /> <workItem from="1498465879846" duration="18792000" />
<workItem from="1502681128282" duration="12098000" /> <workItem from="1502681128282" duration="12098000" />
<workItem from="1502780405774" duration="8876000" /> <workItem from="1502780405774" duration="8876000" />
<workItem from="1503287439872" duration="5377000" /> <workItem from="1503287439872" duration="6673000" />
<workItem from="1503328001970" duration="5777000" />
</task> </task>
<servers /> <servers />
</component> </component>
<component name="TimeTrackingManager"> <component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="52112000" /> <option name="totallyTimeSpent" value="59185000" />
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="1440" y="22" width="1920" height="724" extended-state="0" /> <frame x="1441" y="22" width="1919" height="722" extended-state="0" />
<editor active="true" /> <editor active="true" />
<layout> <layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.1773163" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.18007459" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32978722" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" /> <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32978722" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4924012" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.49237806" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" /> <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" /> <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32911393" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32911393" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
</layout> </layout>
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
@@ -826,12 +774,6 @@
<watches-manager /> <watches-manager />
</component> </component>
<component name="editorHistoryManager"> <component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/app/views/origami/payments/create.json.jbuilder" />
<entry file="file://$PROJECT_DIR$/app/models/printer/receipt_printer.rb" />
<entry file="file://$PROJECT_DIR$/app/controllers/origami/request_bills_controller.rb" />
<entry file="file://$PROJECT_DIR$/app/controllers/api/bill_controller.rb" />
<entry file="file://$PROJECT_DIR$/app/models/booking.rb" />
<entry file="file://$PROJECT_DIR$/app/controllers/origami/sales_controller.rb" />
<entry file="file://$PROJECT_DIR$/app/controllers/origami/table_invoices_controller.rb" /> <entry file="file://$PROJECT_DIR$/app/controllers/origami/table_invoices_controller.rb" />
<entry file="file://$PROJECT_DIR$/app/controllers/origami/payments_controller.rb" /> <entry file="file://$PROJECT_DIR$/app/controllers/origami/payments_controller.rb" />
<entry file="file://$PROJECT_DIR$/app/models/sale_payment.rb" /> <entry file="file://$PROJECT_DIR$/app/models/sale_payment.rb" />
@@ -839,9 +781,7 @@
<entry file="file://$PROJECT_DIR$/app/controllers/origami/void_controller.rb" /> <entry file="file://$PROJECT_DIR$/app/controllers/origami/void_controller.rb" />
<entry file="file://$PROJECT_DIR$/app/controllers/origami/home_controller.rb" /> <entry file="file://$PROJECT_DIR$/app/controllers/origami/home_controller.rb" />
<entry file="file://$PROJECT_DIR$/app/views/origami/payments/show.html.erb" /> <entry file="file://$PROJECT_DIR$/app/views/origami/payments/show.html.erb" />
<entry file="file://$PROJECT_DIR$/app/views/origami/home/index.html.erb" />
<entry file="file://$PROJECT_DIR$/app/views/origami/table_invoices/show.html.erb" /> <entry file="file://$PROJECT_DIR$/app/views/origami/table_invoices/show.html.erb" />
<entry file="file://$PROJECT_DIR$/app/views/origami/home/show.html.erb" />
<entry file="file://$PROJECT_DIR$/app/views/origami/rooms/show.html.erb" /> <entry file="file://$PROJECT_DIR$/app/views/origami/rooms/show.html.erb" />
<entry file="file://$PROJECT_DIR$/app/views/origami/orders/show.html.erb" /> <entry file="file://$PROJECT_DIR$/app/views/origami/orders/show.html.erb" />
<entry file="file://$PROJECT_DIR$/app/views/origami/sales/show.html.erb" /> <entry file="file://$PROJECT_DIR$/app/views/origami/sales/show.html.erb" />
@@ -863,18 +803,7 @@
<entry file="file://$PROJECT_DIR$/config/database.yml" /> <entry file="file://$PROJECT_DIR$/config/database.yml" />
<entry file="file://$PROJECT_DIR$/app/views/home/destroy.html.erb" /> <entry file="file://$PROJECT_DIR$/app/views/home/destroy.html.erb" />
<entry file="file://$PROJECT_DIR$/app/views/home/create.html.erb" /> <entry file="file://$PROJECT_DIR$/app/views/home/create.html.erb" />
<entry file="file://$PROJECT_DIR$/app/views/home/index.html.erb" />
<entry file="file://$PROJECT_DIR$/app/views/home/show.html.erb" />
<entry file="file://$PROJECT_DIR$/app/views/home/dashboard.html.erb" />
<entry file="file://$PROJECT_DIR$/app/models/ability.rb" /> <entry file="file://$PROJECT_DIR$/app/models/ability.rb" />
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="344">
<caret line="56" column="0" lean-forward="false" selection-start-line="56" selection-start-column="0" selection-end-line="56" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db/migrate/20170818051922_create_commissioner.rb" /> <entry file="file://$PROJECT_DIR$/db/migrate/20170818051922_create_commissioner.rb" />
<entry file="file://$PROJECT_DIR$/app/views/origami/sale_edit/edit.html.erb"> <entry file="file://$PROJECT_DIR$/app/views/origami/sale_edit/edit.html.erb">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
@@ -925,6 +854,29 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0"> <state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/origami/commissioners_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="36">
<caret line="2" column="0" lean-forward="false" selection-start-line="2" selection-start-column="0" selection-end-line="2" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/origami/cash_outs_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="57" lean-forward="false" selection-start-line="0" selection-start-column="36" selection-end-line="0" selection-end-column="57" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/models/commissioner.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="38" lean-forward="false" selection-start-line="0" selection-start-column="38" selection-end-line="0" selection-end-column="38" />
<folding /> <folding />
</state> </state>
</provider> </provider>
@@ -945,90 +897,165 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/app/models/commissioner.rb"> <entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0"> <state relative-caret-position="471">
<caret line="0" column="38" lean-forward="false" selection-start-line="0" selection-start-column="38" selection-end-line="0" selection-end-column="38" /> <caret line="56" column="0" lean-forward="false" selection-start-line="56" selection-start-column="0" selection-end-line="56" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db/migrate/20170821093252_create_commissions.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="36">
<caret line="2" column="36" lean-forward="true" selection-start-line="2" selection-start-column="36" selection-end-line="2" selection-end-column="36" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/origami/commissioners/index.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/origami/commissioners/edit.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/origami/cash_outs_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="57" lean-forward="false" selection-start-line="0" selection-start-column="36" selection-end-line="0" selection-end-column="57" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/app/views/origami/commissioners/_form.html.erb"> <entry file="file://$PROJECT_DIR$/app/views/origami/commissioners/_form.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/origami/commissioners_controller.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="36">
<caret line="2" column="0" lean-forward="true" selection-start-line="2" selection-start-column="0" selection-end-line="2" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/origami/commissions/index.html.erb">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="234"> <state relative-caret-position="234">
<caret line="13" column="10" lean-forward="true" selection-start-line="13" selection-start-column="10" selection-end-line="13" selection-end-column="10" /> <caret line="13" column="8" lean-forward="false" selection-start-line="13" selection-start-column="8" selection-end-line="13" selection-end-column="83" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/app/controllers/origami/commissions_controller.rb"> <entry file="file://$PROJECT_DIR$/app/controllers/origami/commissions_controller.rb">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1010"> <state relative-caret-position="-16">
<caret line="59" column="38" lean-forward="true" selection-start-line="59" selection-start-column="38" selection-end-line="59" selection-end-column="38" /> <caret line="2" column="0" lean-forward="false" selection-start-line="2" selection-start-column="0" selection-end-line="2" selection-end-column="0" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/app/views/origami/commissions/new.html.erb"> <entry file="file://$PROJECT_DIR$/app/views/origami/commissioners/edit.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="54">
<caret line="3" column="40" lean-forward="false" selection-start-line="3" selection-start-column="40" selection-end-line="3" selection-end-column="40" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/origami/commissioners/index.html.erb">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="36"> <state relative-caret-position="36">
<caret line="2" column="14" lean-forward="false" selection-start-line="2" selection-start-column="14" selection-end-line="2" selection-end-column="14" /> <caret line="2" column="36" lean-forward="false" selection-start-line="2" selection-start-column="36" selection-end-line="2" selection-end-column="36" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/origami/commissioners/new.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="54">
<caret line="3" column="40" lean-forward="false" selection-start-line="3" selection-start-column="40" selection-end-line="3" selection-end-column="40" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/origami/commissioners/show.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="36">
<caret line="2" column="38" lean-forward="false" selection-start-line="2" selection-start-column="38" selection-end-line="2" selection-end-column="38" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/app/views/origami/commissions/_form.html.erb"> <entry file="file://$PROJECT_DIR$/app/views/origami/commissions/_form.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="198">
<caret line="11" column="28" lean-forward="false" selection-start-line="11" selection-start-column="28" selection-end-line="11" selection-end-column="28" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/origami/commissions/edit.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="72">
<caret line="4" column="23" lean-forward="false" selection-start-line="4" selection-start-column="23" selection-end-line="4" selection-end-column="23" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/origami/commissions/index.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="36">
<caret line="2" column="36" lean-forward="false" selection-start-line="2" selection-start-column="36" selection-end-line="2" selection-end-column="36" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/origami/commissions/show.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="72">
<caret line="4" column="38" lean-forward="false" selection-start-line="4" selection-start-column="38" selection-end-line="4" selection-end-column="38" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/origami/commissions/new.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="5" column="18" lean-forward="false" selection-start-line="5" selection-start-column="18" selection-end-line="5" selection-end-column="18" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/origami/home/index.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1931">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/origami/home/show.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="178">
<caret line="367" column="0" lean-forward="false" selection-start-line="367" selection-start-column="0" selection-end-line="367" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db/migrate/20170821093252_create_commissions.rb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="198">
<caret line="11" column="0" lean-forward="false" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/home/show.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1142">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/home/index.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1679">
<caret line="12" column="26" lean-forward="false" selection-start-line="12" selection-start-column="26" selection-end-line="12" selection-end-column="26" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/layouts/_header.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="28">
<caret line="68" column="0" lean-forward="false" selection-start-line="68" selection-start-column="0" selection-end-line="68" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/home/dashboard.html.erb">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="144">
<caret line="8" column="35" lean-forward="false" selection-start-line="8" selection-start-column="35" selection-end-line="8" selection-end-column="35" />
<folding>
<element signature="n#style#0;n#div#0;n#div#2;n#!!top" expanded="true" />
<element signature="n#style#0;n#div#3;n#!!top" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/db/migrate/20170822034139_create_product_commissions.rb">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="126"> <state relative-caret-position="126">
<caret line="7" column="27" lean-forward="true" selection-start-line="7" selection-start-column="27" selection-end-line="7" selection-end-column="27" /> <caret line="7" column="28" lean-forward="true" selection-start-line="7" selection-start-column="28" selection-end-line="7" selection-end-column="28" />
<folding /> <folding />
</state> </state>
</provider> </provider>

View File

@@ -1,5 +1,5 @@
class Origami::CommissionsController < BaseOrigamiController class Origami::CommissionsController < BaseOrigamiController
# before_action :set_commission, only: [:show, :edit, :update, :destroy] before_action :set_commission, only: [:show, :edit, :update, :destroy]
# GET /commissions # GET /commissions
# GET /commissions.json # GET /commissions.json

View File

@@ -0,0 +1,74 @@
class Origami::ProductCommissionsController < ApplicationController
before_action :set_product_commission, only: [:show, :edit, :update, :destroy]
# GET /product_commissions
# GET /product_commissions.json
def index
@product_commissions = ProductCommission.all
end
# GET /product_commissions/1
# GET /product_commissions/1.json
def show
end
# GET /product_commissions/new
def new
@product_commission = ProductCommission.new
end
# GET /product_commissions/1/edit
def edit
end
# POST /product_commissions
# POST /product_commissions.json
def create
@product_commission = ProductCommission.new(product_commission_params)
respond_to do |format|
if @product_commission.save
format.html { redirect_to @product_commission, notice: 'Product commission was successfully created.' }
format.json { render :show, status: :created, location: @product_commission }
else
format.html { render :new }
format.json { render json: @product_commission.errors, status: :unprocessable_entity }
end
end
end
# PATCH/PUT /product_commissions/1
# PATCH/PUT /product_commissions/1.json
def update
respond_to do |format|
if @product_commission.update(product_commission_params)
format.html { redirect_to @product_commission, notice: 'Product commission was successfully updated.' }
format.json { render :show, status: :ok, location: @product_commission }
else
format.html { render :edit }
format.json { render json: @product_commission.errors, status: :unprocessable_entity }
end
end
end
# DELETE /product_commissions/1
# DELETE /product_commissions/1.json
def destroy
@product_commission.destroy
respond_to do |format|
format.html { redirect_to product_commissions_url, notice: 'Product commission was successfully destroyed.' }
format.json { head :no_content }
end
end
private
# Use callbacks to share common setup or constraints between actions.
def set_product_commission
@product_commission = ProductCommission.find(params[:id])
end
# Never trust parameters from the scary internet, only allow the white list through.
def product_commission_params
params.fetch(:product_commission, {})
end
end

View File

@@ -0,0 +1,2 @@
module Origami::ProductCommissionsHelper
end

View File

@@ -0,0 +1,2 @@
class ProductCommission < ApplicationRecord
end

View File

@@ -30,7 +30,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="card" id="origami" onclick="location.href='<%= origami_root_path %>'"> <div class="card" id="origami" onclick="location.href='<%= origami_root_path %>'">
<div class="card-content"> <div class="card-content">
<span class="card-title">Origami</span> <span class="card-title">Cashier</span>
</div> </div>
</div> </div>
</div> </div>
@@ -66,8 +66,7 @@
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<h4 class="panel-title"> <h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#admin">Administrator Administrator
<span class="glyphicon glyphicon-plus"></span></a>
</h4> </h4>
</div> </div>
<div id="admin" class="panel-collapse collapse in"> <div id="admin" class="panel-collapse collapse in">
@@ -105,7 +104,7 @@
</ul> </ul>
<ul class="col-md-4"> <ul class="col-md-4">
<li>OQS</li><br> <li>OQS</li><br>
<li>Origami</li><br> <li>Cashier</li><br>
<li>CRM</li> <li>CRM</li>
</ul> </ul>
</div> </div>
@@ -115,8 +114,7 @@
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<h4 class="panel-title"> <h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#manager">Manager Manager
<span class="glyphicon glyphicon-plus"></span></a>
</h4> </h4>
</div> </div>
<div id="admin" class="panel-collapse collapse in"> <div id="admin" class="panel-collapse collapse in">
@@ -152,7 +150,7 @@
</ul> </ul>
<ul class="col-md-4"> <ul class="col-md-4">
<li>OQS</li><br> <li>OQS</li><br>
<li>Origami</li><br> <li>Cashier</li><br>
<li>CRM</li> <li>CRM</li>
</ul> </ul>
</div> </div>
@@ -162,8 +160,7 @@
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<h4 class="panel-title"> <h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#supervisor">Supervisor Supervisor
<span class="glyphicon glyphicon-plus"></span></a>
</h4> </h4>
</div> </div>
<div id="supervisor" class="panel-collapse collapse in"> <div id="supervisor" class="panel-collapse collapse in">
@@ -185,14 +182,13 @@
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<h4 class="panel-title"> <h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#cashier">Cashier Cashier
<span class="glyphicon glyphicon-plus"></span></a>
</h4> </h4>
</div> </div>
<div id="cashier" class="panel-collapse collapse in"> <div id="cashier" class="panel-collapse collapse in">
<div class="panel-body"> <div class="panel-body">
<ul class=""> <ul class="">
<li class="">Orgami Panel except Edit and Void</li> <li class="">Cashier Panel except Edit and Void</li>
<li class="">Sale and Order</li> <li class="">Sale and Order</li>
<li class="">and Queue in CRM</li> <li class="">and Queue in CRM</li>
</ul> </ul>
@@ -203,8 +199,7 @@
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<h4 class="panel-title"> <h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#accountant">Accountant Accountant
<span class="glyphicon glyphicon-plus"></span></a>
</h4> </h4>
</div> </div>
<div id="accountant" class="panel-collapse collapse in"> <div id="accountant" class="panel-collapse collapse in">
@@ -223,7 +218,7 @@
</div> </div>
</div> <!-- end col-md-4 --> </div> <!-- end col-md-4 -->
<div class="footer"> <div class="footer" style="background-color: inherit">
<div class="card"> <div class="card">
<div class="page-header center-text"> <div class="page-header center-text">
<h4 class="footer-header"> <h4 class="footer-header">

View File

@@ -30,13 +30,13 @@
<% @employees.each do |employee| %> <% @employees.each do |employee| %>
<div data-formid="#form_<%= employee.emp_id %>" class="empBtn card card-inverse card-primary mb-3 text-center" style=""> <div data-formid="#form_<%= employee.emp_id %>" class="empBtn card card-inverse card-primary mb-3 text-center" style="">
<form id="form_<%=employee.emp_id%>" action="<%= emp_login_path(employee.emp_id) %>" method="PATCH"></form> <form id="form_<%= employee.emp_id %>" action="<%= emp_login_path(employee.emp_id) %>" method="PATCH"></form>
<div class="card-block"> <div class="card-block">
<h4 class="card-title"> <h4 class="card-title">
<%= employee.name %> <%= employee.name %>
</h4> </h4>
<div class="card-content"> <div class="card-content">
(<%= employee.emp_id%>) (<%= employee.emp_id %>)
</div> </div>
<div class="card-footer"> <div class="card-footer">
<small><%= employee.role %></small> <small><%= employee.role %></small>
@@ -47,7 +47,7 @@
</div> </div>
</div> </div>
<div class="col-md-4 col-lg-4" > <div class="col-md-4 col-lg-4">
<div class="card" style="max-height:550px; overflow:auto;padding: 15px"> <div class="card" style="max-height:550px; overflow:auto;padding: 15px">
<h4 class="card-title">Role Features</h4> <h4 class="card-title">Role Features</h4>
<!-- <p><strong>Note:</strong> The <strong>data-parent</strong> attribute makes sure that all collapsible elements under the specified parent will be closed when one of the collapsible item is shown.</p> --> <!-- <p><strong>Note:</strong> The <strong>data-parent</strong> attribute makes sure that all collapsible elements under the specified parent will be closed when one of the collapsible item is shown.</p> -->
@@ -55,7 +55,8 @@
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<h4 class="panel-title"> <h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#admin">Administrator <span class="glyphicon glyphicon-plus"></span></a> <a data-toggle="collapse" data-parent="#accordion" href="#admin">Administrator
<span class="glyphicon glyphicon-plus"></span></a>
</h4> </h4>
</div> </div>
<div id="admin" class="panel-collapse collapse in"> <div id="admin" class="panel-collapse collapse in">
@@ -69,7 +70,8 @@
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<h4 class="panel-title"> <h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#manager">Manager <span class="glyphicon glyphicon-plus"></span></a> <a data-toggle="collapse" data-parent="#accordion" href="#manager">Manager
<span class="glyphicon glyphicon-plus"></span></a>
</h4> </h4>
</div> </div>
<div id="manager" class="panel-collapse collapse"> <div id="manager" class="panel-collapse collapse">
@@ -83,7 +85,8 @@
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<h4 class="panel-title"> <h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#supervisor">Supervisor <span class="glyphicon glyphicon-plus"></span></a> <a data-toggle="collapse" data-parent="#accordion" href="#supervisor">Supervisor
<span class="glyphicon glyphicon-plus"></span></a>
</h4> </h4>
</div> </div>
<div id="supervisor" class="panel-collapse collapse"> <div id="supervisor" class="panel-collapse collapse">
@@ -92,8 +95,8 @@
<li class="">Void</li> <li class="">Void</li>
<li class="">FOC</li> <li class="">FOC</li>
<li class="">Edit</li> <li class="">Edit</li>
<li class="">Credit </li> <li class="">Credit</li>
<li class="">and Payment </li> <li class="">and Payment</li>
</ul> </ul>
</div> </div>
</div> </div>
@@ -101,14 +104,15 @@
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<h4 class="panel-title"> <h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#cashier">Cashier <span class="glyphicon glyphicon-plus"></span></a> <a data-toggle="collapse" data-parent="#accordion" href="#cashier">Cashier
<span class="glyphicon glyphicon-plus"></span></a>
</h4> </h4>
</div> </div>
<div id="cashier" class="panel-collapse collapse"> <div id="cashier" class="panel-collapse collapse">
<div class="panel-body"> <div class="panel-body">
<ul class=""> <ul class="">
<li class="">Orgami Panel except Edit and Void</li> <li class="">Orgami Panel except Edit and Void</li>
<li class="">Sale and Order </li> <li class="">Sale and Order</li>
<li class="">and Queue in CRM</li> <li class="">and Queue in CRM</li>
</ul> </ul>
</div> </div>
@@ -117,7 +121,8 @@
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<h4 class="panel-title"> <h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#accountant">Accountant <span class="glyphicon glyphicon-plus"></span></a> <a data-toggle="collapse" data-parent="#accordion" href="#accountant">Accountant
<span class="glyphicon glyphicon-plus"></span></a>
</h4> </h4>
</div> </div>
<div id="accountant" class="panel-collapse collapse"> <div id="accountant" class="panel-collapse collapse">
@@ -140,6 +145,7 @@
.panel-body { .panel-body {
padding: 5px !important; padding: 5px !important;
} }
/*.card-columns { /*.card-columns {
column-count: 4; column-count: 4;
display: inline-block; display: inline-block;
@@ -148,6 +154,7 @@
float: right; float: right;
} }
@media (min-width: 34em) { @media (min-width: 34em) {
.card-columns { .card-columns {
-webkit-column-count: 2; -webkit-column-count: 2;
@@ -181,8 +188,8 @@
} }
</style> </style>
<script type="text/javascript"> <script type="text/javascript">
$(document).on('turbolinks:load', function() { $(document).on('turbolinks:load', function () {
$(".empBtn").click(function(event){ $(".empBtn").click(function (event) {
event.preventDefault(); event.preventDefault();
console.log($(this).data("formid")); console.log($(this).data("formid"));
var item = $(this).data("formid"); var item = $(this).data("formid");
@@ -190,16 +197,16 @@ $(document).on('turbolinks:load', function() {
}); });
// Add minus icon for collapse element which is open by default // Add minus icon for collapse element which is open by default
$(".collapse.in").each(function(){ $(".collapse.in").each(function () {
$(this).siblings(".panel-heading").find(".glyphicon").addClass("glyphicon-minus").removeClass("glyphicon-plus"); $(this).siblings(".panel-heading").find(".glyphicon").addClass("glyphicon-minus").removeClass("glyphicon-plus");
}); });
// Toggle plus minus icon on show hide of collapse element // Toggle plus minus icon on show hide of collapse element
$(".collapse").on('show.bs.collapse', function(){ $(".collapse").on('show.bs.collapse', function () {
$(this).parent().find(".glyphicon").removeClass("glyphicon-plus").addClass("glyphicon-minus"); $(this).parent().find(".glyphicon").removeClass("glyphicon-plus").addClass("glyphicon-minus");
}).on('hide.bs.collapse', function(){ }).on('hide.bs.collapse', function () {
$(this).parent().find(".glyphicon").removeClass("glyphicon-minus").addClass("glyphicon-plus"); $(this).parent().find(".glyphicon").removeClass("glyphicon-minus").addClass("glyphicon-plus");
}); });
}); });
</script> </script>

View File

@@ -61,7 +61,7 @@
<a href="<%= oqs_root_path %>" role="button" aria-haspopup="true" aria-expanded="false">&nbsp;&nbsp;&nbsp;OQS</a> <a href="<%= oqs_root_path %>" role="button" aria-haspopup="true" aria-expanded="false">&nbsp;&nbsp;&nbsp;OQS</a>
</li> </li>
<li class="navbar-nav mr-auto"> <li class="navbar-nav mr-auto">
<a href="<%= origami_root_path %>" role="button" aria-haspopup="true" aria-expanded="false">&nbsp;&nbsp;&nbsp;Origami</a> <a href="<%= origami_root_path %>" role="button" aria-haspopup="true" aria-expanded="false">&nbsp;&nbsp;&nbsp;Cashier</a>
</li> </li>
<li class="navbar-nav mr-auto"> <li class="navbar-nav mr-auto">
<a href="<%= crm_customers_path %>" role="button" aria-haspopup="true" aria-expanded="false">&nbsp;&nbsp;&nbsp;CRM</a> <a href="<%= crm_customers_path %>" role="button" aria-haspopup="true" aria-expanded="false">&nbsp;&nbsp;&nbsp;CRM</a>

View File

@@ -1,14 +1,18 @@
<%= simple_form_for([:origami,@commissioner]) do |f| %> <div class="col-md-3">
<%= simple_form_for([:origami, @commissioner]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
<div class="form-inputs"> <div class="form-inputs">
<%= f.input :name %> <%= f.input :name %>
<%= f.collection_select :emp_id, Employee.all.order('name asc'), :emp_id, :name, {prompt: "Select an Employee"}, {class: "form-control"} %> <%= f.label :emp_id %>
<%= f.collection_select :emp_id, Employee.all.order('name asc'), :emp_id, :name, {prompt: "Select an Employee"}, {class: "form-control"} %><br/>
<%= f.input :commission_type %> <%= f.input :commission_type %>
<label><%= f.check_box :is_active %> Active </label> <label><%= f.check_box :is_active %> Active </label>
</div> </div>
<div class="form-actions"> <div class="form-actions">
<%= f.button :submit %> <%= link_to 'Back', origami_commissioners_path, class: 'btn btn-success' %>
<%= f.button :submit, class: 'btn btn-info' %>
</div> </div>
<% end %> <% end %>
</div>

View File

@@ -1,7 +1,7 @@
<div class="span12"> <div class="span12">
<div class="page-header"> <div class="page-header">
<ul class="breadcrumb"> <ul class="breadcrumb">
<li><a href="<%= root_path %>">Home</a></li> <li><a href="<%= origami_root_path %>">Home</a></li>
<li><a href="<%= origami_commissioners_path %>">Commissioners</a></li> <li><a href="<%= origami_commissioners_path %>">Commissioners</a></li>
<li>Edit</li> <li>Edit</li>
</ul> </ul>

View File

@@ -1,6 +1,6 @@
<div class="page-header"> <div class="page-header">
<ul class="breadcrumb"> <ul class="breadcrumb">
<li><a href="<%= %>">Home</a></li> <li><a href="<%= origami_root_path %>">Home</a></li>
<li>Commissioner</li> <li>Commissioner</li>
<span style="float: right"> <span style="float: right">
<%= link_to t('.new', :default => t("helpers.links.new")), new_origami_commissioner_path ,:class => 'btn btn-primary btn-sm' %> <%= link_to t('.new', :default => t("helpers.links.new")), new_origami_commissioner_path ,:class => 'btn btn-primary btn-sm' %>

View File

@@ -1,7 +1,7 @@
<div class="span12"> <div class="span12">
<div class="page-header"> <div class="page-header">
<ul class="breadcrumb"> <ul class="breadcrumb">
<li><a href="<%= root_path %>">Home</a></li> <li><a href="<%= origami_root_path %>">Home</a></li>
<li><a href="<%= origami_commissioners_path %>">Commissioners</a></li> <li><a href="<%= origami_commissioners_path %>">Commissioners</a></li>
<li>New</li> <li>New</li>
</ul> </ul>

View File

@@ -1,6 +1,6 @@
<div class="page-header"> <div class="page-header">
<ul class="breadcrumb"> <ul class="breadcrumb">
<li><a href="<%= root_path %>">Home</a></li> <li><a href="<%= origami_root_path %>">Home</a></li>
<li><a href="<%= origami_commissioners_path %>">Commissioners</a></li> <li><a href="<%= origami_commissioners_path %>">Commissioners</a></li>
<span style="float: right"> <span style="float: right">
@@ -14,25 +14,37 @@
<tbody> <tbody>
<tr><td style="width:20%">Name</td><td><%= @commissioner.name %></td></tr> <tr>
<tr><td style="width:20%">Employee Name</td> <td style="width:20%">Name</td>
<td><%= @commissioner.name %></td>
</tr>
<tr>
<td style="width:20%">Employee Name</td>
<td> <td>
<% if Employee.exists? %> <% if Employee.exists? %>
<% employee = Employee.where('emp_id=?',@commissioner.emp_id) %> <% employee = Employee.where('emp_id=?', @commissioner.emp_id) %>
<%= employee[0].name %> <%= employee[0].name %>
<% end %> <% end %>
</td></tr> </td>
<tr><td style="width:20%">Commission Type</td><td><%= @commissioner.commission_type %></td></tr> </tr>
<tr><td style="width:20%">Active</td><td><%= @commissioner.is_active %></td></tr> <tr>
<tr><td style="width:20%">Created By</td><td><%= Employee.find(@commissioner.created_by).name %></td></tr> <td style="width:20%">Commission Type</td>
<td><%= @commissioner.commission_type %></td>
</tr>
<tr><td style="width:20%"><%= link_to 'Edit', edit_origami_commissioner_path(@commissioner) %></td><td><%= link_to 'Destroy', origami_commissioner_path(@commissioner), method: :delete, data: { confirm: 'Are you sure?' } %></td></tr> <tr>
<td style="width:20%">Active</td>
<td><%= @commissioner.is_active %></td>
</tr>
<tr>
<td style="width:20%">Created By</td>
<td><%= Employee.find(@commissioner.created_by).name %></td>
</tr>
</tbody> </tbody>
</table> </table>
<%= link_to 'Back', origami_commissioners_path, class: 'btn btn-success' %>
<%= link_to 'Edit', edit_origami_commissioner_path(@commissioner), class: 'btn btn-info' %>
<%= link_to 'Destroy', origami_commissioner_path(@commissioner), method: :delete, data: {confirm: 'Are you sure?'}, class: 'btn btn-danger' %>
</div> </div>
</div> </div>

View File

@@ -1,15 +1,17 @@
<div class="col-md-3">
<%= simple_form_for([:origami,@commission]) do |f| %> <%= simple_form_for([:origami,@commission]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
<div class="form-inputs"> <div class="form-inputs">
<%= f.collection_select :product_id, Product.all.order('name asc'), :id, :name, {prompt: "Select a Product"}, {class: "form-control"} %> <%= f.label :product_id %>
<%= f.collection_select :product_id, Product.all.order('name asc'), :id, :name, {prompt: "Select a Product"}, {class: "form-control"} %><br/>
<%= f.input :amount %> <%= f.input :amount %>
<%= f.input :commission_type, :collection => [:percentage,:net_amount] %> <%= f.input :commission_type, :collection => [:percentage, :net_amount] %>
<label><%= f.check_box :is_active %> Active </label> <label><%= f.check_box :is_active %> Active </label>
</div> </div>
<div class="form-actions"> <div class="form-actions">
<%= f.button :submit %> <%= link_to 'Back', origami_commissions_path, class: 'btn btn-success' %>
<%= f.button :submit, class: 'btn btn-info' %>
</div> </div>
<% end %> <% end %>
</div>

View File

@@ -1,7 +1,7 @@
<div class="span12"> <div class="span12">
<div class="page-header"> <div class="page-header">
<ul class="breadcrumb"> <ul class="breadcrumb">
<li><a href="<%= root_path %>">Home</a></li> <li><a href="<%= origami_root_path %>">Home</a></li>
<li><a href="<%= origami_commissions_path %>">Commissions</a></li> <li><a href="<%= origami_commissions_path %>">Commissions</a></li>
<li>Edit</li> <li>Edit</li>
</ul> </ul>

View File

@@ -1,6 +1,6 @@
<div class="page-header"> <div class="page-header">
<ul class="breadcrumb"> <ul class="breadcrumb">
<li><a href="<%= %>">Home</a></li> <li><a href="<%= origami_root_path %>">Home</a></li>
<li>Commissions</li> <li>Commissions</li>
<span style="float: right"> <span style="float: right">
<%= link_to t('.new', :default => t("helpers.links.new")), new_origami_commission_path ,:class => 'btn btn-primary btn-sm' %> <%= link_to t('.new', :default => t("helpers.links.new")), new_origami_commission_path ,:class => 'btn btn-primary btn-sm' %>

View File

@@ -1,7 +1,7 @@
<div class="span12"> <div class="span12">
<div class="page-header"> <div class="page-header">
<ul class="breadcrumb"> <ul class="breadcrumb">
<li><a href="<%= root_path %>">Home</a></li> <li><a href="<%= origami_root_path %>">Home</a></li>
<li><a href="<%= origami_commissions_path %>">Commissions</a></li> <li><a href="<%= origami_commissions_path %>">Commissions</a></li>
<li>New</li> <li>New</li>
</ul> </ul>

View File

@@ -1,12 +1,8 @@
<p id="notice"><%= notice %></p> <p id="notice"><%= notice %></p>
<%= link_to 'Edit', edit_commission_path(@commission) %> |
<%= link_to 'Back', commissions_path %>
<div class="page-header"> <div class="page-header">
<ul class="breadcrumb"> <ul class="breadcrumb">
<li><a href="<%= root_path %>">Home</a></li> <li><a href="<%= origami_root_path %>">Home</a></li>
<li><a href="<%= origami_commissions_path %>">Commissions</a></li> <li><a href="<%= origami_commissions_path %>">Commissions</a></li>
<span style="float: right"> <span style="float: right">
@@ -17,27 +13,33 @@
<div class="card-block"> <div class="card-block">
<h4 class="card-title">Commission</h4> <h4 class="card-title">Commission</h4>
<table class="table"> <table class="table">
<tbody> <tbody>
<tr>
<tr><td style="width:20%">Product Name</td> <td style="width:20%">Product Name</td>
<td> <td>
<% if Product.exists? %> <% if Product.exists? %>
<% product = Product.find(@commission.product_id) %> <% product = Product.find(@commission.product_id) %>
<%= product.name %> <%= product.name %>
<% end %> <% end %>
</td>
</td></tr> </tr>
<tr><td style="width:20%">Amount</td><td><%= @commission.amount %></td></tr> <tr>
<tr><td style="width:20%">Commission Type</td><td><%= @commission.commission_type %></td></tr> <td style="width:20%">Amount</td>
<tr><td style="width:20%">Active</td><td><%= @commission.is_active %></td></tr> <td><%= @commission.amount %></td>
</tr>
<tr>
<tr><td style="width:20%"><%= link_to 'Edit', edit_origami_commission_path(@commission) %></td><td><%= link_to 'Destroy', origami_commission_path(@commission), method: :delete, data: { confirm: 'Are you sure?' } %></td></tr> <td style="width:20%">Commission Type</td>
<td><%= @commission.commission_type %></td>
</tr>
<tr>
<td style="width:20%">Active</td>
<td><%= @commission.is_active %></td>
</tr>
</tbody> </tbody>
</table> </table>
<%= link_to 'Back', origami_commissions_path, class: 'btn btn-success' %>
<%= link_to 'Edit', edit_origami_commission_path(@commission), class: 'btn btn-info' %>
<%= link_to 'Destroy', origami_commission_path(@commission), method: :delete, class: 'btn btn-danger', data: {confirm: 'Are you sure?'} %>
</div> </div>
</div> </div>

View File

@@ -26,7 +26,7 @@
<div class="tab-pane" id="completed" role="tabpanel" style="max-height:600px; overflow:auto"> <div class="tab-pane" id="completed" role="tabpanel" style="max-height:600px; overflow:auto">
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;"> <div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
<% @complete.each do |sale| %> <% @complete.each do |sale| %>
<div class="card sales red text-white" data-id = "<%= sale.sale_id %>"> <div class="card sales red text-white" data-id="<%= sale.sale_id %>">
<div class="card-block"> <div class="card-block">
<%= sale.receipt_no %> <%= sale.receipt_no %>
<span style="font-size:12px;float:right;line-height:inherit;"><%= sale.sale_status %></span> <span style="font-size:12px;float:right;line-height:inherit;"><%= sale.sale_status %></span>
@@ -101,7 +101,7 @@
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;"> <div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
<% @orders.each do |order| %> <% @orders.each do |order| %>
<div class="card orders red text-white" data-id = "<%= order.order_id %>"> <div class="card orders red text-white" data-id="<%= order.order_id %>">
<div class="card-block"> <div class="card-block">
<%= order.order_id %> <%= order.order_id %>
</div> </div>
@@ -116,11 +116,12 @@
<!-- Column Two --> <!-- Column Two -->
<div class="col-lg-5 col-md-5 col-sm-5"> <div class="col-lg-5 col-md-5 col-sm-5">
<div class="card" > <div class="card">
<div class="card-header"> <div class="card-header">
<% if @status_order == 'order' && @status_sale != 'sale' %> <% if @status_order == 'order' && @status_sale != 'sale' %>
<div id="save_order_id" data-order="<%= @obj_order.order_id %>"><strong id="order-title">ORDER DETAILS </strong> | Table <%= @dining.name rescue "" %></div> <div id="save_order_id" data-order="<%= @obj_order.order_id %>">
<strong id="order-title">ORDER DETAILS </strong> | Table <%= @dining.name rescue "" %></div>
<% elsif @status_sale == 'sale' %> <% elsif @status_sale == 'sale' %>
<div><strong id="order-title">INVOICE DETAILS </strong> | Table <%= @dining.name rescue "" %></div> <div><strong id="order-title">INVOICE DETAILS </strong> | Table <%= @dining.name rescue "" %></div>
<% end %> <% end %>
@@ -138,7 +139,8 @@
</div> </div>
<div class="col-lg-6 col-md-6 col-sm-6 text-right"> <div class="col-lg-6 col-md-6 col-sm-6 text-right">
<p>Date: <span id="receipt_date"><%= @date.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%></span></p> <p>Date: <span id="receipt_date"><%= @date.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-' %></span>
</p>
</div> </div>
</div> </div>
@@ -147,10 +149,10 @@
<% if @status_sale == 'sale' %> <% if @status_sale == 'sale' %>
<p class="hidden customer-id"><%= @sale_array[0].customer_id rescue '' %></p> <p class="hidden customer-id"><%= @sale_array[0].customer_id rescue '' %></p>
<p>Customer : <%= @sale_array[0].customer.name rescue '' %></p> <p>Customer : <%= @sale_array[0].customer.name rescue '' %></p>
<%else%> <% else %>
<p class="hidden customer-id"><%= @customer.customer_id rescue "" %></p> <p class="hidden customer-id"><%= @customer.customer_id rescue "" %></p>
<p>Customer : <%= @customer.name rescue "" %></p> <p>Customer : <%= @customer.name rescue "" %></p>
<%end%> <% end %>
</div> </div>
</div> </div>
<div class="card-text" style="min-height:500px; max-height:500px; overflow-x:scroll"> <div class="card-text" style="min-height:500px; max-height:500px; overflow-x:scroll">
@@ -160,8 +162,10 @@
<th>#</th> <th>#</th>
<th class="item-name">Items</th> <th class="item-name">Items</th>
<th class="item-attr">QTY</td> <th class="item-attr">QTY
<th class="item-attr">Price</td> </td>
<th class="item-attr">Price
</td>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -195,7 +199,7 @@
if @status_order == 'order' && @status_sale != 'sale' if @status_order == 'order' && @status_sale != 'sale'
unless @order_items.nil? unless @order_items.nil?
count = 0 count = 0
@order_items.each do |order_item | @order_items.each do |order_item|
count += 1 count += 1
sub_total = sub_total + (order_item.price * order_item.qty) sub_total = sub_total + (order_item.price * order_item.qty)
@@ -223,26 +227,28 @@
<td class="item-attr"><strong id="order-sub-total"><%= sub_total %></strong></td> <td class="item-attr"><strong id="order-sub-total"><%= sub_total %></strong></td>
</tr> </tr>
<tr> <tr>
<%if @obj_sale != nil && @obj_sale.discount_type == 'member_discount'%> <% if @obj_sale != nil && @obj_sale.discount_type == 'member_discount' %>
<td class="charges-name"><strong>Member Discount:</strong></td> <td class="charges-name"><strong>Member Discount:</strong></td>
<%else%> <% else %>
<td class="charges-name"><strong>Discount:</strong></td> <td class="charges-name"><strong>Discount:</strong></td>
<%end%> <% end %>
<td class="item-attr"><strong id="order-discount">(<%= @obj_sale.total_discount rescue 0%>)</strong></td> <td class="item-attr"><strong id="order-discount">(<%= @obj_sale.total_discount rescue 0 %>)</strong></td>
</tr> </tr>
<% if @status_sale == "sale" %> <% if @status_sale == "sale" %>
<tr> <tr>
<td class="charges-name"><strong>Tax:</strong></td> <td class="charges-name"><strong>Tax:</strong></td>
<td class="item-attr"><strong id="order-Tax"><%= @obj_sale.total_tax rescue 0%></strong></td> <td class="item-attr"><strong id="order-Tax"><%= @obj_sale.total_tax rescue 0 %></strong></td>
</tr> </tr>
<tr> <tr>
<td class="charges-name"><strong>Rounding Adj:</strong></td> <td class="charges-name"><strong>Rounding Adj:</strong></td>
<td class="item-attr"><strong id="order-round-adj"><%= @obj_sale.rounding_adjustment rescue 0%></strong></td> <td class="item-attr">
<strong id="order-round-adj"><%= @obj_sale.rounding_adjustment rescue 0 %></strong></td>
</tr> </tr>
<tr> <tr>
<td class="charges-name"><strong>Grand Total:</strong></td> <td class="charges-name"><strong>Grand Total:</strong></td>
<td class="item-attr"><strong id="order-grand-total"><%= @obj_sale.grand_total rescue 0%></strong></td> <td class="item-attr"><strong id="order-grand-total"><%= @obj_sale.grand_total rescue 0 %></strong>
</td>
</tr> </tr>
<% end %> <% end %>
<tr class="rebate_amount"></tr> <tr class="rebate_amount"></tr>
@@ -258,7 +264,7 @@
<table class="table table-striped"> <table class="table table-striped">
<% <%
count = 0 count = 0
@order_items.each do |order_item | @order_items.each do |order_item|
count += 1 count += 1
%> %>
@@ -273,7 +279,7 @@
end end
%> %>
</table> </table>
<button class='btn btn-primary' id='add_invoice'> Add to existing invoice </button> <button class='btn btn-primary' id='add_invoice'> Add to existing invoice</button>
<% end %> <% end %>
<% if @sale_array.size > 1 %> <% if @sale_array.size > 1 %>
<br><br> <br><br>
@@ -287,7 +293,11 @@
<table class="table table-striped"> <table class="table table-striped">
<tr> <tr>
<td>Receipt No - <%= sale.receipt_no %></td> <td>Receipt No - <%= sale.receipt_no %></td>
<td><button class='btn btn-sm btn-primary invoicedetails' id="<%= sale.sale_id %>">Show Detail </button></td> <td>
<button class='btn btn-sm btn-primary invoicedetails' id="<%= sale.sale_id %>">Show
Detail
</button>
</td>
</tr> </tr>
</table> </table>
<% <%
@@ -304,28 +314,29 @@
<div class="col-lg-1 col-md-1 col-sm-1"> <div class="col-lg-1 col-md-1 col-sm-1">
<!-- Waiter Buttons --> <!-- Waiter Buttons -->
<button type="button" class="btn btn-primary btn-block" id='back' >Back</button> <button type="button" class="btn btn-primary btn-block" id='back'>Back</button>
<button type="button" id="add_order" class="btn btn-primary btn-block" >Add Order</button> <button type="button" id="add_order" class="btn btn-primary btn-block">Add Order</button>
<% if @dining.bookings.length >= 1 %> <% if @dining.bookings.length >= 1 %>
<button type="button" id="customer" class="btn btn-primary btn-block" >Customer</button> <button type="button" id="customer" class="btn btn-primary btn-block">Customer</button>
<% if @status_order == 'order' && @status_sale != 'sale' %> <% if @status_order == 'order' && @status_sale != 'sale' %>
<button type="button" class="btn btn-primary btn-block" disabled >Edit</button> <button type="button" class="btn btn-primary btn-block" disabled>Edit</button>
<button type="button" id="discount" class="btn btn-primary btn-block" disabled>Discount</button> <button type="button" id="discount" class="btn btn-primary btn-block" disabled>Discount</button>
<button type="button" id="other-charges" class="btn btn-primary btn-block" disabled>Charges</button> <button type="button" id="other-charges" class="btn btn-primary btn-block" disabled>Charges</button>
<button type="button" class="btn btn-primary btn-block" id='move'>Move</button> <button type="button" class="btn btn-primary btn-block" id='move'>Move</button>
<button type="button" id="request_bills" class="btn btn-primary btn-block">Req.Bill</button> <button type="button" id="request_bills" class="btn btn-primary btn-block">Req.Bill</button>
<button type="button" id="first_bill" class="btn btn-primary btn-block" disabled>First Bill</button> <button type="button" id="first_bill" class="btn btn-primary btn-block" disabled>First Bill</button>
<button type="button" id="pay" class="btn btn-primary btn-block" disabled>Pay</button> <button type="button" id="pay" class="btn btn-primary btn-block" disabled>Pay</button>
<button type="button" class="btn btn-primary btn-block" disabled> Void </button> <button type="button" class="btn btn-primary btn-block" disabled> Void</button>
<% else %> <% else %>
<button type="button" class="btn btn-primary btn-block" id='edit'>Edit</button> <button type="button" class="btn btn-primary btn-block" id='edit'>Edit</button>
<button type="button" id="discount" class="btn btn-primary btn-block" >Discount</button> <button type="button" id="discount" class="btn btn-primary btn-block">Discount</button>
<button type="button" id="other-charges" class="btn btn-primary btn-block" >Charges</button> <button type="button" id="other-charges" class="btn btn-primary btn-block">Charges</button>
<button type="button" id="commissions" class="btn btn-primary btn-block">Commissions</button>
<button type="button" class="btn btn-primary btn-block" id='move' disabled="">Move</button> <button type="button" class="btn btn-primary btn-block" id='move' disabled="">Move</button>
<button type="button" id="request_bills" class="btn btn-primary btn-block" disabled> Req.Bill</button> <button type="button" id="request_bills" class="btn btn-primary btn-block" disabled> Req.Bill</button>
<button type="button" id="first_bill" class="btn btn-primary btn-block">First Bill</button> <button type="button" id="first_bill" class="btn btn-primary btn-block">First Bill</button>
<button type="button" id="pay" class="btn btn-primary btn-block">Pay</button> <button type="button" id="pay" class="btn btn-primary btn-block">Pay</button>
<button type="button" id="void" class="btn btn-primary btn-block" > Void </button> <button type="button" id="void" class="btn btn-primary btn-block"> Void</button>
<% end %> <% end %>
<!-- Cashier Buttons --> <!-- Cashier Buttons -->
@@ -334,43 +345,43 @@
</div> </div>
</div> </div>
<script> <script>
$(document).ready(function(){ $(document).ready(function () {
$('.invoicedetails').on('click',function(){ $('.invoicedetails').on('click', function () {
var dining_id = "<%= @dining.id %>"; var dining_id = "<%= @dining.id %>";
var sale_id = this.id; var sale_id = this.id;
window.location.href = '/origami/table/'+ dining_id + "/table_invoice/"+sale_id; window.location.href = '/origami/table/' + dining_id + "/table_invoice/" + sale_id;
}) })
$(".tables").on('click', function(){ $(".tables").on('click', function () {
var customer_id=$(".customer-id").text(); var customer_id = $(".customer-id").text();
show_customer_details(customer_id); show_customer_details(customer_id);
var dining_id = $(this).attr("data-id"); var dining_id = $(this).attr("data-id");
window.location.href = '/origami/table/' + dining_id; window.location.href = '/origami/table/' + dining_id;
}); });
$(".sales").on('click',function(){ $(".sales").on('click', function () {
var customer_id=$(".customer-id").text(); var customer_id = $(".customer-id").text();
show_customer_details(customer_id); show_customer_details(customer_id);
var sale_id = $(this).attr("data-id"); var sale_id = $(this).attr("data-id");
window.location.href = '/origami/sale/' + sale_id; window.location.href = '/origami/sale/' + sale_id;
}); });
$(".rooms").on('click', function(){ $(".rooms").on('click', function () {
var customer_id=$(".customer-id").text(); var customer_id = $(".customer-id").text();
show_customer_details(customer_id); show_customer_details(customer_id);
var dining_id = $(this).attr("data-id"); var dining_id = $(this).attr("data-id");
window.location.href = '/origami/room/' + dining_id; window.location.href = '/origami/room/' + dining_id;
}); });
$(".orders").on('click',function(){ $(".orders").on('click', function () {
var customer_id=$(".customer-id").text(); var customer_id = $(".customer-id").text();
show_customer_details(customer_id); show_customer_details(customer_id);
var order_id = $(this).attr("data-id"); var order_id = $(this).attr("data-id");
@@ -378,36 +389,36 @@ $(document).ready(function(){
}); });
// bind customer to order or sale // bind customer to order or sale
$("#customer").on('click', function(){ $("#customer").on('click', function () {
var sale = $('#sale_id').val(); var sale = $('#sale_id').val();
if (sale) { if (sale) {
var sale_id = sale var sale_id = sale
}else{ } else {
var sale_id = $('#save_order_id').attr('data-order'); var sale_id = $('#save_order_id').attr('data-order');
} }
var table_id = $('.tables').attr("data-id"); var table_id = $('.tables').attr("data-id");
window.location.href = '/origami/'+ sale_id + "/customers" window.location.href = '/origami/' + sale_id + "/customers"
}); });
$('#re-print').click(function() { $('#re-print').click(function () {
var sale_id = $('#sale_id').val(); var sale_id = $('#sale_id').val();
window.location.href = '/origami/'+ sale_id + "/reprint" window.location.href = '/origami/' + sale_id + "/reprint"
return false; return false;
}); });
// Add Other Charges // Add Other Charges
$('#other-charges').click(function() { $('#other-charges').click(function () {
var sale = $('#sale_id').val(); var sale = $('#sale_id').val();
if (sale!="") { if (sale != "") {
var sale_id = sale var sale_id = sale
}else{ } else {
var sale_id = $('#save_order_id').attr('data-order'); var sale_id = $('#save_order_id').attr('data-order');
} }
if(sale_id!=""){ if (sale_id != "") {
window.location.href = '/origami/' + sale_id + '/other_charges' window.location.href = '/origami/' + sale_id + '/other_charges'
} }
else { else {
@@ -418,15 +429,15 @@ $(document).ready(function(){
}); });
// Discount for Payment // Discount for Payment
$('#discount').click(function() { $('#discount').click(function () {
var sale = $('#sale_id').val(); var sale = $('#sale_id').val();
if (sale!="") { if (sale != "") {
var sale_id = sale var sale_id = sale
}else{ } else {
var sale_id = $('#save_order_id').attr('data-order'); var sale_id = $('#save_order_id').attr('data-order');
} }
if(sale_id!=""){ if (sale_id != "") {
window.location.href = '/origami/' + sale_id + '/discount' window.location.href = '/origami/' + sale_id + '/discount'
} }
else { else {
@@ -435,47 +446,47 @@ $(document).ready(function(){
return false; return false;
}); });
}); });
// Print for first bill // Print for first bill
$("#first_bill").on('click', function(){ $("#first_bill").on('click', function () {
var sale_id = $('#sale_id').val(); var sale_id = $('#sale_id').val();
var ajax_url = "/origami/sale/"+ sale_id + "/first_bill"; var ajax_url = "/origami/sale/" + sale_id + "/first_bill";
$.ajax({ $.ajax({
type: "GET", type: "GET",
url: ajax_url, url: ajax_url,
success:function(result){ success: function (result) {
location.reload(); location.reload();
} }
}); });
}); });
$('#pay').on('click',function() { $('#pay').on('click', function () {
var sale_id = $('#sale_id').val(); var sale_id = $('#sale_id').val();
var url = '/origami/sale/'+ sale_id + "/rounding_adj" ; var url = '/origami/sale/' + sale_id + "/rounding_adj";
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: '/origami/sale/'+ sale_id + "/rounding_adj", url: '/origami/sale/' + sale_id + "/rounding_adj",
success:function(result){ success: function (result) {
window.location.href = '/origami/sale/'+ sale_id + "/payment"; window.location.href = '/origami/sale/' + sale_id + "/payment";
} }
}); });
}); });
// Bill Request // Bill Request
$('#request_bills').click(function() { $('#request_bills').click(function () {
var order_id = $('#save_order_id').attr('data-order'); var order_id = $('#save_order_id').attr('data-order');
var ajax_url = "/origami/" + order_id + "/request_bills"; var ajax_url = "/origami/" + order_id + "/request_bills";
$.ajax({ $.ajax({
type: "GET", type: "GET",
url: ajax_url, url: ajax_url,
// data: 'order_id='+ order_id, // data: 'order_id='+ order_id,
success:function(result){ success: function (result) {
if(!result.status){ if (!result.status) {
$.confirm({ $.confirm({
title: 'Infomation!', title: 'Infomation!',
content: result.error_message, content: result.error_message,
@@ -483,7 +494,7 @@ $('#request_bills').click(function() {
confirm: { confirm: {
text: 'Ok', text: 'Ok',
btnClass: 'btn-green', btnClass: 'btn-green',
action: function(){ action: function () {
window.location.href = '/origami'; window.location.href = '/origami';
} }
} }
@@ -495,34 +506,34 @@ $('#request_bills').click(function() {
} }
} }
}); });
}); });
$('#move').on('click',function(){ $('#move').on('click', function () {
var dining_id = "<%= @dining.id %>" var dining_id = "<%= @dining.id %>"
window.location.href = '/origami/table/'+ dining_id + "/movetable"; window.location.href = '/origami/table/' + dining_id + "/movetable";
}) })
$('#back').on('click',function(){ $('#back').on('click', function () {
window.location.href = '/origami/'; window.location.href = '/origami/';
}) })
$('#add_invoice').on('click',function(){ $('#add_invoice').on('click', function () {
var dining_id = "<%= @dining.id %>" var dining_id = "<%= @dining.id %>"
var sale_id = "<%= @obj_sale.sale_id rescue "" %>" var sale_id = "<%= @obj_sale.sale_id rescue "" %>"
var ajax_url = "/origami/sale/append_order"; var ajax_url = "/origami/sale/append_order";
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: ajax_url, url: ajax_url,
data: 'dining_id='+ dining_id + "&sale_id=" + sale_id, data: 'dining_id=' + dining_id + "&sale_id=" + sale_id,
success:function(result){ success: function (result) {
alert("Invoice updated") alert("Invoice updated")
window.location.reload(); window.location.reload();
} }
}); });
}) })
//show cusotmer rebate amount //show cusotmer rebate amount
function show_customer_details(customer_id){ function show_customer_details(customer_id) {
var url = '<%= @show_customer_details_path %>' var url = '<%= @show_customer_details_path %>'
//Start Ajax //Start Ajax
$.ajax({ $.ajax({
@@ -530,24 +541,24 @@ function show_customer_details(customer_id){
url: url, url: url,
data: {}, data: {},
dataType: "json", dataType: "json",
success: function(data) { success: function (data) {
$("#customer_name").text(data["customer"].name); $("#customer_name").text(data["customer"].name);
if (data["response_data"]["data"].length) { if (data["response_data"]["data"].length) {
$.each(data["response_data"]["data"], function (i) { $.each(data["response_data"]["data"], function (i) {
if(data["response_data"]["data"][i]["accountable_type"] == "RebateAccount"){ if (data["response_data"]["data"][i]["accountable_type"] == "RebateAccount") {
var balance = data["response_data"]["data"][i]["balance"]; var balance = data["response_data"]["data"][i]["balance"];
if (data["response_data"]["status"]==true) { if (data["response_data"]["status"] == true) {
$('.rebate_amount').removeClass('hide'); $('.rebate_amount').removeClass('hide');
row = row =
'<td class="charges-name">' + "Rebate Balance" +'</td>' '<td class="charges-name">' + "Rebate Balance" + '</td>'
+'<td class="item-attr">' + balance + '</td>'; + '<td class="item-attr">' + balance + '</td>';
$(".rebate_amount").html(row); $(".rebate_amount").html(row);
} }
} }
}); });
}else{ } else {
$('.rebate_amount').addClass('hide'); $('.rebate_amount').addClass('hide');
} }
} }
@@ -555,13 +566,13 @@ function show_customer_details(customer_id){
//End Ajax //End Ajax
} }
$('#edit').on('click',function(){ $('#edit').on('click', function () {
var dining_id = "<%= @dining.id %>" var dining_id = "<%= @dining.id %>"
var sale_id = "<%= @obj_sale.sale_id rescue "" %>" var sale_id = "<%= @obj_sale.sale_id rescue "" %>"
window.location.href = '/origami/table/'+ dining_id + "/sale/"+ sale_id + "/edit"; window.location.href = '/origami/table/' + dining_id + "/sale/" + sale_id + "/edit";
}); });
$('#void').on('click',function () { $('#void').on('click', function () {
var sure = confirm("Are you sure want to Void"); var sure = confirm("Are you sure want to Void");
if (sure == true) { if (sure == true) {
var sale_id = $('#sale_id').val(); var sale_id = $('#sale_id').val();
@@ -578,8 +589,8 @@ function show_customer_details(customer_id){
} }
}); });
$('#add_order').on('click',function(){ $('#add_order').on('click', function () {
var dining_id = "<%= @dining.id %>" var dining_id = "<%= @dining.id %>"
window.location.href = '/origami/addorders/'+ dining_id; window.location.href = '/origami/addorders/' + dining_id;
}); });
</script> </script>

View File

@@ -0,0 +1,10 @@
<%= simple_form_for(@product_commission) do |f| %>
<%= f.error_notification %>
<div class="form-inputs">
</div>
<div class="form-actions">
<%= f.button :submit %>
</div>
<% end %>

View File

@@ -0,0 +1,2 @@
json.extract! product_commission, :id, :created_at, :updated_at
json.url product_commission_url(product_commission, format: :json)

View File

@@ -0,0 +1,6 @@
<h1>Editing Product Commission</h1>
<%= render 'form', product_commission: @product_commission %>
<%= link_to 'Show', @product_commission %> |
<%= link_to 'Back', product_commissions_path %>

View File

@@ -0,0 +1,25 @@
<p id="notice"><%= notice %></p>
<h1>Product Commissions</h1>
<table>
<thead>
<tr>
<th colspan="3"></th>
</tr>
</thead>
<tbody>
<% @product_commissions.each do |product_commission| %>
<tr>
<td><%= link_to 'Show', product_commission %></td>
<td><%= link_to 'Edit', edit_product_commission_path(product_commission) %></td>
<td><%= link_to 'Destroy', product_commission, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%= link_to 'New Product Commission', new_product_commission_path %>

View File

@@ -0,0 +1 @@
json.array! @product_commissions, partial: 'product_commissions/product_commission', as: :product_commission

View File

@@ -0,0 +1,5 @@
<h1>New Product Commission</h1>
<%= render 'form', product_commission: @product_commission %>
<%= link_to 'Back', product_commissions_path %>

View File

@@ -0,0 +1,4 @@
<p id="notice"><%= notice %></p>
<%= link_to 'Edit', edit_product_commission_path(@product_commission) %> |
<%= link_to 'Back', product_commissions_path %>

View File

@@ -0,0 +1 @@
json.partial! "product_commissions/product_commission", product_commission: @product_commission

View File

@@ -0,0 +1,12 @@
class CreateProductCommissions < ActiveRecord::Migration[5.1]
def change
create_table :product_commissions do |t|
t.string :product_code
t.integer :commission_id
t.integer :qty
t.string :sale_id
t.string :sale_item_id
t.timestamps
end
end
end

View File

@@ -0,0 +1,141 @@
require 'rails_helper'
# This spec was generated by rspec-rails when you ran the scaffold generator.
# It demonstrates how one might use RSpec to specify the controller code that
# was generated by Rails when you ran the scaffold generator.
#
# It assumes that the implementation code is generated by the rails scaffold
# generator. If you are using any extension libraries to generate different
# controller code, this generated spec may or may not pass.
#
# It only uses APIs available in rails and/or rspec-rails. There are a number
# of tools you can use to make these specs even more expressive, but we're
# sticking to rails and rspec-rails APIs to keep things simple and stable.
#
# Compared to earlier versions of this generator, there is very limited use of
# stubs and message expectations in this spec. Stubs are only used when there
# is no simpler way to get a handle on the object needed for the example.
# Message expectations are only used when there is no simpler way to specify
# that an instance is receiving a specific message.
#
# Also compared to earlier versions of this generator, there are no longer any
# expectations of assigns and templates rendered. These features have been
# removed from Rails core in Rails 5, but can be added back in via the
# `rails-controller-testing` gem.
RSpec.describe Origami::ProductCommissionsController, type: :controller do
# This should return the minimal set of attributes required to create a valid
# ProductCommission. As you add validations to ProductCommission, be sure to
# adjust the attributes here as well.
let(:valid_attributes) {
skip("Add a hash of attributes valid for your model")
}
let(:invalid_attributes) {
skip("Add a hash of attributes invalid for your model")
}
# This should return the minimal set of values that should be in the session
# in order to pass any filters (e.g. authentication) defined in
# Origami::ProductCommissionsController. Be sure to keep this updated too.
let(:valid_session) { {} }
describe "GET #index" do
it "returns a success response" do
product_commission = ProductCommission.create! valid_attributes
get :index, params: {}, session: valid_session
expect(response).to be_success
end
end
describe "GET #show" do
it "returns a success response" do
product_commission = ProductCommission.create! valid_attributes
get :show, params: {id: product_commission.to_param}, session: valid_session
expect(response).to be_success
end
end
describe "GET #new" do
it "returns a success response" do
get :new, params: {}, session: valid_session
expect(response).to be_success
end
end
describe "GET #edit" do
it "returns a success response" do
product_commission = ProductCommission.create! valid_attributes
get :edit, params: {id: product_commission.to_param}, session: valid_session
expect(response).to be_success
end
end
describe "POST #create" do
context "with valid params" do
it "creates a new ProductCommission" do
expect {
post :create, params: {origami_product_commission: valid_attributes}, session: valid_session
}.to change(ProductCommission, :count).by(1)
end
it "redirects to the created origami_product_commission" do
post :create, params: {origami_product_commission: valid_attributes}, session: valid_session
expect(response).to redirect_to(ProductCommission.last)
end
end
context "with invalid params" do
it "returns a success response (i.e. to display the 'new' template)" do
post :create, params: {origami_product_commission: invalid_attributes}, session: valid_session
expect(response).to be_success
end
end
end
describe "PUT #update" do
context "with valid params" do
let(:new_attributes) {
skip("Add a hash of attributes valid for your model")
}
it "updates the requested origami_product_commission" do
product_commission = ProductCommission.create! valid_attributes
put :update, params: {id: product_commission.to_param, origami_product_commission: new_attributes}, session: valid_session
product_commission.reload
skip("Add assertions for updated state")
end
it "redirects to the origami_product_commission" do
product_commission = ProductCommission.create! valid_attributes
put :update, params: {id: product_commission.to_param, origami_product_commission: valid_attributes}, session: valid_session
expect(response).to redirect_to(product_commission)
end
end
context "with invalid params" do
it "returns a success response (i.e. to display the 'edit' template)" do
product_commission = ProductCommission.create! valid_attributes
put :update, params: {id: product_commission.to_param, origami_product_commission: invalid_attributes}, session: valid_session
expect(response).to be_success
end
end
end
describe "DELETE #destroy" do
it "destroys the requested origami_product_commission" do
product_commission = ProductCommission.create! valid_attributes
expect {
delete :destroy, params: {id: product_commission.to_param}, session: valid_session
}.to change(ProductCommission, :count).by(-1)
end
it "redirects to the product_commissions list" do
product_commission = ProductCommission.create! valid_attributes
delete :destroy, params: {id: product_commission.to_param}, session: valid_session
expect(response).to redirect_to(product_commissions_url)
end
end
end

View File

@@ -0,0 +1,15 @@
require 'rails_helper'
# Specs in this file have access to a helper object that includes
# the Origami::ProductCommissionsHelper. For example:
#
# describe Origami::ProductCommissionsHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# expect(helper.concat_strings("this","that")).to eq("this that")
# end
# end
# end
RSpec.describe Origami::ProductCommissionsHelper, type: :helper do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe ProductCommission, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@@ -0,0 +1,10 @@
require 'rails_helper'
RSpec.describe "Origami::ProductCommissions", type: :request do
describe "GET /origami_product_commissions" do
it "works! (now write some real specs)" do
get origami_product_commissions_path
expect(response).to have_http_status(200)
end
end
end

View File

@@ -0,0 +1,39 @@
require "rails_helper"
RSpec.describe Origami::ProductCommissionsController, type: :routing do
describe "routing" do
it "routes to #index" do
expect(:get => "/origami/product_commissions").to route_to("origami/product_commissions#index")
end
it "routes to #new" do
expect(:get => "/origami/product_commissions/new").to route_to("origami/product_commissions#new")
end
it "routes to #show" do
expect(:get => "/origami/product_commissions/1").to route_to("origami/product_commissions#show", :id => "1")
end
it "routes to #edit" do
expect(:get => "/origami/product_commissions/1/edit").to route_to("origami/product_commissions#edit", :id => "1")
end
it "routes to #create" do
expect(:post => "/origami/product_commissions").to route_to("origami/product_commissions#create")
end
it "routes to #update via PUT" do
expect(:put => "/origami/product_commissions/1").to route_to("origami/product_commissions#update", :id => "1")
end
it "routes to #update via PATCH" do
expect(:patch => "/origami/product_commissions/1").to route_to("origami/product_commissions#update", :id => "1")
end
it "routes to #destroy" do
expect(:delete => "/origami/product_commissions/1").to route_to("origami/product_commissions#destroy", :id => "1")
end
end
end

View File

@@ -0,0 +1,14 @@
require 'rails_helper'
RSpec.describe "origami/product_commissions/edit", type: :view do
before(:each) do
@origami_product_commission = assign(:origami_product_commission, ProductCommission.create!())
end
it "renders the edit origami_product_commission form" do
render
assert_select "form[action=?][method=?]", origami_product_commission_path(@origami_product_commission), "post" do
end
end
end

View File

@@ -0,0 +1,14 @@
require 'rails_helper'
RSpec.describe "origami/product_commissions/index", type: :view do
before(:each) do
assign(:product_commissions, [
ProductCommission.create!(),
ProductCommission.create!()
])
end
it "renders a list of origami/product_commissions" do
render
end
end

View File

@@ -0,0 +1,14 @@
require 'rails_helper'
RSpec.describe "origami/product_commissions/new", type: :view do
before(:each) do
assign(:origami_product_commission, ProductCommission.new())
end
it "renders new origami_product_commission form" do
render
assert_select "form[action=?][method=?]", product_commissions_path, "post" do
end
end
end

View File

@@ -0,0 +1,11 @@
require 'rails_helper'
RSpec.describe "origami/product_commissions/show", type: :view do
before(:each) do
@origami_product_commission = assign(:origami_product_commission, ProductCommission.create!())
end
it "renders attributes in <p>" do
render
end
end