@omniumretail/shared-resources 0.1.77 → 0.1.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,2 @@
1
- import { UseQueryOptions } from '@tanstack/react-query';
2
1
  import { Attendance } from "../../../../interfaces";
3
- export interface PostAttendance extends UseQueryOptions<Attendance> {
4
- storeId: string;
5
- employeeId: string;
6
- isWorking: boolean;
7
- }
8
- export declare const usePostAttendance: ({ storeId, employeeId, isWorking }: PostAttendance) => import("@tanstack/react-query").UseMutationResult<Attendance, unknown, Attendance, unknown>;
2
+ export declare const usePostAttendance: () => import("@tanstack/react-query").UseMutationResult<Attendance, unknown, Attendance, unknown>;
@@ -14,9 +14,13 @@ export interface Template {
14
14
  CategoriesDTO: AstaCategories[];
15
15
  }
16
16
  export interface AstaCategories {
17
- Name: string;
18
- Questions: AstaQuestions[];
19
- SubCategoriesDTO: AstaCategories[];
17
+ Title: string;
18
+ Key: string;
19
+ Data: {
20
+ Name: string;
21
+ Questions: AstaQuestions[];
22
+ };
23
+ Children: AstaCategories[];
20
24
  }
21
25
  export interface HeadersInterface {
22
26
  Id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omniumretail/shared-resources",
3
- "version": "0.1.77",
3
+ "version": "0.1.79",
4
4
  "private": false,
5
5
  "description": "Shared Components and services or utils to the frontend versions",
6
6
  "main": "dist/bundle.js",
@@ -1,25 +1,12 @@
1
- import { useQueryClient, UseQueryOptions, useMutation } from '@tanstack/react-query';
2
- import { Attendance, TogglePinCode } from "../../../../interfaces";
3
- import { AttendanceType} from "../../../../enums/attendence-type.enum";
4
- import { getDateToUnix } from "../../../../helpers/date-unix.helper";
1
+ import { useQueryClient, useMutation } from '@tanstack/react-query';
2
+ import { Attendance } from "../../../../interfaces";
5
3
  import { postAuth0} from "../../../../services/ApiService";
6
4
 
7
- export interface PostAttendance extends UseQueryOptions<Attendance>{
8
- storeId: string;
9
- employeeId: string;
10
- isWorking: boolean;
11
- }
12
5
 
13
- export const usePostAttendance = ({ storeId, employeeId, isWorking}: PostAttendance) => {
6
+ export const usePostAttendance = () => {
14
7
  const queryClient = useQueryClient();
15
8
  return useMutation<Attendance, unknown, Attendance>((data: Attendance) => {
16
- return postAuth0('/ATIM/Attendances', {
17
- StoreId: storeId,
18
- EmployeeId: employeeId,
19
- Date: getDateToUnix(new Date()),
20
- Type: isWorking ? AttendanceType.ENTER : AttendanceType.EXIT
21
-
22
- }, data);
9
+ return postAuth0('/ATIM/Attendances', undefined, data);
23
10
  }, {
24
11
  onSuccess: (data: Attendance) => {
25
12
  queryClient.setQueryData(