Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
0db0c32
add: form create kas submission
jeflijonathan2327240094 Jul 23, 2024
6b529e2
fix: form submit api
Rendy752 Jul 23, 2024
f8500ca
update: form template design
jeflijonathan2327240094 Aug 1, 2024
ba48f60
remove: unused package
jeflijonathan2327240094 Aug 1, 2024
c937c5e
edit: package.json
jeflijonathan2327240094 Aug 1, 2024
0e380b7
edit: package.json
Rendy752 Aug 1, 2024
1af18b2
Merge branch 'development' into feature/create-kas-submission
Rendy752 Aug 1, 2024
6134482
edit: package.json
jeflijonathan2327240094 Aug 1, 2024
0d92cf2
fix: error in package and add: global Button components
jeflijonathan2327240094 Aug 1, 2024
0560431
remove: unused package
jeflijonathan2327240094 Aug 1, 2024
adeee4d
update: snackbar and field upload in background image url.
jeflijonathan2327240094 Aug 2, 2024
5bd1338
remove: unused package and unused import
jeflijonathan2327240094 Aug 2, 2024
9860a58
remove: console log in api
jeflijonathan2327240094 Aug 2, 2024
bff1414
update: change name file and name class KasSubmission services
jeflijonathan2327240094 Aug 2, 2024
db637ca
Update: header in api services
jeflijonathan2327240094 Aug 3, 2024
841c879
update: Folder API and file API, Add: model API
jeflijonathan2327240094 Aug 4, 2024
e3f5cd2
Update: Upload model
jeflijonathan2327240094 Aug 4, 2024
a5fbcc4
update: model balanceHistory
jeflijonathan2327240094 Aug 4, 2024
2364593
update: service Kas Submission, file, name folder, package, and locat…
jeflijonathan2327240094 Aug 17, 2024
1bc8be5
update: context kas submission
jeflijonathan2327240094 Aug 17, 2024
0c1a796
update: kas submission context
jeflijonathan2327240094 Aug 17, 2024
d057ad9
Add: localstorage in utils
jeflijonathan2327240094 Aug 23, 2024
7b30b83
Fixed: upload image
jeflijonathan2327240094 Feb 1, 2025
eae6a71
update: tidy up the code
jeflijonathan2327240094 Feb 1, 2025
5b14aba
Update: tidy up the cashBody code
jeflijonathan2327240094 Feb 1, 2025
3d1cc88
Add: debouncer for search
jeflijonathan2327240094 Feb 2, 2025
ebcf348
change: To implement a 1-second delay (debounce) for the search funct…
jeflijonathan2327240094 Feb 2, 2025
29aa174
Add: Active NPM in the select input.
jeflijonathan2327240094 Feb 2, 2025
a4fb4cb
Remove: unused import
jeflijonathan2327240094 Feb 2, 2025
7b53288
Remove: unused line
jeflijonathan2327240094 Feb 2, 2025
6975ae1
remove: unused line
jeflijonathan2327240094 Feb 2, 2025
b4ca056
remove: unused imports
jeflijonathan2327240094 Feb 2, 2025
66b6244
remove: Field in SerachUser
jeflijonathan2327240094 Feb 2, 2025
146258c
remove: common in api folder
jeflijonathan2327240094 Feb 2, 2025
4abab30
add:loading submit
jeflijonathan2327240094 Feb 2, 2025
fd6ab34
Add: Redirect after successfully completing the Kas submission
jeflijonathan2327240094 Feb 2, 2025
67abeb5
Remove:console log
jeflijonathan2327240094 Feb 2, 2025
306823d
Change: success message (Successfully, Wait for Admin Validation) in …
jeflijonathan2327240094 Feb 2, 2025
4735cab
remove: unused line
jeflijonathan2327240094 Feb 2, 2025
d59a07a
unusend class and change condition becomes using the and operator
jeflijonathan2327240094 Feb 12, 2025
8cbf2ca
remove: unusend class
jeflijonathan2327240094 Feb 12, 2025
3046143
fixed:error in user hook
jeflijonathan2327240094 Feb 13, 2025
4980be9
Change: Uploading File before submit, components image preview and dr…
jeflijonathan2327240094 Feb 27, 2025
e296d63
Change: name of file and fixed: Logic uploading
jeflijonathan Mar 8, 2025
7752cdc
Change: onDrop
jeflijonathan Mar 8, 2025
4949d9b
Change: Amount Paid
jeflijonathan Mar 8, 2025
cc8f6a0
Remove: setState for create kas loading
jeflijonathan Mar 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VITE_BACKEND_URL=https://backend.url
VITE_BACKEND_URL=https://api.fanesp.online
122 changes: 118 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@fontsource/roboto": "^5.0.13",
"@hookform/resolvers": "^3.9.0",
"@mui/icons-material": "^5.15.18",
"@mui/material": "^5.15.18",
"@mui/x-charts": "^7.5.0",
Expand All @@ -25,9 +26,13 @@
"notistack": "^3.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-dropzone": "^14.3.5",
"react-hook-form": "^7.52.2",
"react-loading-skeleton": "^3.4.0",
"react-router-dom": "^6.23.1",
"tailwind-merge": "^2.3.0"
"react-simple-image-viewer": "^1.2.2",
"tailwind-merge": "^2.3.0",
"yup": "^1.4.0"
},
"devDependencies": {
"@types/lodash": "^4.17.4",
Expand Down
8 changes: 2 additions & 6 deletions src/api/services/balance.ts → src/api/balance/balance.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
import { APIResponse } from "@types";
import { BalanceModel } from "./model";
import API from "..";

type GetResponse = {
balance: number;
updated_at: string;
};

export default class BalanceServices {
basePath: string = "/balance";
private api: API = new API();

async get() {
const targetPath = this.basePath;
const res: APIResponse<GetResponse> = await this.api.GET(targetPath);
const res: APIResponse<BalanceModel> = await this.api.GET(targetPath);
return res;
}
}
4 changes: 4 additions & 0 deletions src/api/balance/model.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export type BalanceModel = {
balance: number;
updated_at: string;
};
15 changes: 15 additions & 0 deletions src/api/balanceHistory/balanceHistory.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { APIResponse } from "@types";
import API from "..";
import { BalanceHistoryModel } from "./model";

export default class BalanceHistoryServices {
basePath: string = "/balance/history";
private api: API = new API();

async get(queryParams?: string) {
const targetPath = `${this.basePath}?${queryParams}`;
const res: APIResponse<BalanceHistoryModel[]> =
await this.api.GET(targetPath);
return res;
}
}
18 changes: 18 additions & 0 deletions src/api/balanceHistory/model.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { PaginationType } from "@types";

export type BalanceHistoryModel = {
amount: number;
prev_balance: number;
activity: string;
note: string;
user: {
npm: string;
name: string;
};
created_at: string;
};

export type BalanceHistoryResponseModel = {
data: BalanceHistoryModel[];
pagination?: PaginationType;
};
35 changes: 35 additions & 0 deletions src/api/file/file.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import API from "..";
import { UploadModel } from "./model";
import { FetchCallback } from "@types";

export default class FileServices {
basePath: string = "/file/images";
private api: API = new API();

async post(submission: FormData, callback: FetchCallback<UploadModel>) {
const targetPath = `${this.basePath}`;
const res = await this.api.POSTFORM<UploadModel>(targetPath, submission);

if (!res?.status) {
callback.onError(res?.message || "unknown error");
} else {
if (res.data) callback.onSuccess(res.data);
}

callback.onFullfilled && callback.onFullfilled();
}

async delete(urlId: string, callback: FetchCallback<UploadModel>) {
const targetPath = `${this.basePath}/${urlId}`;

const res = await this.api.DELETE<UploadModel>(targetPath);

if (!res?.status) {
callback.onError(res?.message || "unknown error");
} else {
if (res.data) callback.onSuccess(res?.data);
}

callback.onFullfilled && callback.onFullfilled();
}
}
3 changes: 3 additions & 0 deletions src/api/file/model.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export type UploadModel = {
url_id: string;
};
Loading