Skip to content

Commit 4c455e6

Browse files
committed
ADDED PENDING TO MEMBERS
1 parent 364f4cb commit 4c455e6

5 files changed

Lines changed: 10 additions & 5 deletions

File tree

client/src/components/ui/backend/organization_call_backend.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ export const deleteItem = async (id: number) => {
124124

125125
// MEMBERS SECTION
126126

127+
// PENDING
127128
export const getMembers = async (
128129
filterType: string,
129130
): Promise<Member_Details_Interface[]> => {

client/src/components/ui/backend/organization_clean_backend_calls.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ Even if we are calling mocks, we need to SWR
235235
236236
filterType: d to add to backend url call
237237
isDev: true if we want to mock data
238+
// PENDING
238239
*/
239240
export const useOrganizationBackendGetMembers = (
240241
filterType: string,

client/src/components/ui/card_organization_member_details_modal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ export const Member_Details_Modal: React.FC<Member_Details_Modal_Interface> = ({
123123
<div className="modal-action-button secondary">Modify</div>
124124
</Link>
125125

126+
{/* // PENDING */}
126127
<button
127128
onClick={() => deleteItemClean(itemData.id || 0)}
128129
className="modal-action-button secondary"

client/src/pages/organization_add_member.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import { useRouter } from "next/router";
33
import React, { useState } from "react";
44
import { useSWRConfig } from "swr/_internal";
55

6-
import { BASE_URL } from "@/components/ui/backend/organization_call_backend";
6+
// PENDING
7+
import { BASE_INVENTORY_URL } from "@/components/ui/backend/organization_call_backend";
78
// import { createItem } from '../hooks/organization_call_backend';
89
import {
910
createMemberClean,
@@ -95,17 +96,17 @@ const Organization_Add_Member = () => {
9596
await createMemberClean({ ...formData } as Member_Details_Interface);
9697

9798
// 3. Tell SWR to refresh the Dashboard data
98-
// This tells SWR: "The data at BASE_URL is old, please go get the new list!"
99-
mutate([`${BASE_URL}`, "all"]);
99+
// This tells SWR: "The data at BASE_INVENTORY_URL is old, please go get the new list!"
100+
mutate([`${BASE_INVENTORY_URL}`, "all"]);
100101

101102
alert("Member created!");
102103
} else {
103104
// 2. Call the action (The "Messenger")
104105
await updateMemberClean(formData);
105106

106107
// 3. Tell SWR to refresh the Dashboard data
107-
// This tells SWR: "The data at BASE_URL is old, please go get the new list!"
108-
mutate([`${BASE_URL}`, "all"]);
108+
// This tells SWR: "The data at BASE_INVENTORY_URL is old, please go get the new list!"
109+
mutate([`${BASE_INVENTORY_URL}`, "all"]);
109110

110111
alert("Member updated!");
111112
}

client/src/pages/organization_member_management.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { useOrganizationBackendGetMembers } from "../components/ui/backend/organ
1111

1212
const Organization_Member_Management = () => {
1313
// 1. Fetch the data using your custom hook
14+
// PENDING
1415
const { data, loading, error, refresh } =
1516
useOrganizationBackendGetMembers("all");
1617
console.log("Refresh function:", refresh);

0 commit comments

Comments
 (0)