Quản trị¶
Hệ thống quản trị của SaziHotel cung cấp đầy đủ công cụ để quản lý người dùng, nhân viên, tenant, khách sạn và cài đặt hệ thống.
Tổng quan¶
Module Quản trị là trung tâm điều khiển cho administrators:
- User Management: Quản lý tài khoản người dùng
- Staff Management: Quản lý nhân viên khách sạn
- Tenant Management: Quản lý các tenant trong hệ thống multi-tenant
- Hotel Management: Quản lý thông tin khách sạn
- Hotel Chains: Quản lý chuỗi khách sạn
- Settings: Cấu hình hệ thống và khách sạn
Các Chức năng Chính¶
1. Quản lý Người dùng (User Management)¶
Quản lý tài khoản và quyền hạn người dùng.
Tạo User¶
Thông tin cơ bản:
- Username
- Email (unique)
- Password
- Full name
- Phone number
- Avatar
Vai trò (Roles):
| Role | Level | Permissions |
|---|---|---|
| System Admin | System | Toàn quyền hệ thống, quản lý tất cả tenants |
| Platform Admin | Platform | Quản lý platform, onboarding tenants |
| Tenant Admin | Tenant | Quản lý tenant, tất cả hotels trong tenant |
| Hotel Admin | Hotel | Quản lý 1 hotel cụ thể |
| Manager | Hotel | Quản lý operations, không có quyền settings |
| Receptionist | Hotel | Check-in/out, bookings, guest services |
| Housekeeping | Hotel | Dọn phòng, maintenance |
| Staff | Hotel | Quyền hạn giới hạn |
Multi-Hotel Access:
- User có thể được assign vào multiple hotels
- Set default hotel
- Switch hotel trong app
Permissions¶
Hệ thống sử dụng Casbin cho RBAC (Role-Based Access Control).
Cấu trúc Permission:
Policy Examples:
# Hotel Admin có toàn quyền trong hotel
user:admin@hotel.com, hotel:456/*, *
# Receptionist chỉ có quyền bookings và guests
user:receptionist@hotel.com, hotel:456/bookings, read,write
user:receptionist@hotel.com, hotel:456/guests, read,write
# Housekeeping chỉ có quyền housekeeping
user:housekeeper@hotel.com, hotel:456/housekeeping, read,write
Tính năng:
- Assign roles cho user
- Custom permissions cho từng user
- Permission inheritance
- Test permissions
- Audit log cho permission changes
Xem chi tiết Quản lý người dùng
2. Quản lý Nhân viên (Staff Management)¶
Quản lý thông tin nhân viên khách sạn.
Staff Information¶
Personal Info:
- Full name
- Employee ID
- Date of birth
- ID card/Passport
- Phone, Email
- Address
- Emergency contact
Employment Info:
- Department (Reception, Housekeeping, F&B, ...)
- Position/Title
- Manager/Supervisor
- Hire date
- Employment type (Full-time, Part-time, Contract)
- Salary
- Work schedule
Documents:
- Employment contract
- ID card scan
- Certificates
- Training records
- Performance reviews
Staff Scheduling¶
Shift Management:
- Create shifts (Morning, Afternoon, Night)
- Assign staff to shifts
- Swap shifts
- Request time off
- Overtime tracking
Work Hours:
- Clock in/out
- Break time
- Total hours worked
- Attendance tracking
- Leave balance
Performance Management¶
KPIs:
- Guest satisfaction scores
- Tasks completed
- Average service time
- Upsell revenue
- Attendance rate
Reviews:
- Quarterly performance reviews
- Manager feedback
- Goal setting
- Training needs
Xem chi tiết Quản lý nhân viên
3. Quản lý Tenant¶
Quản lý các tenant trong hệ thống multi-tenant.
Tenant Structure¶
Hierarchy:
Tenant Info:
- Tenant name
- Organization type (Single hotel, Hotel chain, Management company)
- Contact person
- Email, Phone
- Address
- Tax ID
- Subscription plan
Subscription Plans¶
| Plan | Price | Features |
|---|---|---|
| Starter | $49/month | 1 hotel, 10 rooms, Basic features |
| Professional | $99/month | 1 hotel, 50 rooms, Advanced features |
| Business | $199/month | 5 hotels, 200 rooms, All features |
| Enterprise | Custom | Unlimited, Custom features, Dedicated support |
Features by Plan:
- Number of hotels
- Number of rooms
- Number of users
- API access
- Channel connections
- Support level
- Custom branding
Tenant Isolation¶
Data Isolation:
- Mỗi tenant có database schema riêng
- Không thể access data của tenant khác
- Multi-level isolation (tenant/hotel/user)
Security:
- Row-level security (RLS)
- Encrypted data at rest
- Audit logs
- Compliance (GDPR, PCI-DSS)
4. Quản lý Khách sạn (Hotel Management)¶
Quản lý thông tin và cấu hình khách sạn.
Hotel Profile¶
Basic Information:
- Hotel name
- Brand (nếu thuộc chain)
- Star rating (1-5 stars)
- Hotel type (Resort, Business hotel, Boutique, ...)
- Description
- Photos
Location:
- Address
- City, State, Country
- Latitude, Longitude
- Timezone
- Map integration
Contact:
- Phone
- Website
- Social media links
- Booking website
Facilities & Amenities:
- Total rooms
- Room types
- Restaurant
- Bar/Lounge
- Spa
- Gym
- Pool
- Parking
- WiFi
- Business center
- Meeting rooms
Hotel Configuration¶
Check-in/out Settings:
- Check-in time (default: 14:00)
- Check-out time (default: 12:00)
- Early check-in policy
- Late check-out policy
- Express check-in/out
Booking Settings:
- Minimum stay
- Maximum stay
- Advance booking (how many days in advance)
- Last-minute booking (how close to arrival)
- Cancellation policy
- No-show policy
Payment Settings:
- Accepted payment methods
- Deposit requirement
- Pre-payment options
- Currency
- Tax rate
Guest Policies:
- Pet policy
- Smoking policy
- Children policy
- Age restrictions
- Party policy
Xem chi tiết Quản lý khách sạn
5. Chuỗi Khách sạn (Hotel Chains)¶
Quản lý chuỗi khách sạn với nhiều properties.
Chain Management¶
Chain Structure:
Hotel Chain
├── Brand Standards
├── Central Reservations
├── Loyalty Program
└── Hotels
├── Hotel A
├── Hotel B
└── Hotel C
Chain Settings:
- Chain name
- Brand guidelines
- Logo, Colors, Fonts
- Central phone/email
- Corporate office location
Multi-Property Features:
- Central reservation system (CRS)
- Cross-property booking
- Loyalty program across properties
- Central reporting
- Bulk operations (pricing, inventory)
Brand Standards:
- Room naming conventions
- Service standards
- Quality control checklists
- Brand compliance monitoring
6. Cài đặt Hệ thống (Settings)¶
Cấu hình hệ thống và khách sạn.
General Settings¶
Company Info:
- Company name
- Legal name
- Tax ID
- Address
- Logo
Localization:
- Language (Vietnamese, English, ...)
- Timezone
- Date format
- Time format
- Currency
Notification Settings:
- Email notifications (on/off)
- SMS notifications (on/off)
- Push notifications (on/off)
- Notification recipients
Integration Settings¶
OTA Connections:
- Booking.com credentials
- Agoda credentials
- Expedia credentials
- Airbnb credentials
- Connection status
Payment Gateways:
- VNPay
- Momo
- Stripe
- PayPal
- Configuration per gateway
Email Service:
- SMTP settings
- Email templates
- From name/email
- Test email
SMS Service:
- SMS provider (Twilio, AWS SNS, ...)
- API credentials
- Sender name
- Test SMS
Security Settings¶
Password Policy:
- Minimum length
- Require uppercase
- Require numbers
- Require special characters
- Password expiry (90 days)
Session Settings:
- Session timeout (30 minutes)
- Remember me duration
- Concurrent sessions allowed
Two-Factor Authentication:
- 2FA required for admins
- 2FA methods (SMS, Email, Authenticator app)
API Security:
- API keys
- Rate limiting
- IP whitelist
- Webhook secrets
Xem chi tiết Cài đặt khách sạn
User Lifecycle¶
graph TB
A[Create User] --> B[Assign Role]
B --> C[Set Permissions]
C --> D[Active User]
D --> E{Status}
E -->|Active| F[Can Login]
E -->|Suspended| G[Cannot Login]
E -->|Deactivated| H[Archived]
F --> I[Password Expiry?]
I -->|Yes| J[Force Reset]
I -->|No| D
Security Best Practices¶
Password Management¶
Strong passwords
- Enforce strong password policy
- Minimum 8 characters
- Mix of uppercase, lowercase, numbers, special chars
- Change password every 90 days
- No password reuse (last 5 passwords)
Access Control¶
Principle of least privilege
- Chỉ cấp quyền cần thiết
- Review permissions định kỳ
- Remove access khi nhân viên nghỉ việc
- Monitor suspicious activities
Two-Factor Authentication¶
Enable 2FA
- Bắt buộc 2FA cho admin accounts
- Khuyến khích 2FA cho tất cả users
- Sử dụng authenticator app (Google Authenticator, Authy)
- Backup codes cho trường hợp mất device
Audit Logs¶
Track all actions
- Log tất cả user actions
- Log permission changes
- Log data modifications
- Review logs định kỳ
- Alert on suspicious activities
Phím tắt¶
| Phím tắt | Chức năng |
|---|---|
Ctrl + U |
Danh sách users |
Ctrl + Shift + U |
Tạo user mới |
Ctrl + H |
Quản lý hotels |
Ctrl + , |
Mở Settings |
R |
Refresh danh sách |
Liên kết Nhanh¶
- Quản lý người dùng - Users & permissions
- Quản lý nhân viên - Staff & scheduling
- Quản lý Tenant - Tenants & subscriptions
- Quản lý khách sạn - Hotel configuration
- Chuỗi khách sạn - Multi-property management
- Cài đặt khách sạn - System settings
Câu hỏi Thường gặp¶
Làm sao để tạo một user mới?
- Vào Quản trị > Người dùng
- Click New User
- Điền thông tin:
- Email, Username, Password
- Full name, Phone
- Chọn Role (Admin, Manager, Receptionist, ...)
- Assign vào Hotels
- Click Create User
- User sẽ nhận email với login info
Làm sao để thay đổi permissions của user?
- Vào Quản trị > Người dùng
- Tìm và click vào user
- Tab Permissions
- Thay đổi Role hoặc add custom permissions
- Click Save
- Changes có hiệu lực ngay lập tức
Làm sao để setup một tenant mới?
- System Admin vào Quản trị > Tenants
- Click New Tenant
- Điền thông tin:
- Tenant name
- Organization type
- Contact info
- Chọn subscription plan
- Click Create Tenant
- Hệ thống sẽ:
- Tạo database schema riêng
- Setup default data
- Tạo admin account cho tenant
- Gửi onboarding email cho tenant admin
Làm sao để add thêm hotel vào tenant?
- Tenant Admin vào Quản trị > Khách sạn
- Click New Hotel
- Điền thông tin hotel (name, address, ...)
- Setup facilities & amenities
- Configure settings (check-in/out times, policies)
- Click Create Hotel
- Add rooms, staff, rates
Làm sao để suspend một user?
- Vào Quản trị > Người dùng
- Tìm user cần suspend
- Click More > Suspend
- Nhập lý do suspend
- Click Confirm
- User sẽ không thể login ngay lập tức
Làm sao để enable 2FA cho account?
- Vào Profile > Security
- Click Enable Two-Factor Authentication
- Scan QR code với authenticator app (Google Authenticator)
- Nhập 6-digit code để verify
- Save backup codes
- Click Enable
- Lần login tiếp theo sẽ yêu cầu 2FA code