Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Update new UI #13

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open

[WIP] Update new UI #13

wants to merge 26 commits into from

Conversation

vutienduongeh
Copy link
Collaborator

No description provided.

@vutienduongeh
Copy link
Collaborator Author

Don't merge it now.

@api_requests = {}
end

private

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lint/UselessAccessModifier: Useless private access modifier.

return
end

@today_order = Orders::RetrieveService.find_order_by_user_id_and_date session[:user_id], @select_date

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. [105/100]


return if @menu.blank?
if @select_date < Date.today ||
(@select_date == Date.today && @menu.is_lock? && Time.current > @menu.locked_at)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.

@menu = Menu.where('DATE(date)=?', @select_date).first

return if @menu.blank?
if @select_date < Date.today ||

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.

before_action :require_login

def index
@select_date = Date.parse(params[:select_date].presence || Date.today.to_s)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.

# Rails.application.config.assets.precompile += %w( search.js )
# application.js, application.css, and all non-JS/CSS in the app/assets
# folder are already added.
Rails.application.config.assets.precompile += %w( new_template.js new_template.css )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/PercentLiteralDelimiters: %w-literals should be delimited by [ and ].
Layout/SpaceInsidePercentLiteralDelimiters: Do not use spaces inside percent literal delimiters.

= stylesheet_link_tag 'new_template', media: 'all', 'data-turbolinks-track': true
= javascript_include_tag 'new_template', 'data-turbolinks-track': true
= csrf_meta_tags
%script{src: "https://unpkg.com/feather-icons"}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace

= csrf_meta_tags
%script{src: "https://unpkg.com/feather-icons"}
%link{href: "https://employmenthero.com/favicon-96x96.png", rel: "icon", sizes: "96x96", type: "image/png"}/
%link{href: "https://fonts.googleapis.com/css?family=Maven+Pro:400,500,700&subset=vietnamese", rel: "stylesheet"}/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [118/80]
Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace

= javascript_include_tag 'new_template', 'data-turbolinks-track': true
= csrf_meta_tags
%script{src: "https://unpkg.com/feather-icons"}
%link{href: "https://employmenthero.com/favicon-96x96.png", rel: "icon", sizes: "96x96", type: "image/png"}/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [112/80]
Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace

%html
%head
%title EH Canteen
= stylesheet_link_tag 'new_template', media: 'all', 'data-turbolinks-track': true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [85/80]

@vutienduongeh vutienduongeh added the WIP Work in progress label May 14, 2019
@vutienduongeh vutienduongeh changed the title Update new UI [WIP] Update new UI May 14, 2019
@@ -1,4 +1,4 @@
class AddExternalIdToTag < ActiveRecord::Migration
class AddExternalIdToTag < ActiveRecord::Migration[4.2]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/Documentation: Missing top-level class documentation comment.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.

@@ -1,4 +1,4 @@
class AddCustomizableToOrder < ActiveRecord::Migration
class AddCustomizableToOrder < ActiveRecord::Migration[4.2]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/Documentation: Missing top-level class documentation comment.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.

@@ -1,4 +1,4 @@
class CreateDishRestaurantAssociation < ActiveRecord::Migration
class CreateDishRestaurantAssociation < ActiveRecord::Migration[4.2]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/Documentation: Missing top-level class documentation comment.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.

add_foreign_key "menu_histories", "menus"
add_foreign_key "orders", "users"
add_foreign_key "personal_settings", "users"
add_foreign_key "sized_prices", "dishes"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

add_foreign_key "dishes", "restaurants"
add_foreign_key "menu_histories", "menus"
add_foreign_key "orders", "users"
add_foreign_key "personal_settings", "users"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

t.datetime "updated_at", null: false
t.string "email"
t.string "password_digest"
t.integer "admin"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "email"
t.string "password_digest"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

t.string "username"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "email"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

create_table "users", id: :serial, force: :cascade do |t|
t.string "username"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

end

create_table "users", id: :serial, force: :cascade do |t|
t.string "username"
t.datetime "created_at", null: false

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

@@ -1,4 +1,4 @@
class AddExternalIdToRestaurant < ActiveRecord::Migration
class AddExternalIdToRestaurant < ActiveRecord::Migration[4.2]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/Documentation: Missing top-level class documentation comment.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.

@@ -1,4 +1,4 @@
class AddExternalIdToDish < ActiveRecord::Migration
class AddExternalIdToDish < ActiveRecord::Migration[4.2]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/Documentation: Missing top-level class documentation comment.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.

@@ -1,4 +1,4 @@
class PersonalSetting < ActiveRecord::Migration
class PersonalSetting < ActiveRecord::Migration[4.2]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/Documentation: Missing top-level class documentation comment.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.

@@ -1,4 +1,4 @@
class CreateGeneralSetting < ActiveRecord::Migration
class CreateGeneralSetting < ActiveRecord::Migration[4.2]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/Documentation: Missing top-level class documentation comment.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.

@@ -1,4 +1,4 @@
class CreateMenuHistory < ActiveRecord::Migration
class CreateMenuHistory < ActiveRecord::Migration[4.2]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/Documentation: Missing top-level class documentation comment.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.

@@ -1,4 +1,4 @@
class CreateProviderDishMappingTable < ActiveRecord::Migration
class CreateProviderDishMappingTable < ActiveRecord::Migration[4.2]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/Documentation: Missing top-level class documentation comment.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.

@@ -1,4 +1,4 @@
class CreateDailyRestaurant < ActiveRecord::Migration
class CreateDailyRestaurant < ActiveRecord::Migration[4.2]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/Documentation: Missing top-level class documentation comment.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.

@@ -1,4 +1,4 @@
class AddColumnIsProviderToRestaurant < ActiveRecord::Migration
class AddColumnIsProviderToRestaurant < ActiveRecord::Migration[4.2]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/Documentation: Missing top-level class documentation comment.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.

@@ -1,4 +1,4 @@
class AddAuthorToNotice < ActiveRecord::Migration
class AddAuthorToNotice < ActiveRecord::Migration[4.2]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/Documentation: Missing top-level class documentation comment.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.

@@ -1,4 +1,4 @@
class CreateNotices < ActiveRecord::Migration
class CreateNotices < ActiveRecord::Migration[4.2]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/Documentation: Missing top-level class documentation comment.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.

end

create_table "users", id: :serial, force: :cascade do |t|
t.string "username"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

end

create_table "users", id: :serial, force: :cascade do |t|

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

t.string "slack_name"
create_table "tags", id: :serial, force: :cascade do |t|
t.string "name"
t.string "external_id"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

t.integer "admin"
t.string "slack_name"
create_table "tags", id: :serial, force: :cascade do |t|
t.string "name"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

t.string "password_digest"
t.integer "admin"
t.string "slack_name"
create_table "tags", id: :serial, force: :cascade do |t|

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

t.datetime "image_logo_updated_at"
t.string "ref_link"
t.text "description"
t.integer "is_provider"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

t.bigint "image_logo_file_size"
t.datetime "image_logo_updated_at"
t.string "ref_link"
t.text "description"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

t.string "image_logo_content_type"
t.bigint "image_logo_file_size"
t.datetime "image_logo_updated_at"
t.string "ref_link"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

t.string "image_logo_file_name"
t.string "image_logo_content_type"
t.bigint "image_logo_file_size"
t.datetime "image_logo_updated_at"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

t.binary "image"
t.string "image_logo_file_name"
t.string "image_logo_content_type"
t.bigint "image_logo_file_size"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

Copy link

@houndci-bot houndci-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some files could not be reviewed due to errors:

Warning: unrecognized cop Layout/IndentFirstHashElement found in .rubocop.yml
Warning: unrecognized cop Layout/IndentFirstHashElement found in .rubocop.yml
Warning: unrecognized cop Layout/IndentFirstArrayElement found in .rubocop.yml
Error: Unknown Ruby version 2.6 found in `TargetRubyVersion` parameter (in .rubocop.yml).
Supported versions: 2.1, 2.2, 2.3, 2.4, 2.5

@@ -0,0 +1,31 @@
#sidebar_content

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

id attribute must be in lisp-case

%i{"data-feather": "pie-chart"}
%span Overview
= link_to admin_index_path, class: 'item' do
%i{"data-feather": "zap"}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace

%i{"data-feather": "shopping-cart"}
%span Manage Today Order
= link_to manage_all_days_admin_users_path, class: 'item' do
%i{"data-feather": "pie-chart"}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace

%span Preferences
.admin_actions
= link_to manage_company_admin_users_path, class: 'item' do
%i{"data-feather": "shopping-cart"}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace

%i{"data-feather": "rotate-ccw"}
%span Histories
.item
%i{"data-feather": "settings"}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace

@@ -0,0 +1,39 @@
#filter_container
%h3.ui.header Self Ordering
#navbar.ui.borderless.menu

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Classes should be listed before IDs (.ui should precede #navbar)

/ - @r_tags[res.id.to_s].keys.each do |tag|
/ %a.item= tag.name
.eleven.wide.column
#dishes_container

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

id attribute must be in lisp-case

@@ -0,0 +1,39 @@
#filter_container

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

id attribute must be in lisp-case

%a.name{href: dish_path(dish)}= dish.name
%span.price= show_price dish.price
%button.ui.icon.button.add_button{"data-dish-detail": dish.decorate.detail_as_json}
%i{"data-feather": "plus"}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace

options: {class_name: "ui rounded image", img_size: 'thumb'}}
.content
.header
%a.name{href: dish_path(dish)}= dish.name

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace

Copy link

@houndci-bot houndci-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some files could not be reviewed due to errors:

Warning: unrecognized cop Layout/IndentFirstHashElement found in .rubocop.yml
Warning: unrecognized cop Layout/IndentFirstHashElement found in .rubocop.yml
Warning: unrecognized cop Layout/IndentFirstArrayElement found in .rubocop.yml
Error: Unknown Ruby version 2.6 found in `TargetRubyVersion` parameter (in .rubocop.yml).
Supported versions: 2.1, 2.2, 2.3, 2.4, 2.5

%html
%head
%title EH Canteen
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [84/80]

%i{"data-feather": "coffee"}
Restaurant
%a.item(href="https://google.com")
%i{"data-feather": "users"}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace

%i{"data-feather": "file-text"}
Menus
= link_to manages_restaurants_path, class: "item #{'active' if controller_name == 'restaurants'}" do
%i{"data-feather": "coffee"}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace

%i{"data-feather": "home"}
Overview
%a.item(href="https://google.com")
%i{"data-feather": "file-text"}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace

.ui.borderless.bottom.attached.menu
.ui.container
= link_to manages_root_path, class: "item p-none--left #{'active' if current_page?(manages_root_path)}" do
%i{"data-feather": "home"}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace

= csrf_meta_tags
%script{src: "https://unpkg.com/feather-icons"}
%link{href: "https://employmenthero.com/favicon-96x96.png", rel: "icon", sizes: "96x96", type: "image/png"}/
%link{href: "https://fonts.googleapis.com/css?family=Maven+Pro:400,500,700&subset=vietnamese", rel: "stylesheet"}/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [118/80]
Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace

= javascript_include_tag 'new_template', 'data-turbolinks-track': true
= csrf_meta_tags
%script{src: "https://unpkg.com/feather-icons"}
%link{href: "https://employmenthero.com/favicon-96x96.png", rel: "icon", sizes: "96x96", type: "image/png"}/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [112/80]
Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace

%html
%head
%title Lunchery | Admin Dashboard
= stylesheet_link_tag 'new_template', media: 'all', 'data-turbolinks-track': true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [85/80]

= link_to manages_restaurants_path, class: "item #{'active' if controller_name == 'restaurants'}" do
%i{"data-feather": "coffee"}
Restaurant
%a.item(href="https://google.com")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer the hash attributes syntax (%tag{ lang: 'en' }) over HTML attributes syntax (%tag(lang=en))

= link_to manages_root_path, class: "item p-none--left #{'active' if current_page?(manages_root_path)}" do
%i{"data-feather": "home"}
Overview
%a.item(href="https://google.com")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer the hash attributes syntax (%tag{ lang: 'en' }) over HTML attributes syntax (%tag(lang=en))

Copy link

@houndci-bot houndci-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some files could not be reviewed due to errors:

Warning: unrecognized cop Layout/IndentFirstHashElement found in .rubocop.yml
Warning: unrecognized cop Layout/IndentFirstHashElement found in .rubocop.yml
Warning: unrecognized cop Layout/IndentFirstArrayElement found in .rubocop.yml
Error: Unknown Ruby version 2.6 found in `TargetRubyVersion` parameter (in .rubocop.yml).
Supported versions: 2.1, 2.2, 2.3, 2.4, 2.5

%input{type:"text",
placeholder:"Search restaurant...",
class: "appearance-none bg-transparent border-none w-full text-gray-700 mr-3 py-1 px-2 leading-tight focus:outline-none text-lg"}
= link_to "Add New Restaurant", new_manages_restaurant_path, class: "ui primary button"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [93/80]

%i.w-8.mr-5.text-gray-500{'data-feather': 'search'}
%input{type:"text",
placeholder:"Search restaurant...",
class: "appearance-none bg-transparent border-none w-full text-gray-700 mr-3 py-1 px-2 leading-tight focus:outline-none text-lg"}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [145/80]

.ui.category.search.item
.flex.items-center
%i.w-8.mr-5.text-gray-500{'data-feather': 'search'}
%input{type:"text",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace

.flex.items-center.justify-between
.ui.category.search.item
.flex.items-center
%i.w-8.mr-5.text-gray-500{'data-feather': 'search'}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace

@@ -0,0 +1,38 @@
#advanced_table_bundle

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

id attribute must be in lisp-case

.bg-white.rounded.border-gray-400.p-5
%h5.text-lg.font-medium
Crawl from
%img.inline.h-8(src="https://www.now.vn/app/assets/img/nowvn.png" alt="Now logo")/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [90/80]
Prefer the hash attributes syntax (%tag{ lang: 'en' }) over HTML attributes syntax (%tag(lang=en))

%h3 Lunchery
.right.menu
.item
%a.middle-aligned(href="/")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer the hash attributes syntax (%tag{ lang: 'en' }) over HTML attributes syntax (%tag(lang=en))

= stylesheet_link_tag 'new_template', media: 'all', 'data-turbolinks-track': true
= javascript_include_tag 'new_template', 'data-turbolinks-track': true
= csrf_meta_tags
%script{src: "https://unpkg.com/feather-icons"}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace

= csrf_meta_tags
%script{src: "https://unpkg.com/feather-icons"}
%link{href: "https://employmenthero.com/favicon-96x96.png", rel: "icon", sizes: "96x96", type: "image/png"}/
%link{href: "https://fonts.googleapis.com/css?family=Maven+Pro:400,500,700&subset=vietnamese", rel: "stylesheet"}/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [118/80]
Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace

= javascript_include_tag 'new_template', 'data-turbolinks-track': true
= csrf_meta_tags
%script{src: "https://unpkg.com/feather-icons"}
%link{href: "https://employmenthero.com/favicon-96x96.png", rel: "icon", sizes: "96x96", type: "image/png"}/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [112/80]
Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace

Copy link

@houndci-bot houndci-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some files could not be reviewed due to errors:

Warning: unrecognized cop Layout/IndentFirstHashElement found in .rubocop.yml
Warning: unrecognized cop Layout/IndentFirstHashElement found in .rubocop.yml
Warning: unrecognized cop Layout/IndentFirstArrayElement found in .rubocop.yml
Error: Unknown Ruby version 2.6 found in `TargetRubyVersion` parameter (in .rubocop.yml).
Supported versions: 2.1, 2.2, 2.3, 2.4, 2.5

%a.item(href="?select_date=#{@select_date - 1.day}")
%i{"data-feather": "chevron-left"}
%a.item(href="?select_date=#{@select_date + 1.day}")
%i{"data-feather": "chevron-right"}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace

%h3.ui.header Self Ordering
#navbar.ui.borderless.menu
%a.item(href="?select_date=#{@select_date - 1.day}")
%i{"data-feather": "chevron-left"}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace

%i{"data-feather": "chevron-left"}
%a.item(href="?select_date=#{@select_date + 1.day}")
%i{"data-feather": "chevron-right"}
.item= @select_date.strftime("%A, %B %e, %Y")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid using instance variables in partials views

.header
%a.name{href: dish_path(dish)}= dish.name
%span.price= show_price dish.price
%button.ui.icon.button.add_button{"data-dish-detail": dish.decorate.detail_as_json}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [101/80]
Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace

restaurant: dish,
size: [120, 120],
object: 'dish',
options: {class_name: "ui rounded image", img_size: 'thumb'}}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [93/80]

%li= link_to "Home", order_user_path(current_user)
%li= link_to "How to use", help_path
%li.dropdown
%a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#"}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace

- if is_admin?
%li= link_to "Manager Page", manage_admin_users_path
%li.divider
%li= link_to "PING SLACK", ping_slack_admin_users_path, data: {confirm: 'This ping can cause noise for users. Do you want to continue?'}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [152/80]

#indicatorContainer
%p.average Avg 78.000 / 80.000 đ
#order_cart.ui.segment
%table#dishes.ui.very.basic.celled.table

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Classes should be listed before IDs (.ui should precede #dishes)

%h3.ui.header Monthly budget:
#indicatorContainer
%p.average Avg 78.000 / 80.000 đ
#order_cart.ui.segment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

id attribute must be in lisp-case
Classes should be listed before IDs (.ui should precede #order_cart)

#summary_panel.ui.segment
.content
%h3.ui.header Monthly budget:
#indicatorContainer

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

id attribute must be in lisp-case

Copy link

@houndci-bot houndci-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some files could not be reviewed due to errors:

Warning: unrecognized cop Layout/IndentFirstHashElement found in .rubocop.yml
Warning: unrecognized cop Layout/IndentFirstHashElement found in .rubocop.yml
Warning: unrecognized cop Layout/IndentFirstArrayElement found in .rubocop.yml
Error: Unknown Ruby version 2.6 found in `TargetRubyVersion` parameter (in .rubocop.yml).
Supported versions: 2.1, 2.2, 2.3, 2.4, 2.5


$.post("#{create_order_dashboards_path}", dish_params, function(response_data) {
$("#order_cart .empty-order").hide();
selectedOrderItemHtml = HandlebarsTemplates['selected_order_item'](dish_detail);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [88/80]

select_date: "#{@select_date}"
}

$.post("#{create_order_dashboards_path}", dish_params, function(response_data) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [86/80]

restaurant: dish,
size: [120, 120],
object: 'dish',
options: {class_name: "ui rounded image", img_size: 'thumb'}}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [103/80]

-# = render "dashboards/aggregate"
= render "dashboards/self_order"
.five.wide.column
#summary_panel.ui.segment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Classes should be listed before IDs (.ui should precede #summary_panel)
id attribute must be in lisp-case

.ui.basic.button Sign Out
.ui.borderless.bottom.attached.menu
.ui.container
= link_to manages_root_path, class: "item #{'active' if current_page?(manages_root_path)}" do

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [103/80]

}
&--left, &--sides {
#{$value}-left: $size $ip;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rule declaration should be followed by an empty line

&--bottom, &--ends {
#{$value}-bottom: $size $ip;
}
&--left, &--sides {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each selector in a comma sequence should be on its own single line

}
&--bottom, &--ends {
#{$value}-bottom: $size $ip;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rule declaration should be followed by an empty line

&--top, &--ends {
#{$value}-top: $size $ip;
}
&--bottom, &--ends {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each selector in a comma sequence should be on its own single line

}
&--top, &--ends {
#{$value}-top: $size $ip;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rule declaration should be followed by an empty line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WIP Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants