fix(imports): small import fix to archival.module.ts
This commit is contained in:
parent
09a213d5dd
commit
106454bede
|
|
@ -29,6 +29,328 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/archives/employees": {
|
||||||
|
"get": {
|
||||||
|
"operationId": "EmployeesArchiveController_findOneArchived",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"required": true,
|
||||||
|
"in": "path",
|
||||||
|
"schema": {
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Archived employee found"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"summary": "Fetch employee in archives with its Id",
|
||||||
|
"tags": [
|
||||||
|
"Employee Archives"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/archives/expenses": {
|
||||||
|
"get": {
|
||||||
|
"operationId": "ExpensesArchiveController_findOneArchived",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"required": true,
|
||||||
|
"in": "path",
|
||||||
|
"schema": {
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Archived expense found"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"summary": "Fetch expense in archives with its Id",
|
||||||
|
"tags": [
|
||||||
|
"Expense Archives"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/archives/leaveRequests": {
|
||||||
|
"get": {
|
||||||
|
"operationId": "LeaveRequestsArchiveController_findOneArchived",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"required": true,
|
||||||
|
"in": "path",
|
||||||
|
"schema": {
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Archived leaveRequest found"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"summary": "Fetch leaveRequest in archives with its Id",
|
||||||
|
"tags": [
|
||||||
|
"LeaveRequests Archives"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/archives/shifts": {
|
||||||
|
"get": {
|
||||||
|
"operationId": "ShiftsArchiveController_findOneArchived",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"required": true,
|
||||||
|
"in": "path",
|
||||||
|
"schema": {
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Archived shift found"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"summary": "Fetch shift in archives with its Id",
|
||||||
|
"tags": [
|
||||||
|
"Shift Archives"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/archives/timesheets": {
|
||||||
|
"get": {
|
||||||
|
"operationId": "TimesheetsArchiveController_findOneArchived",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"required": true,
|
||||||
|
"in": "path",
|
||||||
|
"schema": {
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Archived timesheet found"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"summary": "Fetch timesheet in archives with its Id",
|
||||||
|
"tags": [
|
||||||
|
"Timesheet Archives"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/employees": {
|
||||||
|
"post": {
|
||||||
|
"operationId": "EmployeesController_create",
|
||||||
|
"parameters": [],
|
||||||
|
"requestBody": {
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/CreateEmployeeDto"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"201": {
|
||||||
|
"description": "Employee created",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/EmployeeEntity"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Incomplete task or invalid data"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"summary": "Create employee",
|
||||||
|
"tags": [
|
||||||
|
"Employees"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"get": {
|
||||||
|
"operationId": "EmployeesController_findAll",
|
||||||
|
"parameters": [],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "List of employees found",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/EmployeeEntity"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "List of employees not found"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"summary": "Find all employees",
|
||||||
|
"tags": [
|
||||||
|
"Employees"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/employees/{id}": {
|
||||||
|
"get": {
|
||||||
|
"operationId": "EmployeesController_findOne",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"required": true,
|
||||||
|
"in": "path",
|
||||||
|
"schema": {
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Employee found",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/EmployeeEntity"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Employee not found"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"summary": "Find employee",
|
||||||
|
"tags": [
|
||||||
|
"Employees"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"delete": {
|
||||||
|
"operationId": "EmployeesController_remove",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"required": true,
|
||||||
|
"in": "path",
|
||||||
|
"description": "Identifier of the employee to delete",
|
||||||
|
"schema": {
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"204": {
|
||||||
|
"description": "Employee deleted"
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"description": "Employee not found"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"summary": "Delete employee",
|
||||||
|
"tags": [
|
||||||
|
"Employees"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"patch": {
|
||||||
|
"operationId": "EmployeesController_updateOrArchiveOrRestore",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"required": true,
|
||||||
|
"in": "path",
|
||||||
|
"description": "Identifier of the employee",
|
||||||
|
"schema": {
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/UpdateEmployeeDto"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Employee updated or restored",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/EmployeeEntity"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"202": {
|
||||||
|
"description": "Employee archived successfully",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/EmployeeEntity"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"description": "Employee not found in active or archive"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"access-token": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"summary": "Update, archive or restore an employee",
|
||||||
|
"tags": [
|
||||||
|
"Employees"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"/timesheets": {
|
"/timesheets": {
|
||||||
"post": {
|
"post": {
|
||||||
"operationId": "TimesheetsController_create",
|
"operationId": "TimesheetsController_create",
|
||||||
|
|
@ -1193,208 +1515,6 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/employees": {
|
|
||||||
"post": {
|
|
||||||
"operationId": "EmployeesController_create",
|
|
||||||
"parameters": [],
|
|
||||||
"requestBody": {
|
|
||||||
"required": true,
|
|
||||||
"content": {
|
|
||||||
"application/json": {
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/components/schemas/CreateEmployeeDto"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"responses": {
|
|
||||||
"201": {
|
|
||||||
"description": "Employee created",
|
|
||||||
"content": {
|
|
||||||
"application/json": {
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/components/schemas/EmployeeEntity"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"400": {
|
|
||||||
"description": "Incomplete task or invalid data"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"security": [
|
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"summary": "Create employee",
|
|
||||||
"tags": [
|
|
||||||
"Employees"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"get": {
|
|
||||||
"operationId": "EmployeesController_findAll",
|
|
||||||
"parameters": [],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "List of employees found",
|
|
||||||
"content": {
|
|
||||||
"application/json": {
|
|
||||||
"schema": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"$ref": "#/components/schemas/EmployeeEntity"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"400": {
|
|
||||||
"description": "List of employees not found"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"security": [
|
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"summary": "Find all employees",
|
|
||||||
"tags": [
|
|
||||||
"Employees"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/employees/{id}": {
|
|
||||||
"get": {
|
|
||||||
"operationId": "EmployeesController_findOne",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"name": "id",
|
|
||||||
"required": true,
|
|
||||||
"in": "path",
|
|
||||||
"schema": {
|
|
||||||
"type": "number"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "Employee found",
|
|
||||||
"content": {
|
|
||||||
"application/json": {
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/components/schemas/EmployeeEntity"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"400": {
|
|
||||||
"description": "Employee not found"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"security": [
|
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"summary": "Find employee",
|
|
||||||
"tags": [
|
|
||||||
"Employees"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"delete": {
|
|
||||||
"operationId": "EmployeesController_remove",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"name": "id",
|
|
||||||
"required": true,
|
|
||||||
"in": "path",
|
|
||||||
"description": "Identifier of the employee to delete",
|
|
||||||
"schema": {
|
|
||||||
"type": "number"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"204": {
|
|
||||||
"description": "Employee deleted"
|
|
||||||
},
|
|
||||||
"404": {
|
|
||||||
"description": "Employee not found"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"security": [
|
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"summary": "Delete employee",
|
|
||||||
"tags": [
|
|
||||||
"Employees"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"patch": {
|
|
||||||
"operationId": "EmployeesController_updateOrArchiveOrRestore",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"name": "id",
|
|
||||||
"required": true,
|
|
||||||
"in": "path",
|
|
||||||
"description": "Identifier of the employee",
|
|
||||||
"schema": {
|
|
||||||
"type": "number"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"requestBody": {
|
|
||||||
"required": true,
|
|
||||||
"content": {
|
|
||||||
"application/json": {
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/components/schemas/UpdateEmployeeDto"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "Employee updated or restored",
|
|
||||||
"content": {
|
|
||||||
"application/json": {
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/components/schemas/EmployeeEntity"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"202": {
|
|
||||||
"description": "Employee archived successfully",
|
|
||||||
"content": {
|
|
||||||
"application/json": {
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/components/schemas/EmployeeEntity"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"404": {
|
|
||||||
"description": "Employee not found in active or archive"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"security": [
|
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"access-token": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"summary": "Update, archive or restore an employee",
|
|
||||||
"tags": [
|
|
||||||
"Employees"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/expense-codes": {
|
"/expense-codes": {
|
||||||
"post": {
|
"post": {
|
||||||
"operationId": "ExpenseCodesController_create",
|
"operationId": "ExpenseCodesController_create",
|
||||||
|
|
@ -1999,6 +2119,167 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"schemas": {
|
"schemas": {
|
||||||
|
"CreateEmployeeDto": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"first_name": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "Frodo",
|
||||||
|
"description": "Employee`s first name"
|
||||||
|
},
|
||||||
|
"last_name": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "Baggins",
|
||||||
|
"description": "Employee`s last name"
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "i_cant_do_this_sam@targointernet.com",
|
||||||
|
"description": "Employee`s email"
|
||||||
|
},
|
||||||
|
"phone_number": {
|
||||||
|
"type": "number",
|
||||||
|
"example": "82538437464",
|
||||||
|
"description": "Employee`s phone number"
|
||||||
|
},
|
||||||
|
"residence": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "1 Bagshot Row, Hobbiton, The Shire, Middle-earth",
|
||||||
|
"description": "Employee`s residence"
|
||||||
|
},
|
||||||
|
"external_payroll_id": {
|
||||||
|
"type": "number",
|
||||||
|
"example": "BagginsF7464",
|
||||||
|
"description": "Employee`s payroll id"
|
||||||
|
},
|
||||||
|
"company_code": {
|
||||||
|
"type": "number",
|
||||||
|
"example": "335567447",
|
||||||
|
"description": "Employee`s company code"
|
||||||
|
},
|
||||||
|
"first_work_day": {
|
||||||
|
"format": "date-time",
|
||||||
|
"type": "string",
|
||||||
|
"example": "23/09/3018",
|
||||||
|
"description": "Employee`s first working day"
|
||||||
|
},
|
||||||
|
"last_work_day": {
|
||||||
|
"format": "date-time",
|
||||||
|
"type": "string",
|
||||||
|
"example": "25/03/3019",
|
||||||
|
"description": "Employee`s last working day"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"first_name",
|
||||||
|
"last_name",
|
||||||
|
"email",
|
||||||
|
"phone_number",
|
||||||
|
"external_payroll_id",
|
||||||
|
"company_code",
|
||||||
|
"first_work_day"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"EmployeeEntity": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "number",
|
||||||
|
"example": 1,
|
||||||
|
"description": "Unique ID of an employee(primary-key, auto-incremented)"
|
||||||
|
},
|
||||||
|
"user_id": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "0e6e2e1f-b157-4c7c-ae3f-999b3e4f914d",
|
||||||
|
"description": "UUID of the user linked to that employee"
|
||||||
|
},
|
||||||
|
"external_payroll_id": {
|
||||||
|
"type": "number",
|
||||||
|
"example": 7464,
|
||||||
|
"description": "external ID for the pay system"
|
||||||
|
},
|
||||||
|
"company_code": {
|
||||||
|
"type": "number",
|
||||||
|
"example": 335567447,
|
||||||
|
"description": "company code"
|
||||||
|
},
|
||||||
|
"first_work_day": {
|
||||||
|
"format": "date-time",
|
||||||
|
"type": "string",
|
||||||
|
"example": "3018-09-23T00:00:00.000Z",
|
||||||
|
"description": "Employee first day at work"
|
||||||
|
},
|
||||||
|
"last_work_day": {
|
||||||
|
"format": "date-time",
|
||||||
|
"type": "string",
|
||||||
|
"example": "3019-03-25T00:00:00.000Z",
|
||||||
|
"description": "Employee last day at work"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"id",
|
||||||
|
"user_id",
|
||||||
|
"external_payroll_id",
|
||||||
|
"company_code",
|
||||||
|
"first_work_day"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"UpdateEmployeeDto": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"first_name": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "Frodo",
|
||||||
|
"description": "Employee`s first name"
|
||||||
|
},
|
||||||
|
"last_name": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "Baggins",
|
||||||
|
"description": "Employee`s last name"
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "i_cant_do_this_sam@targointernet.com",
|
||||||
|
"description": "Employee`s email"
|
||||||
|
},
|
||||||
|
"phone_number": {
|
||||||
|
"type": "number",
|
||||||
|
"example": "82538437464",
|
||||||
|
"description": "Employee`s phone number"
|
||||||
|
},
|
||||||
|
"residence": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "1 Bagshot Row, Hobbiton, The Shire, Middle-earth",
|
||||||
|
"description": "Employee`s residence"
|
||||||
|
},
|
||||||
|
"external_payroll_id": {
|
||||||
|
"type": "number",
|
||||||
|
"example": "BagginsF7464",
|
||||||
|
"description": "Employee`s payroll id"
|
||||||
|
},
|
||||||
|
"company_code": {
|
||||||
|
"type": "number",
|
||||||
|
"example": "335567447",
|
||||||
|
"description": "Employee`s company code"
|
||||||
|
},
|
||||||
|
"first_work_day": {
|
||||||
|
"format": "date-time",
|
||||||
|
"type": "string",
|
||||||
|
"example": "23/09/3018",
|
||||||
|
"description": "New hire date or undefined"
|
||||||
|
},
|
||||||
|
"last_work_day": {
|
||||||
|
"format": "date-time",
|
||||||
|
"type": "string",
|
||||||
|
"example": "25/03/3019",
|
||||||
|
"description": "Termination date (null to restore)"
|
||||||
|
},
|
||||||
|
"supervisor_id": {
|
||||||
|
"type": "number",
|
||||||
|
"description": "Supervisor ID"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"CreateTimesheetDto": {
|
"CreateTimesheetDto": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|
@ -2770,167 +3051,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"CreateEmployeeDto": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"first_name": {
|
|
||||||
"type": "string",
|
|
||||||
"example": "Frodo",
|
|
||||||
"description": "Employee`s first name"
|
|
||||||
},
|
|
||||||
"last_name": {
|
|
||||||
"type": "string",
|
|
||||||
"example": "Baggins",
|
|
||||||
"description": "Employee`s last name"
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"type": "string",
|
|
||||||
"example": "i_cant_do_this_sam@targointernet.com",
|
|
||||||
"description": "Employee`s email"
|
|
||||||
},
|
|
||||||
"phone_number": {
|
|
||||||
"type": "number",
|
|
||||||
"example": "82538437464",
|
|
||||||
"description": "Employee`s phone number"
|
|
||||||
},
|
|
||||||
"residence": {
|
|
||||||
"type": "string",
|
|
||||||
"example": "1 Bagshot Row, Hobbiton, The Shire, Middle-earth",
|
|
||||||
"description": "Employee`s residence"
|
|
||||||
},
|
|
||||||
"external_payroll_id": {
|
|
||||||
"type": "number",
|
|
||||||
"example": "BagginsF7464",
|
|
||||||
"description": "Employee`s payroll id"
|
|
||||||
},
|
|
||||||
"company_code": {
|
|
||||||
"type": "number",
|
|
||||||
"example": "335567447",
|
|
||||||
"description": "Employee`s company code"
|
|
||||||
},
|
|
||||||
"first_work_day": {
|
|
||||||
"format": "date-time",
|
|
||||||
"type": "string",
|
|
||||||
"example": "23/09/3018",
|
|
||||||
"description": "Employee`s first working day"
|
|
||||||
},
|
|
||||||
"last_work_day": {
|
|
||||||
"format": "date-time",
|
|
||||||
"type": "string",
|
|
||||||
"example": "25/03/3019",
|
|
||||||
"description": "Employee`s last working day"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"required": [
|
|
||||||
"first_name",
|
|
||||||
"last_name",
|
|
||||||
"email",
|
|
||||||
"phone_number",
|
|
||||||
"external_payroll_id",
|
|
||||||
"company_code",
|
|
||||||
"first_work_day"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"EmployeeEntity": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"id": {
|
|
||||||
"type": "number",
|
|
||||||
"example": 1,
|
|
||||||
"description": "Unique ID of an employee(primary-key, auto-incremented)"
|
|
||||||
},
|
|
||||||
"user_id": {
|
|
||||||
"type": "string",
|
|
||||||
"example": "0e6e2e1f-b157-4c7c-ae3f-999b3e4f914d",
|
|
||||||
"description": "UUID of the user linked to that employee"
|
|
||||||
},
|
|
||||||
"external_payroll_id": {
|
|
||||||
"type": "number",
|
|
||||||
"example": 7464,
|
|
||||||
"description": "external ID for the pay system"
|
|
||||||
},
|
|
||||||
"company_code": {
|
|
||||||
"type": "number",
|
|
||||||
"example": 335567447,
|
|
||||||
"description": "company code"
|
|
||||||
},
|
|
||||||
"first_work_day": {
|
|
||||||
"format": "date-time",
|
|
||||||
"type": "string",
|
|
||||||
"example": "3018-09-23T00:00:00.000Z",
|
|
||||||
"description": "Employee first day at work"
|
|
||||||
},
|
|
||||||
"last_work_day": {
|
|
||||||
"format": "date-time",
|
|
||||||
"type": "string",
|
|
||||||
"example": "3019-03-25T00:00:00.000Z",
|
|
||||||
"description": "Employee last day at work"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"required": [
|
|
||||||
"id",
|
|
||||||
"user_id",
|
|
||||||
"external_payroll_id",
|
|
||||||
"company_code",
|
|
||||||
"first_work_day"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"UpdateEmployeeDto": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"first_name": {
|
|
||||||
"type": "string",
|
|
||||||
"example": "Frodo",
|
|
||||||
"description": "Employee`s first name"
|
|
||||||
},
|
|
||||||
"last_name": {
|
|
||||||
"type": "string",
|
|
||||||
"example": "Baggins",
|
|
||||||
"description": "Employee`s last name"
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"type": "string",
|
|
||||||
"example": "i_cant_do_this_sam@targointernet.com",
|
|
||||||
"description": "Employee`s email"
|
|
||||||
},
|
|
||||||
"phone_number": {
|
|
||||||
"type": "number",
|
|
||||||
"example": "82538437464",
|
|
||||||
"description": "Employee`s phone number"
|
|
||||||
},
|
|
||||||
"residence": {
|
|
||||||
"type": "string",
|
|
||||||
"example": "1 Bagshot Row, Hobbiton, The Shire, Middle-earth",
|
|
||||||
"description": "Employee`s residence"
|
|
||||||
},
|
|
||||||
"external_payroll_id": {
|
|
||||||
"type": "number",
|
|
||||||
"example": "BagginsF7464",
|
|
||||||
"description": "Employee`s payroll id"
|
|
||||||
},
|
|
||||||
"company_code": {
|
|
||||||
"type": "number",
|
|
||||||
"example": "335567447",
|
|
||||||
"description": "Employee`s company code"
|
|
||||||
},
|
|
||||||
"first_work_day": {
|
|
||||||
"format": "date-time",
|
|
||||||
"type": "string",
|
|
||||||
"example": "23/09/3018",
|
|
||||||
"description": "New hire date or undefined"
|
|
||||||
},
|
|
||||||
"last_work_day": {
|
|
||||||
"format": "date-time",
|
|
||||||
"type": "string",
|
|
||||||
"example": "25/03/3019",
|
|
||||||
"description": "Termination date (null to restore)"
|
|
||||||
},
|
|
||||||
"supervisor_id": {
|
|
||||||
"type": "number",
|
|
||||||
"description": "Supervisor ID"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"CreateExpenseCodeDto": {
|
"CreateExpenseCodeDto": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,11 @@ import { ExpensesArchiveController } from "./controllers/expenses-archive.contro
|
||||||
import { LeaveRequestsArchiveController } from "./controllers/leave-requests-archive.controller";
|
import { LeaveRequestsArchiveController } from "./controllers/leave-requests-archive.controller";
|
||||||
import { ShiftsArchiveController } from "./controllers/shifts-archive.controller";
|
import { ShiftsArchiveController } from "./controllers/shifts-archive.controller";
|
||||||
import { TimesheetsArchiveController } from "./controllers/timesheets-archive.controller";
|
import { TimesheetsArchiveController } from "./controllers/timesheets-archive.controller";
|
||||||
|
import { EmployeesModule } from "../employees/employees.module";
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
imports: [
|
imports: [
|
||||||
|
EmployeesModule,
|
||||||
ScheduleModule,
|
ScheduleModule,
|
||||||
TimesheetsModule,
|
TimesheetsModule,
|
||||||
ExpensesModule,
|
ExpensesModule,
|
||||||
|
|
|
||||||
|
|
@ -5,5 +5,6 @@ import { EmployeesService } from './services/employees.service';
|
||||||
@Module({
|
@Module({
|
||||||
controllers: [EmployeesController],
|
controllers: [EmployeesController],
|
||||||
providers: [EmployeesService],
|
providers: [EmployeesService],
|
||||||
|
exports: [EmployeesService],
|
||||||
})
|
})
|
||||||
export class EmployeesModule {}
|
export class EmployeesModule {}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user