Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
A AIS modular
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Metrics
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Matthew Chavez
  • AIS modular
  • Wiki
    • Hubstaff
  • Overview

Overview · Changes

Page history
Added wiki for hubstaff authored Jun 27, 2021 by matte0's avatar matte0
Hide whitespace changes
Inline Side-by-side
Showing with 56 additions and 0 deletions
+56 -0
  • Hubstaff/Overview.md Hubstaff/Overview.md +56 -0
  • No files found.
Hubstaff/Overview.md 0 → 100644
View page @ 0ae110c3
# Overview
Hubstaff is created to consolidate and compile all ais hubstaff users.
---
#### 📁 Hubstaff Related files:
THis is only the Hubstaff related files.
* Controllers/**Hubstaff.php** - Contains all the function and logic used in hubstaff_attendance_report.
* Pages/hubstaff/**hubstaff_attendance_report.php** - The page is used to consolidate all hubstaff AMTI users data.
* Pages/hubstaff/**hubstaff_management.php** - This page is currently not in production as it is complete. See Hubstaff wiki for this tech debt.
* application/cache/**HUBSTAFF_*** - All cached hubstaff files in inside the cache folder prefixed by `HUBSTAFF_` keywork.
--------
### Hubstaff Flow
#### Functions of the Hubstaff
- Daily of Hubstaff request (every 11:59pm)
```mermaid
graph LR;
ais[AIS Server]--request to hubstaff server-->a
a[1. Refresh access token and then cache]
a--returj response will be cache-->ais
ais--request to hubstaff server-->b[2. Cache Organization Members]
b--return response will be cached-->ais
ais--request hubstaff server-->c[3. Cache Users]
c--return response will be cached-->ais
```
The diagram above shows how the CRON job works. The code implementation below:
``` php
/**
* Update all the data cache of hubstaff
* This function is used for the CRON JOB in server
*/
public function hubstaffJobsDaily() {
$this->refreshAccessToken();
$this->cacheOrganizationMembers();
$this->cacheUsers();
}
```
----
#### POST API: cacheAttendanceShifts
This API is mostly used to get the hubstaff users current shift status. This is also used when the Payroll requests a certain range of date to be pulled from the API server.
> Please also note that this API is called every hour to prevent multiple API requests when loading the Hubstaff modle page in the AIS.
\ No newline at end of file
Clone repository
  • Hubstaff
    • Common Support and Issues
    • Overview
  • Warehouse Delivery Tracking (WDT API Only)
    • Common Support and Issues
    • Overview
    • Technical Debt
  • clearance
    • Common Support and Issues
    • Overview
    • Technical Debt
  • Home