Module Presentation
• Attendance Module
• Presented by: Prakash
Module Overview
• Attendance Module - Purpose:
• Track and manage employee attendance
records effectively.
Key Components
[Link]
- Defines API endpoints
- The handler functions for the routes that contain the business logic is
written in the [Link] file which gets imported into the [Link].
[Link]
- Core business logic
[Link]
- Database interaction logic (SQLAlchemy)
- Contains schema definitions
[Link]
- Asynchronous task functions
- Executed by Celery.
Data Flow Summary
• Frontend sends request to API ([Link])
• [Link] calls handlers in [Link]
• [Link] processes logic, calls [Link] functions
• Calls [Link] functions via Celery if needed
• Response returned to frontend
AI Payslip Query - Overview
• When a user generates a payslip, they can ask
AI questions about it.
• This enhances user experience by offering
instant, intelligent support.
API Flow: /payslip/aai/query
• Frontend triggers API: /payslip/ai/query
• Payload includes:
- user_message
- emp_payrun_id
• Middleware enriches request with company
context
Backend Processing
• Backend receives request
• Prompt is constructed for the AI model using
context
• Reads payroll_calculation data if needed
• Invokes AI model and gets response
• Sends response back to frontend
Frontend Interaction
• - Displays AI response to the user in UI
• - Allows follow-up questions