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

Feature/ud field types #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

manhhnee
Copy link
Contributor

Related Tickets

WHAT (optional)

  • Handle feature update, delete field types for admin

HOW

  • I edit controller, view

WHY (optional)

Evidence (Screenshot or Video)

image
image

@manhhnee manhhnee force-pushed the feature/UD_Field_Types branch 3 times, most recently from 0866d90 to 329fc95 Compare March 21, 2024 03:54
@manhhnee
Copy link
Contributor Author

ready

app/controllers/users_controller.rb Outdated Show resolved Hide resolved
app/helpers/users_helper.rb Outdated Show resolved Hide resolved
app/views/admin/fields/_field.html.erb Outdated Show resolved Hide resolved
@manhhnee manhhnee force-pushed the feature/UD_Field_Types branch from 329fc95 to dfd0e1d Compare March 21, 2024 09:04
@manhhnee manhhnee force-pushed the feature/UD_Field_Types branch from dfd0e1d to 0472fd5 Compare March 21, 2024 09:06
@manhhnee
Copy link
Contributor Author

ready

Copy link
Contributor

@binhpt-1239 binhpt-1239 left a 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)
Copy link
Contributor

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

Comment on lines +30 to +31
admin:
introduce: "This is the admin page"
Copy link
Contributor

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"
Copy link
Contributor

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ỉ

Comment on lines +64 to +72
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"
Copy link
Contributor

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])
Copy link
Contributor

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

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

Successfully merging this pull request may close these issues.

3 participants