-
Notifications
You must be signed in to change notification settings - Fork 3
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
Feature/ud field types #34
base: master
Are you sure you want to change the base?
Conversation
0866d90
to
329fc95
Compare
ready |
329fc95
to
dfd0e1d
Compare
dfd0e1d
to
0472fd5
Compare
ready |
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.
Quay video demo thành quả nha
|
||
def update | ||
if @field_type.update(field_type_params) | ||
update_prices(params) |
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.
Đặt xử lý này vào callback của model nha. Để khi update field_type thì chạy luôn
admin: | ||
introduce: "This is the admin page" |
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.
Thêm i18n ở file vi nữa
field_type: | ||
create_success: "Tạo loại sân thành công" | ||
create_fail: "Tạo loại sân thất bại" | ||
not_found: "Không tìm thấy đơn đặt nà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.
Không thấy thay đổi ở file en nhỉ
booking: | ||
delete_success: "Lịch đặt sân đã bị xóa" | ||
delete_fail: "Đặt sân thành công" | ||
field: | ||
create: "Tạo mới" | ||
add_field: "Thêm sân bóng" | ||
close: "Đóng" | ||
field: | ||
create: "Tạo mới" |
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.
Check luôn i18n chỗ này
@@ -37,8 +60,16 @@ def load_field | |||
redirect_to admin_fields_path | |||
end | |||
|
|||
def load_field_type | |||
@field_type = FieldType.find_by(id: params[: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.
Có cần load field_type từ field không. Và check thêm điều kiện user có phải chủ sân không nữa
Related Tickets
WHAT (optional)
HOW
WHY (optional)
Evidence (Screenshot or Video)