ubk.erp.webpack 1.3.3 → 1.3.5
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.
- package/README.md +54 -0
- package/dist/Layout/Communicate/Chat.d.ts +5 -0
- package/dist/Layout/Communicate/ChatBar.d.ts +5 -0
- package/dist/Layout/Communicate/Services/chatService.d.ts +11 -0
- package/dist/Layout/Communicate/index.d.ts +2 -0
- package/dist/Layout/GeneralSetting/Services/generalSettingService.d.ts +49 -0
- package/dist/Layout/GeneralSetting/Sms/Sms.d.ts +5 -0
- package/dist/Layout/GeneralSetting/Sms/index.d.ts +1 -0
- package/dist/Layout/GeneralSetting/SmsAlertSetting/Services/smsAlertSettingService.d.ts +12 -0
- package/dist/Layout/GeneralSetting/SmsAlertSetting/SmsAlertSetting.d.ts +5 -0
- package/dist/Layout/GeneralSetting/SmsAlertSetting/hooks.d.ts +15 -0
- package/dist/Layout/GeneralSetting/SmsAlertSetting/index.d.ts +1 -0
- package/dist/Layout/GeneralSetting/SmsSetting/Services/smsSettingService.d.ts +4 -0
- package/dist/Layout/GeneralSetting/SmsSetting/SmsSetting.d.ts +5 -0
- package/dist/Layout/GeneralSetting/SmsSetting/hooks.d.ts +3 -0
- package/dist/Layout/GeneralSetting/SmsSetting/index.d.ts +1 -0
- package/dist/Layout/GeneralSetting/index.d.ts +3 -0
- package/dist/Layout/HumanResource/StaffDirectory/Pages/StaffDirectoryPage.d.ts +2 -1
- package/dist/Layout/HumanResource/StaffDirectory/StaffDirectory.d.ts +2 -1
- package/dist/index.cjs +15 -15
- package/dist/index.d.ts +1 -0
- package/dist/index.js +12044 -10037
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -234,6 +234,9 @@ import {
|
|
|
234
234
|
FeesInfo,
|
|
235
235
|
PayrollSettings,
|
|
236
236
|
PaymentGateway,
|
|
237
|
+
Sms,
|
|
238
|
+
SmsSetting,
|
|
239
|
+
SmsAlertSetting,
|
|
237
240
|
} from "ubk.erp.webpack";
|
|
238
241
|
|
|
239
242
|
const GeneralSettingPage = ({ token }) => {
|
|
@@ -249,11 +252,40 @@ const GeneralSettingPage = ({ token }) => {
|
|
|
249
252
|
<FeesInfo token={token} />
|
|
250
253
|
<PayrollSettings token={token} />
|
|
251
254
|
<PaymentGateway token={token} />
|
|
255
|
+
<Sms token={token} />
|
|
256
|
+
<SmsSetting token={token} />
|
|
257
|
+
<SmsAlertSetting token={token} />
|
|
252
258
|
</>
|
|
253
259
|
);
|
|
254
260
|
};
|
|
255
261
|
```
|
|
256
262
|
|
|
263
|
+
### Using the SMS & Communication Modules
|
|
264
|
+
|
|
265
|
+
```jsx
|
|
266
|
+
import { Sms, SmsSetting, SmsAlertSetting, Chat } from "ubk.erp.webpack";
|
|
267
|
+
|
|
268
|
+
const SmsAndChatPage = ({ token }) => {
|
|
269
|
+
return (
|
|
270
|
+
<>
|
|
271
|
+
{/* Gateway & details configuration */}
|
|
272
|
+
<SmsSetting token={token} />
|
|
273
|
+
{/* Gateway alert settings + template CRUD */}
|
|
274
|
+
<SmsAlertSetting token={token} />
|
|
275
|
+
{/* Send a new SMS campaign */}
|
|
276
|
+
<Sms token={token} />
|
|
277
|
+
{/* WhatsApp chat window */}
|
|
278
|
+
<Chat token={token} />
|
|
279
|
+
</>
|
|
280
|
+
);
|
|
281
|
+
};
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
> **Endpoints:** all SMS/WhatsApp endpoints are configurable via `VITE_*`
|
|
285
|
+
> environment variables and are defined in
|
|
286
|
+
> `src/Layout/GeneralSetting/Services/generalSettingService.js`
|
|
287
|
+
> (see `smsGateway`, `smsDetails`, `smsTemplates`, `smsCompose`, and `chat` groups).
|
|
288
|
+
|
|
257
289
|
### Using the Front Office Module
|
|
258
290
|
|
|
259
291
|
```jsx
|
|
@@ -597,6 +629,28 @@ const ApplyLeavePage = ({ token }) => {
|
|
|
597
629
|
| `FeesInfo` | Fee receipt information, signatures, and branding settings. |
|
|
598
630
|
| `PayrollSettings` | Payroll-related configuration settings. |
|
|
599
631
|
| `PaymentGateway` | Payment gateway credentials and integration settings. |
|
|
632
|
+
| `SmsSetting` | SMS gateway details (API key, URL, header key) with edit/view toggle. |
|
|
633
|
+
| `SmsAlertSetting` | SMS alert settings — gateway configuration, template CRUD, and status toggling. |
|
|
634
|
+
|
|
635
|
+
### Communicate
|
|
636
|
+
|
|
637
|
+
| Component | Description |
|
|
638
|
+
| :--- | :--- |
|
|
639
|
+
| `Chat` | WhatsApp chat interface — recipient sidebar (Teacher/Student mode), message list with text & image preview, emoji picker, attachments, and a create-group modal. |
|
|
640
|
+
| `ChatBar` | The underlying chat UI body, exported separately for embedding without the card wrapper. |
|
|
641
|
+
| `Sms` | SMS Campaign Composer — pick a template, set dynamic placeholders, select recipients (individual staff/student or whole classes via sections), and send. |
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
### Using the Communicate Module
|
|
645
|
+
|
|
646
|
+
```jsx
|
|
647
|
+
import { Chat } from "ubk.erp.webpack";
|
|
648
|
+
|
|
649
|
+
const CommunicatePage = ({ token }) => {
|
|
650
|
+
return <Chat token={token} />;
|
|
651
|
+
};
|
|
652
|
+
```
|
|
653
|
+
|
|
600
654
|
|
|
601
655
|
|
|
602
656
|
## 🛠️ Development
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const chatEndpoints: {
|
|
2
|
+
whatsappBaseUrl: any;
|
|
3
|
+
groupList: any;
|
|
4
|
+
groupCreate: any;
|
|
5
|
+
teacherDropdown: any;
|
|
6
|
+
classDropdown: any;
|
|
7
|
+
sectionByClass: any;
|
|
8
|
+
roleDropdown: any;
|
|
9
|
+
};
|
|
10
|
+
export function getMessagesUrl(whatsappBaseUrl: any): string;
|
|
11
|
+
export function getSendMessagesUrl(whatsappBaseUrl: any): string;
|
|
@@ -60,6 +60,55 @@ export namespace endpoints {
|
|
|
60
60
|
let save_3: any;
|
|
61
61
|
export { save_3 as save };
|
|
62
62
|
}
|
|
63
|
+
namespace smsGateway {
|
|
64
|
+
let get_5: any;
|
|
65
|
+
export { get_5 as get };
|
|
66
|
+
let save_4: any;
|
|
67
|
+
export { save_4 as save };
|
|
68
|
+
}
|
|
69
|
+
namespace smsDetails {
|
|
70
|
+
let get_6: any;
|
|
71
|
+
export { get_6 as get };
|
|
72
|
+
let save_5: any;
|
|
73
|
+
export { save_5 as save };
|
|
74
|
+
}
|
|
75
|
+
namespace smsTemplates {
|
|
76
|
+
let table_2: any;
|
|
77
|
+
export { table_2 as table };
|
|
78
|
+
let add_2: any;
|
|
79
|
+
export { add_2 as add };
|
|
80
|
+
let edit_1: any;
|
|
81
|
+
export { edit_1 as edit };
|
|
82
|
+
let _delete: any;
|
|
83
|
+
export { _delete as delete };
|
|
84
|
+
export let changeStatus: any;
|
|
85
|
+
export let templateDropdown: any;
|
|
86
|
+
}
|
|
87
|
+
namespace smsCompose {
|
|
88
|
+
let templateDropdown_1: any;
|
|
89
|
+
export { templateDropdown_1 as templateDropdown };
|
|
90
|
+
let classDropdown_1: any;
|
|
91
|
+
export { classDropdown_1 as classDropdown };
|
|
92
|
+
export let sectionByClass: any;
|
|
93
|
+
export let roleDropdown: any;
|
|
94
|
+
export let staffSearch: any;
|
|
95
|
+
export let studentDropdown: any;
|
|
96
|
+
export let sendMessage: any;
|
|
97
|
+
}
|
|
98
|
+
namespace chat {
|
|
99
|
+
export let whatsappBaseUrl: any;
|
|
100
|
+
export let groupList: any;
|
|
101
|
+
export let groupCreate: any;
|
|
102
|
+
export let teacherDropdown: any;
|
|
103
|
+
let classDropdown_2: any;
|
|
104
|
+
export { classDropdown_2 as classDropdown };
|
|
105
|
+
let sectionByClass_1: any;
|
|
106
|
+
export { sectionByClass_1 as sectionByClass };
|
|
107
|
+
let roleDropdown_1: any;
|
|
108
|
+
export { roleDropdown_1 as roleDropdown };
|
|
109
|
+
}
|
|
110
|
+
function getMessages(whatsappBaseUrl: any): string;
|
|
111
|
+
function getSendMessages(whatsappBaseUrl: any): string;
|
|
63
112
|
}
|
|
64
113
|
export function getUploadAction(path: any): string;
|
|
65
114
|
export function getUploadsBaseUrl(): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Sms';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function useSmsGatewaySettings({ token }: {
|
|
2
|
+
token: any;
|
|
3
|
+
}): import('swr').SWRResponse<any, any, any>;
|
|
4
|
+
export function useSmsTemplates({ token, page, perPage, search, status }: {
|
|
5
|
+
token: any;
|
|
6
|
+
page?: number | undefined;
|
|
7
|
+
perPage?: number | undefined;
|
|
8
|
+
search?: string | undefined;
|
|
9
|
+
status?: string | undefined;
|
|
10
|
+
}): {
|
|
11
|
+
data: any;
|
|
12
|
+
pagination: any;
|
|
13
|
+
isLoading: boolean;
|
|
14
|
+
mutate: import('swr').KeyedMutator<any>;
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './SmsAlertSetting';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './SmsSetting';
|
|
@@ -9,3 +9,6 @@ export { default as About } from './About';
|
|
|
9
9
|
export { default as FeesInfo } from './FeesInfo';
|
|
10
10
|
export { default as PayrollSettings } from './PayrollSettings';
|
|
11
11
|
export { default as PaymentGateway } from './PaymentGateway';
|
|
12
|
+
export { default as Sms } from './Sms';
|
|
13
|
+
export { default as SmsAlertSetting } from './SmsAlertSetting';
|
|
14
|
+
export { default as SmsSetting } from './SmsSetting';
|