mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
Merge pull request #177 from project-error/feat/bank-enums
Feat(phone): Update to use all enums.
This commit is contained in:
17 files changed
+47
-30
No files matched your search
@@ -1,11 +1,12 @@
|
||||
import { IAlertProps } from '../../typings/alerts';
|
||||
import { BankEvents } from '../../typings/bank';
|
||||
import { PhoneEvents } from '../../typings/phone';
|
||||
|
||||
onNet(BankEvents.SEND_TRANSFERS, (transfer: any) => {
|
||||
SendNuiMessage(
|
||||
JSON.stringify({
|
||||
app: 'BANK',
|
||||
method: 'setTransaction',
|
||||
method: BankEvents.SEND_TRANSFERS,
|
||||
data: transfer,
|
||||
}),
|
||||
);
|
||||
@@ -15,7 +16,7 @@ onNet(BankEvents.SEND_CREDENTIALS, (credentials: any) => {
|
||||
SendNuiMessage(
|
||||
JSON.stringify({
|
||||
app: 'BANK',
|
||||
method: 'setCredentials',
|
||||
method: BankEvents.SEND_CREDENTIALS,
|
||||
data: credentials,
|
||||
}),
|
||||
);
|
||||
@@ -35,7 +36,7 @@ onNet(BankEvents.TRANSACTION_ALERT, (result: IAlertProps) => {
|
||||
SendNuiMessage(
|
||||
JSON.stringify({
|
||||
app: 'BANK',
|
||||
method: 'setAlert',
|
||||
method: BankEvents.SEND_ALERT,
|
||||
data: result,
|
||||
}),
|
||||
);
|
||||
@@ -45,7 +46,7 @@ onNet(BankEvents.TRANSACTION_NOTIFICATION, (transfer: any) => {
|
||||
SendNuiMessage(
|
||||
JSON.stringify({
|
||||
app: 'BANK',
|
||||
method: 'setNotification',
|
||||
method: BankEvents.SEND_NOTIFICATION,
|
||||
data: transfer,
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -16,7 +16,7 @@ onNet(CallEvents.START_CALL, (transmitter: string, receiver: string, isTransmitt
|
||||
SendNuiMessage(
|
||||
JSON.stringify({
|
||||
app: 'CALL',
|
||||
method: 'setCaller',
|
||||
method: CallEvents.SET_CALLER,
|
||||
data: {
|
||||
active: true,
|
||||
transmitter: transmitter,
|
||||
@@ -40,7 +40,7 @@ onNet(CallEvents.WAS_ACCEPTED, (channelId: number, currentCall: ICall, isTransmi
|
||||
SendNuiMessage(
|
||||
JSON.stringify({
|
||||
app: 'CALL',
|
||||
method: 'setCaller',
|
||||
method: CallEvents.SET_CALLER,
|
||||
data: {
|
||||
active: true,
|
||||
transmitter: currentCall.transmitter,
|
||||
@@ -63,7 +63,7 @@ onNet(CallEvents.WAS_REJECTED, () => {
|
||||
SendNuiMessage(
|
||||
JSON.stringify({
|
||||
app: 'CALL',
|
||||
method: 'setCaller',
|
||||
method: CallEvents.SET_CALLER,
|
||||
data: {
|
||||
transmitter: null,
|
||||
receiver: null,
|
||||
@@ -93,7 +93,7 @@ onNet(CallEvents.WAS_ENDED, () => {
|
||||
SendNuiMessage(
|
||||
JSON.stringify({
|
||||
app: 'CALL',
|
||||
method: 'setCaller',
|
||||
method: CallEvents.SET_CALLER,
|
||||
data: {
|
||||
transmitter: null,
|
||||
receiver: null,
|
||||
@@ -109,7 +109,7 @@ function openCallModal(show: boolean) {
|
||||
SendNuiMessage(
|
||||
JSON.stringify({
|
||||
app: 'CALL',
|
||||
method: 'callModal',
|
||||
method: CallEvents.SET_CALL_MODAL,
|
||||
data: show,
|
||||
}),
|
||||
);
|
||||
@@ -119,7 +119,7 @@ onNet(CallEvents.SEND_HISTORY, (calls: ICall) => {
|
||||
SendNuiMessage(
|
||||
JSON.stringify({
|
||||
app: 'DIALER',
|
||||
method: 'setHistory',
|
||||
method: CallEvents.SET_CALL_HISTORY,
|
||||
data: calls,
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -2,7 +2,7 @@ import { ContactEvents } from '../../typings/contact';
|
||||
import { sendContactsEvent } from '../utils/messages';
|
||||
|
||||
onNet(ContactEvents.SEND_CONTACTS, (contacts: any) => {
|
||||
sendContactsEvent('setContacts', contacts);
|
||||
sendContactsEvent(ContactEvents.SEND_CONTACTS, contacts);
|
||||
});
|
||||
|
||||
RegisterNuiCallbackType(ContactEvents.ADD_CONTACT);
|
||||
@@ -36,5 +36,5 @@ onNet(ContactEvents.DELETE_CONTACT_SUCCESS, () => {
|
||||
});
|
||||
|
||||
onNet(ContactEvents.ACTION_RESULT, (alert: any) => {
|
||||
sendContactsEvent('setAlert', alert);
|
||||
sendContactsEvent(ContactEvents.SEND_ALERT, alert);
|
||||
});
|
||||
@@ -2,7 +2,7 @@ import { NotesEvents } from '../../typings/notes';
|
||||
import { sendNotesEvent } from '../utils/messages';
|
||||
|
||||
onNet(NotesEvents.SEND_NOTE, (notes: any) => {
|
||||
sendNotesEvent('setNotes', notes);
|
||||
sendNotesEvent(NotesEvents.SEND_NOTE, notes);
|
||||
});
|
||||
|
||||
RegisterNuiCallbackType(NotesEvents.ADD_NOTE);
|
||||
@@ -35,5 +35,5 @@ onNet(NotesEvents.UPDATE_NOTE_SUCCESS, () => {
|
||||
});
|
||||
|
||||
onNet(NotesEvents.ACTION_RESULT, (alert: any) => {
|
||||
sendNotesEvent('setAlert', alert);
|
||||
sendNotesEvent(NotesEvents.SEND_ALERT, alert);
|
||||
});
|
||||
@@ -3,7 +3,7 @@ import { IAlertProps } from '../../typings/alerts';
|
||||
import { sendMarketplaceEvent } from '../utils/messages';
|
||||
|
||||
onNet(MarketplaceEvents.SEND_LISTING, (listings: MarketplaceListing[]) => {
|
||||
sendMarketplaceEvent('setListings', listings);
|
||||
sendMarketplaceEvent(MarketplaceEvents.SEND_LISTING, listings);
|
||||
});
|
||||
|
||||
RegisterNuiCallbackType(MarketplaceEvents.ADD_LISTING);
|
||||
@@ -33,5 +33,5 @@ onNet(MarketplaceEvents.DELETE_LISTING_SUCCESS, () => {
|
||||
});
|
||||
|
||||
onNet(MarketplaceEvents.ACTION_RESULT, (alert: IAlertProps) => {
|
||||
sendMarketplaceEvent('setAlert', alert);
|
||||
sendMarketplaceEvent(MarketplaceEvents.SEND_ALERT, alert);
|
||||
});
|
||||
Reference in new issue
Block a user