Project

General

Profile

Actions

Task #155

closed

[QrGift Register/Update Screen] Thêm field gift_type và cập nhật brand_name validation

Added by Nghia Nguyen 4 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Start date:
08/22/2025
Due date:
% Done:

0%

Estimated time:

Description

  1. Mục tiêu:
    Thêm field gift_type vào form Create/Edit để người dùng chọn loại gift, đồng thời thay đổi điều kiện bắt buộc cho field brand_name dựa vào lựa chọn này.

  2. Thay đổi Database:

  • Bảng: qr_gifts
  • Thêm cột mới:
    • Tên: gift_type
    • Kiểu: INTEGER(1)
    • Allow null
  1. Thay đổi UI (Form):
  • Field mới: gift_type

    • Label: ギフト種類
    • Type: Radio button
    • Giá trị:
      • ナショナルギフト (National Gift) – default chọn
      • ローカルギフト (Local Gift)
    • Bắt buộc: Có (user phải chọn)
  • Logic phụ thuộc:

    • Nếu gift_type === "ナショナルギフト" ⇒ field brand_name (ブランド名) là bắt buộc
    • Nếu gift_type === "ローカルギフト" ⇒ field brand_name không bắt buộc
  1. Thay đổi validation
  • Cập nhật validate cho brand_name theo điều kiện trên.

Chi tiết:
https://columbusmantech-my.sharepoint.com/:x:/r/personal/d_dang_columbusmantech_vn/_layouts/15/guestaccess.aspx?share=ESSmt0DI7_VLrYP9qYCcSfQBTwqlW3SigLugrJtU4YbK_Q

Actions #1

Updated by Nghia Nguyen 4 months ago

Bổ sung: Viết migration cập nhật gift_type = 1 cho các row hiện tại

Actions #2

Updated by Nghia Nguyen 4 months ago

  • Subject changed from [QrGift Register/Update Screen] Add field gift_type and update brand_name validation to [QrGift Register/Update Screen] Thêm field gift_type và cập nhật brand_name validation
Actions #3

Updated by khoi le 4 months ago

  • Due date set to 08/07/2025
  • Status changed from New to In Progress
Actions #4

Updated by khoi le 4 months ago

Nghia Nguyen wrote in #note-1:

Bổ sung: Viết migration cập nhật gift_type = 1 cho các row hiện tại

https://github.com/clmt-vn/qrgift-admin/pull/4

Actions #5

Updated by khoi le 4 months ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by dang dao 4 months ago

  • Assignee changed from khoi le to Nghia Nguyen
Actions #7

Updated by Nghia Nguyen 4 months ago

  • Assignee changed from Nghia Nguyen to dang dao

đã merge

Actions #8

Updated by Nghia Nguyen 4 months ago

  • Subtask #192 added
Actions #9

Updated by Nghia Nguyen 4 months ago

task này đã đc deploy trên server dev.
task test: https://redmine.columbusmantech.dev/issues/192

Actions #10

Updated by Nghia Nguyen 4 months ago

  • Subtask deleted (#192)
Actions #11

Updated by Nghia Nguyen 4 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF