feat(hr): add employees from the dashboard
CI/CD / CI · API (dotnet build + test) (push) Successful in 1m10s
CI/CD / CI · Admin API (dotnet build) (push) Successful in 1m40s
CI/CD / CI · Dashboard (tsc) (push) Successful in 1m5s
CI/CD / CI · Admin Web (tsc) (push) Successful in 1m32s
CI/CD / CI · Website (tsc) (push) Successful in 45s
CI/CD / CI · Koja (tsc) (push) Successful in 49s
CI/CD / Deploy · all services (push) Successful in 9m24s
CI/CD / CI · API (dotnet build + test) (push) Successful in 1m10s
CI/CD / CI · Admin API (dotnet build) (push) Successful in 1m40s
CI/CD / CI · Dashboard (tsc) (push) Successful in 1m5s
CI/CD / CI · Admin Web (tsc) (push) Successful in 1m32s
CI/CD / CI · Website (tsc) (push) Successful in 45s
CI/CD / CI · Koja (tsc) (push) Successful in 49s
CI/CD / Deploy · all services (push) Successful in 9m24s
Previously the only Employee records were the Owner (created at café signup) and
one Manager per branch — there was no way to add a waiter/cashier/chef. Adds it.
Backend:
- POST /api/cafes/{cafeId}/employees (HrController). Owner/Manager only; creating a
Manager requires Owner; Owner cannot be created here. Validates name/phone/role,
enforces one-employee-per-phone, validates branch belongs to the café, and can
optionally set username/password login in the same step (same hashing + uniqueness
as the credentials endpoint). Returns EmployeeSummaryDto.
Dashboard:
- New "Team" tab on the HR screen (now the default): employee roster (name, role,
phone, base salary) + an "Add employee" button (owner/manager) opening an inline
form — name, phone, role, optional branch, optional base salary, optional login.
- Role labels + all form strings in fa/en/ar.
86 API tests pass; dashboard tsc + build clean.
This commit is contained in:
@@ -412,7 +412,8 @@
|
||||
"leave": "الإجازة",
|
||||
"payroll": "الرواتب",
|
||||
"access": "صلاحيات الفروع",
|
||||
"credentials": "بيانات الدخول"
|
||||
"credentials": "بيانات الدخول",
|
||||
"team": "الموظفون"
|
||||
},
|
||||
"myAttendance": "حضوري",
|
||||
"clockIn": "تسجيل دخول",
|
||||
@@ -437,6 +438,33 @@
|
||||
"saved": "تم حفظ بيانات الدخول.",
|
||||
"removed": "تم حذف بيانات الدخول.",
|
||||
"usernameTaken": "اسم المستخدم هذا مستخدم بالفعل."
|
||||
},
|
||||
"addEmployee": "إضافة موظف",
|
||||
"noEmployees": "لا يوجد موظفون بعد.",
|
||||
"employeeCreated": "تمت إضافة الموظف",
|
||||
"save": "حفظ",
|
||||
"cancel": "إلغاء",
|
||||
"fields": {
|
||||
"name": "الاسم",
|
||||
"phone": "الجوال",
|
||||
"role": "الدور",
|
||||
"branch": "الفرع",
|
||||
"branchOptional": "اختياري",
|
||||
"noBranch": "بدون فرع",
|
||||
"baseSalary": "الراتب الأساسي (تومان)",
|
||||
"optional": "اختياري",
|
||||
"enableLogin": "إنشاء اسم مستخدم وكلمة مرور",
|
||||
"username": "اسم المستخدم",
|
||||
"password": "كلمة المرور",
|
||||
"passwordHint": "8 أحرف على الأقل"
|
||||
},
|
||||
"roles": {
|
||||
"Owner": "المالك",
|
||||
"Manager": "مدير",
|
||||
"Cashier": "أمين الصندوق",
|
||||
"Waiter": "نادل",
|
||||
"Chef": "طاهٍ",
|
||||
"Delivery": "موصّل"
|
||||
}
|
||||
},
|
||||
"reviews": {
|
||||
|
||||
@@ -431,7 +431,8 @@
|
||||
"leave": "Leave",
|
||||
"payroll": "Payroll",
|
||||
"access": "Branch access",
|
||||
"credentials": "Login credentials"
|
||||
"credentials": "Login credentials",
|
||||
"team": "Team"
|
||||
},
|
||||
"myAttendance": "My attendance",
|
||||
"clockIn": "Clock in",
|
||||
@@ -456,6 +457,33 @@
|
||||
"saved": "Credentials saved.",
|
||||
"removed": "Credentials removed.",
|
||||
"usernameTaken": "This username is already taken."
|
||||
},
|
||||
"addEmployee": "Add employee",
|
||||
"noEmployees": "No employees yet.",
|
||||
"employeeCreated": "Employee added",
|
||||
"save": "Save",
|
||||
"cancel": "Cancel",
|
||||
"fields": {
|
||||
"name": "Name",
|
||||
"phone": "Mobile",
|
||||
"role": "Role",
|
||||
"branch": "Branch",
|
||||
"branchOptional": "optional",
|
||||
"noBranch": "No branch",
|
||||
"baseSalary": "Base salary (Toman)",
|
||||
"optional": "optional",
|
||||
"enableLogin": "Create username & password",
|
||||
"username": "Username",
|
||||
"password": "Password",
|
||||
"passwordHint": "At least 8 characters"
|
||||
},
|
||||
"roles": {
|
||||
"Owner": "Owner",
|
||||
"Manager": "Manager",
|
||||
"Cashier": "Cashier",
|
||||
"Waiter": "Waiter",
|
||||
"Chef": "Chef",
|
||||
"Delivery": "Delivery"
|
||||
}
|
||||
},
|
||||
"reviews": {
|
||||
|
||||
@@ -431,7 +431,8 @@
|
||||
"leave": "مرخصی",
|
||||
"payroll": "حقوق",
|
||||
"access": "دسترسی شعب",
|
||||
"credentials": "رمز ورود"
|
||||
"credentials": "رمز ورود",
|
||||
"team": "کارکنان"
|
||||
},
|
||||
"myAttendance": "حضور من",
|
||||
"clockIn": "ورود",
|
||||
@@ -456,6 +457,33 @@
|
||||
"saved": "رمز ورود ذخیره شد.",
|
||||
"removed": "رمز ورود حذف شد.",
|
||||
"usernameTaken": "این نام کاربری قبلاً استفاده شده است."
|
||||
},
|
||||
"addEmployee": "افزودن کارمند",
|
||||
"noEmployees": "هنوز کارمندی ثبت نشده است.",
|
||||
"employeeCreated": "کارمند اضافه شد",
|
||||
"save": "ذخیره",
|
||||
"cancel": "انصراف",
|
||||
"fields": {
|
||||
"name": "نام",
|
||||
"phone": "موبایل",
|
||||
"role": "نقش",
|
||||
"branch": "شعبه",
|
||||
"branchOptional": "اختیاری",
|
||||
"noBranch": "بدون شعبه",
|
||||
"baseSalary": "حقوق پایه (تومان)",
|
||||
"optional": "اختیاری",
|
||||
"enableLogin": "ایجاد نام کاربری و رمز ورود",
|
||||
"username": "نام کاربری",
|
||||
"password": "رمز عبور",
|
||||
"passwordHint": "حداقل ۸ کاراکتر"
|
||||
},
|
||||
"roles": {
|
||||
"Owner": "مالک",
|
||||
"Manager": "مدیر",
|
||||
"Cashier": "صندوقدار",
|
||||
"Waiter": "گارسون",
|
||||
"Chef": "آشپز",
|
||||
"Delivery": "پیک"
|
||||
}
|
||||
},
|
||||
"reviews": {
|
||||
|
||||
Reference in New Issue
Block a user