56 lines
2.4 KiB
Markdown
56 lines
2.4 KiB
Markdown
# Scalar360 Attendance (Flutter) — Employee self-service
|
|
|
|
Per-employee mobile app for **Scalar360 People Operations**. Employees sign in with
|
|
their work email + PIN and:
|
|
- **Clock in / out** with GPS geo-fence (and optional selfie)
|
|
- View **leave** balances, apply for leave, track requests
|
|
- View **payslips**
|
|
- **Managers** additionally approve their team's leave and see the team's status
|
|
|
|
> Separate app — no relation to `fist_attendance`. Talks only to the Scalar360 API
|
|
> using a dedicated **employee** auth (`/api/v1/employee/auth` + `/api/v1/me`).
|
|
|
|
```
|
|
Employee app ──(employee JWT)──▶ https://api.scalar360.in
|
|
sign in POST /api/v1/employee/auth/login { identifier: email, pin }
|
|
clock in/out POST /api/v1/me/attendance/check-in|check-out { lat, lng, selfie? }
|
|
my leave GET/POST /api/v1/me/leave/...
|
|
payslips GET /api/v1/me/payslips
|
|
team (manager) GET /api/v1/me/team, /me/team/leave, approve|reject
|
|
```
|
|
|
|
## Setup (HR, once per employee)
|
|
In the Scalar360 web app: **People Operations → Employees → open employee → Account & access** →
|
|
set a **Login email**, choose **Role** (Employee/Manager) and **Reporting manager**, save,
|
|
then **Generate login PIN** and share it with the employee. Set the office geo-fence in
|
|
**People Operations → Settings → Attendance** (office latitude/longitude, radius, *Require geo-fence*).
|
|
|
|
## Build & run
|
|
```bash
|
|
cd scalar_attendance
|
|
flutter create . # generates android/ ios/ (keeps lib/ & pubspec.yaml)
|
|
flutter pub get
|
|
flutter run # use a real device for GPS + camera
|
|
```
|
|
|
|
### Permissions (add after `flutter create .`)
|
|
**Android** — `android/app/src/main/AndroidManifest.xml` inside `<manifest>`:
|
|
```xml
|
|
<uses-permission android:name="android.permission.INTERNET" />
|
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
|
<uses-permission android:name="android.permission.CAMERA" />
|
|
```
|
|
**iOS** — `ios/Runner/Info.plist`:
|
|
```xml
|
|
<key>NSLocationWhenInUseUsageDescription</key>
|
|
<string>Used to confirm you are at the office when you check in.</string>
|
|
<key>NSCameraUsageDescription</key>
|
|
<string>Used to capture a selfie when you check in.</string>
|
|
```
|
|
|
|
## Notes
|
|
- Requires an employee account with a login email + PIN (set by HR as above).
|
|
- Geo-fence is enforced by the server: if *Require geo-fence* is on, a check-in outside
|
|
the office radius is rejected with the distance.
|
|
- The full PDF payslip is available on the web portal; the app shows the breakdown.
|