Mhamdans17 commited on
Commit ·
5cd9ed5
1
Parent(s): 36aac72
fix: tenant settings not fetching and caching correctly
Browse filesFiles changed (2)
185 unmodified lines186187188189190191192185 unmodified linesvar user models.Userif err := config.DB.Select("id, name, email, password, phone, role, company_id, branch_id, is_active, created_at").Preload("Company", func(db *gorm.DB) *gorm.DB {return db.Select("id, name, approved_at, is_active")}).Preload("Branch", func(db *gorm.DB) *gorm.DB {return db.Select("id, name")185 unmodified lines186187188189190191192185 unmodified linesvar user models.Userif err := config.DB.Select("id, name, email, password, phone, role, company_id, branch_id, is_active, created_at").Preload("Company", func(db *gorm.DB) *gorm.DB {return db.Select("id, name, approved_at, is_active, enable_member, enable_voucher, enable_multi_branch, enable_multi_kasir")}).Preload("Branch", func(db *gorm.DB) *gorm.DB {return db.Select("id, name")
104 unmodified lines105106107108109110111104 unmodified linessearchQuery := c.Query("search")query := config.DB.Model(&models.Company{}).Select("id, name, bank_account_number, bank_name, address, email, phone, logo_url, is_active, fee_percentage, cash_fee_rules, qris_fee_percentage, qris_fee_fixed, qris_fee_min, qris_min_transaction, allow_qris_below_min, charge_fee_before_discount, wallet_balance, wallet_limit, approved_at, created_at")if searchQuery != "" {query = query.Where("name ILIKE ? OR email ILIKE ? OR phone ILIKE ? OR address ILIKE ?",104 unmodified lines105106107108109110111104 unmodified linessearchQuery := c.Query("search")query := config.DB.Model(&models.Company{}).Select("id, name, bank_account_number, bank_name, address, email, phone, logo_url, is_active, fee_percentage, cash_fee_rules, qris_fee_percentage, qris_fee_fixed, qris_fee_min, qris_min_transaction, allow_qris_below_min, charge_fee_before_discount, wallet_balance, wallet_limit, enable_member, enable_voucher, enable_multi_branch, enable_multi_kasir, approved_at, created_at")if searchQuery != "" {query = query.Where("name ILIKE ? OR email ILIKE ? OR phone ILIKE ? OR address ILIKE ?",
controllers/auth_controller.go+1-1
controllers/company_controller.go+1-1