-
Notifications
You must be signed in to change notification settings - Fork 2
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
base: master
Are you sure you want to change the base?
Conversation
Don't merge it now. |
@api_requests = {} | ||
end | ||
|
||
private |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 || |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 ) |
There was a problem hiding this comment.
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"} |
There was a problem hiding this comment.
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"}/ |
There was a problem hiding this comment.
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"}/ |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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]
@@ -1,4 +1,4 @@ | |||
class AddExternalIdToTag < ActiveRecord::Migration | |||
class AddExternalIdToTag < ActiveRecord::Migration[4.2] |
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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| |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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| |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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.
There was a problem hiding this 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 |
There was a problem hiding this comment.
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"} |
There was a problem hiding this comment.
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"} |
There was a problem hiding this comment.
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"} |
There was a problem hiding this comment.
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"} |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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"} |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this 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 |
There was a problem hiding this comment.
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"} |
There was a problem hiding this comment.
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"} |
There was a problem hiding this comment.
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"} |
There was a problem hiding this comment.
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"} |
There was a problem hiding this comment.
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"}/ |
There was a problem hiding this comment.
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"}/ |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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))
There was a problem hiding this 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" |
There was a problem hiding this comment.
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"} |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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'} |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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")/ |
There was a problem hiding this comment.
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="/") |
There was a problem hiding this comment.
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"} |
There was a problem hiding this comment.
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"}/ |
There was a problem hiding this comment.
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"}/ |
There was a problem hiding this comment.
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
There was a problem hiding this 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"} |
There was a problem hiding this comment.
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"} |
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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} |
There was a problem hiding this comment.
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'}} |
There was a problem hiding this comment.
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 => "#"} |
There was a problem hiding this comment.
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?'} |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this 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); |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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'}} |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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; | ||
} |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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; | ||
} |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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; | ||
} |
There was a problem hiding this comment.
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
No description provided.