gotrip-fx-transaction-form 0.1.0-uat.1

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.
Files changed (107) hide show
  1. package/index.js +60056 -0
  2. package/package.json +14 -0
  3. package/types/components/AddTransaction/BankList.d.ts +20 -0
  4. package/types/components/AddTransaction/BankSelectionInput.d.ts +11 -0
  5. package/types/components/AddTransaction/Business.d.ts +7 -0
  6. package/types/components/AddTransaction/Education.d.ts +7 -0
  7. package/types/components/AddTransaction/GroupCustomers.d.ts +5 -0
  8. package/types/components/AddTransaction/SingularCustomer.d.ts +7 -0
  9. package/types/components/AddTransaction/UseCaseSelection.d.ts +21 -0
  10. package/types/components/AddUser/AddBookerForm.d.ts +6 -0
  11. package/types/components/Apps/AdminApp.d.ts +1 -0
  12. package/types/components/Apps/AgencyApp.d.ts +1 -0
  13. package/types/components/Apps/EmbededIndividualApp.d.ts +5 -0
  14. package/types/components/Apps/IndividualApp.d.ts +1 -0
  15. package/types/components/Apps/PartnerApp.d.ts +1 -0
  16. package/types/components/CurrencyExchangeRate/CurrencyExchangeRate.d.ts +10 -0
  17. package/types/components/CustomerSelection/CustomerSelection.d.ts +10 -0
  18. package/types/components/Dashboard/BookerSelectionInput.d.ts +7 -0
  19. package/types/components/Dashboard/DailyTransactionChart.d.ts +8 -0
  20. package/types/components/Dashboard/TotalCommissionCard.d.ts +9 -0
  21. package/types/components/Dashboard/TotalTransactionCard.d.ts +9 -0
  22. package/types/components/Dashboard/TransactionByStatusChart.d.ts +8 -0
  23. package/types/components/Dashboard/TransactionByTypeChart.d.ts +8 -0
  24. package/types/components/Layout/Layout.d.ts +6 -0
  25. package/types/components/Layout/NavBar/Navbar.d.ts +1 -0
  26. package/types/components/Menu/Menu.d.ts +1 -0
  27. package/types/components/Menu/MenuItem.d.ts +9 -0
  28. package/types/components/Modal/ErrorModal.d.ts +1 -0
  29. package/types/components/Modal/Modal.d.ts +12 -0
  30. package/types/components/Modal/SuccessModal.d.ts +1 -0
  31. package/types/components/Modal/WebcamModal.d.ts +7 -0
  32. package/types/components/Pagination/LimitDropdown.d.ts +6 -0
  33. package/types/components/TransactionList/BankSelectionInput.d.ts +7 -0
  34. package/types/components/TransactionList/CurrencySelectionInput.d.ts +7 -0
  35. package/types/components/TransactionList/StatusSelectionInput.d.ts +9 -0
  36. package/types/components/TransactionStatusBadge/TransactionStatusBadge.d.ts +4 -0
  37. package/types/components/UpdateUser/UpdateBookerForm.d.ts +7 -0
  38. package/types/components/UpdateUser/UpdateCommissionRateForm.d.ts +7 -0
  39. package/types/components/UserProfile/AccountSettingForm.d.ts +7 -0
  40. package/types/components/UserProfile/ChangePasswordForm.d.ts +5 -0
  41. package/types/components/UserStatusBadge/UserStatusBadge.d.ts +4 -0
  42. package/types/components/ui/link-button.d.ts +4 -0
  43. package/types/components/ui/pagination.d.ts +19 -0
  44. package/types/constants/airlines.d.ts +7 -0
  45. package/types/constants/airport-code-country.d.ts +5 -0
  46. package/types/constants/api-urls.d.ts +56 -0
  47. package/types/constants/countries.d.ts +6 -0
  48. package/types/constants/env.d.ts +5 -0
  49. package/types/constants/index.d.ts +7 -0
  50. package/types/constants/provinces.d.ts +6 -0
  51. package/types/design-systems/Button/Button.d.ts +14 -0
  52. package/types/design-systems/Chart/LineChart.d.ts +13 -0
  53. package/types/design-systems/Chart/PieChart.d.ts +9 -0
  54. package/types/design-systems/Drawer/Drawer.d.ts +12 -0
  55. package/types/design-systems/Input/Input.d.ts +5 -0
  56. package/types/design-systems/Stat/Stat.d.ts +8 -0
  57. package/types/design-systems/Toast/Toast.d.ts +7 -0
  58. package/types/embeded-main.d.ts +7 -0
  59. package/types/hooks/transanactions/useBusiness.hook.d.ts +202 -0
  60. package/types/hooks/transanactions/useEducation.hook.d.ts +270 -0
  61. package/types/hooks/useBookerList.d.ts +11 -0
  62. package/types/hooks/useConfirmTransaction.d.ts +32 -0
  63. package/types/hooks/useDashboard.d.ts +27 -0
  64. package/types/hooks/useDisclosure.d.ts +5 -0
  65. package/types/hooks/useEducationFXList.d.ts +8 -0
  66. package/types/hooks/useGroupCustomers.d.ts +231 -0
  67. package/types/hooks/useImportBookers.d.ts +104 -0
  68. package/types/hooks/useIsMobile.d.ts +1 -0
  69. package/types/hooks/useTransactionList.d.ts +21 -0
  70. package/types/hooks/useUserList.d.ts +12 -0
  71. package/types/hooks/useUserProfile.d.ts +7 -0
  72. package/types/hooks/useWindowSize.d.ts +4 -0
  73. package/types/index.d.ts +6 -0
  74. package/types/main.d.ts +1 -0
  75. package/types/pages/admin/home/UserList.d.ts +1 -0
  76. package/types/pages/admin/login/LoginPage.d.ts +6 -0
  77. package/types/pages/agency/add-booker/add-booker.d.ts +5 -0
  78. package/types/pages/agency/add-booker/import-booker.d.ts +1 -0
  79. package/types/pages/agency/add-transaction/add-transaction.d.ts +5 -0
  80. package/types/pages/agency/booker-list/index.d.ts +1 -0
  81. package/types/pages/agency/dashboard/dashboard.d.ts +1 -0
  82. package/types/pages/agency/login/LoginPage.d.ts +6 -0
  83. package/types/pages/agency/register/RegisterPage.d.ts +1 -0
  84. package/types/pages/agency/register/SupervisorRegisterForm.d.ts +1 -0
  85. package/types/pages/agency/register/UserRegisterForm.d.ts +1 -0
  86. package/types/pages/agency/register/UserTypeSelection.d.ts +7 -0
  87. package/types/pages/agency/tracsaction-list/TransactionList.d.ts +7 -0
  88. package/types/pages/agency/traveller-confirmation/TravellerConfirmation.d.ts +1 -0
  89. package/types/pages/agency/user-profile/user-profile.d.ts +1 -0
  90. package/types/pages/guest/home.d.ts +1 -0
  91. package/types/pages/partner/EducationFXList.d.ts +1 -0
  92. package/types/pages/partner/MemberList.d.ts +1 -0
  93. package/types/store/useAppStore.d.ts +25 -0
  94. package/types/store/useAuthStore.d.ts +12 -0
  95. package/types/types/app-actor.d.ts +6 -0
  96. package/types/types/enum.d.ts +17 -0
  97. package/types/types/request.dto.d.ts +17 -0
  98. package/types/types/response.dto.d.ts +147 -0
  99. package/types/types/user.d.ts +11 -0
  100. package/types/util/axios.d.ts +1 -0
  101. package/types/util/extract-api-error-codes.d.ts +2 -0
  102. package/types/util/fixed-thead.d.ts +1 -0
  103. package/types/util/formatter.d.ts +3 -0
  104. package/types/util/time.d.ts +1 -0
  105. package/types/util/toast.d.ts +1 -0
  106. package/types/util/transaction.util.d.ts +2 -0
  107. package/types/vite-env.d.ts +1 -0
@@ -0,0 +1,147 @@
1
+ import { BankStatus, TransactionStatus } from './enum';
2
+ import { EUserRole, EUserStatus } from './user';
3
+ export type LoginRespDto = {
4
+ accessToken: string;
5
+ user: {
6
+ email: string;
7
+ firstName?: string;
8
+ lastName?: string;
9
+ role: EUserRole;
10
+ };
11
+ };
12
+ export type ITicket = {
13
+ ticketNumber?: string;
14
+ travellerLastName?: string;
15
+ travellerFirstName?: string;
16
+ travellerPhone?: string;
17
+ passport?: string;
18
+ identityDocumentNumber?: string;
19
+ visa?: string;
20
+ airlineCode?: string;
21
+ airlineName?: string;
22
+ departureDate?: string;
23
+ countryCodeDes?: string;
24
+ countryNameDes?: string;
25
+ reservationNumber?: string;
26
+ createdAt?: string;
27
+ updatedAt?: string;
28
+ };
29
+ export declare enum ETransactionType {
30
+ TRAVEL = "TRAVEL",
31
+ TRAVEL_GROUP = "TRAVEL_GROUP"
32
+ }
33
+ export type ITransaction = {
34
+ id: number;
35
+ amount: number;
36
+ comission: number;
37
+ status: TransactionStatus;
38
+ exchangeCurrencyCode: string;
39
+ bankCode: string;
40
+ bankTransactionId: string;
41
+ bankTransactionStatus: string;
42
+ bankTransactionStatusDescription: string;
43
+ bankTransactionCreatedAt: string;
44
+ lastSyncedAt: string;
45
+ customerConfirmationToken: string;
46
+ customerConfirmationTokenExpiredAt: string;
47
+ currencyCode: string;
48
+ vndAmount: number;
49
+ createdAt: string;
50
+ updatedAt: string;
51
+ type: ETransactionType;
52
+ ticket?: ITicket;
53
+ bank?: IBank;
54
+ };
55
+ export type IBank = {
56
+ shortName: string;
57
+ commonName: string;
58
+ status: BankStatus;
59
+ };
60
+ export type GetTransactionListRespDto = {
61
+ transactions: ITransaction[];
62
+ total: number;
63
+ };
64
+ export type GetUserListRespDto = {
65
+ users: IUser[];
66
+ total: number;
67
+ };
68
+ export type INewBooker = {
69
+ email: string;
70
+ firstName: string;
71
+ lastName: string;
72
+ phone: string;
73
+ status: EUserStatus;
74
+ password: string;
75
+ };
76
+ export type GetBookerListRespDto = {
77
+ bookers: IUser[];
78
+ total: number;
79
+ };
80
+ export type ExchangeRateHistory = {
81
+ exchangeRate: string;
82
+ date: Date;
83
+ };
84
+ export type BankCurrency = {
85
+ status: string;
86
+ paymentMethod: string;
87
+ currencyCode: string;
88
+ bank: IBank;
89
+ exchangeRateHistories: ExchangeRateHistory[];
90
+ };
91
+ export type Currency = {
92
+ code: string;
93
+ bankCurrencies: BankCurrency[];
94
+ };
95
+ export type SignedUrl = {
96
+ url: string;
97
+ expiresAt: string;
98
+ };
99
+ export declare enum EBidStatus {
100
+ PENDING = "pending",
101
+ ACCEPTED = "accepted",
102
+ REJECTED = "rejected"
103
+ }
104
+ export type IUser = {
105
+ id: number;
106
+ email: string;
107
+ firstName?: string;
108
+ lastName?: string;
109
+ role?: EUserRole;
110
+ status?: EUserStatus;
111
+ address?: string;
112
+ phone?: string;
113
+ identityNumber?: string;
114
+ companyName?: string;
115
+ companyTaxNumber?: string;
116
+ commissionPolicy?: {
117
+ commisionRate: number;
118
+ };
119
+ };
120
+ export type IBid = {
121
+ id: number;
122
+ status: EBidStatus;
123
+ price: number;
124
+ total: number;
125
+ createdAt: string;
126
+ updatedAt: string;
127
+ transaction?: ITransaction;
128
+ user?: IUser;
129
+ };
130
+ export type GetBidListRespDto = {
131
+ bids: IBid[];
132
+ total: number;
133
+ page: number;
134
+ limit: number;
135
+ };
136
+ export type GetFlightInfoResponseDto = {
137
+ customers?: {
138
+ name: string;
139
+ eTicketNumber: string;
140
+ }[];
141
+ airlineCode?: string;
142
+ airlineName?: string;
143
+ departureDate?: string;
144
+ countryCodeDes?: string;
145
+ arriveAirportCode?: string;
146
+ countryNameDes?: string;
147
+ };
@@ -0,0 +1,11 @@
1
+ export declare enum EUserRole {
2
+ USER = "user",// user
3
+ BOOKER = "booker",// booker
4
+ SUPERVISOR = "supervisor",// company
5
+ ADMIN = "admin",
6
+ BANK_EMPLOYEE = "bank_employee"
7
+ }
8
+ export declare enum EUserStatus {
9
+ ACTIVE = "active",
10
+ INACTIVE = "inactive"
11
+ }
@@ -0,0 +1 @@
1
+ export declare const api: import('axios').AxiosInstance;
@@ -0,0 +1,2 @@
1
+ import { AxiosError } from 'axios';
2
+ export declare const extractApiErrorCodes: (error: AxiosError) => Record<string, string[]>;
@@ -0,0 +1 @@
1
+ export declare const resizeFixedHeader: (headerRef: React.RefObject<HTMLTableRowElement>, fixedHeaderRef: React.RefObject<HTMLTableRowElement>) => void;
@@ -0,0 +1,3 @@
1
+ export declare const formatter: Intl.NumberFormat;
2
+ export declare const formatCurrencyWithoutVND: (value: number | string) => string;
3
+ export declare const formatCurrency: (value: number | string) => string;
@@ -0,0 +1 @@
1
+ export declare const delay: (seconds: number) => Promise<unknown>;
@@ -0,0 +1 @@
1
+ export declare const showToast: (message: string, type: "success" | "error", duration?: number) => void;
@@ -0,0 +1,2 @@
1
+ import { ETransactionType } from '../types/response.dto';
2
+ export declare const getTransactionType: (type: ETransactionType) => "Du lịch" | "Du lịch (Nhóm)";
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />