ed
This commit is contained in:
parent
f8715d76de
commit
73b43626e7
2 changed files with 100 additions and 10 deletions
|
@ -473,6 +473,12 @@ RegisterNetEvent('billing:client:showPaymentPrompt', function(data)
|
|||
description = 'Du hast die Rechnung abgelehnt',
|
||||
type = 'info'
|
||||
})
|
||||
else
|
||||
lib.notify({
|
||||
title = 'Fehler',
|
||||
description = 'Fehler beim Ablehnen der Rechnung',
|
||||
type = 'error'
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -482,16 +488,24 @@ RegisterNetEvent('billing:client:showPaymentPrompt', function(data)
|
|||
description = 'Rechnung für später speichern',
|
||||
icon = 'clock',
|
||||
onSelect = function()
|
||||
lib.callback.await('billing:server:handleBillResponse', false, {
|
||||
local success = lib.callback.await('billing:server:handleBillResponse', false, {
|
||||
action = 'later',
|
||||
billId = data.billId
|
||||
})
|
||||
|
||||
lib.notify({
|
||||
title = 'Rechnung gespeichert',
|
||||
description = 'Die Rechnung wurde für später gespeichert',
|
||||
type = 'info'
|
||||
})
|
||||
if success then
|
||||
lib.notify({
|
||||
title = 'Rechnung gespeichert',
|
||||
description = 'Die Rechnung wurde für später gespeichert',
|
||||
type = 'info'
|
||||
})
|
||||
else
|
||||
lib.notify({
|
||||
title = 'Fehler',
|
||||
description = 'Fehler beim Speichern der Rechnung',
|
||||
type = 'error'
|
||||
})
|
||||
end
|
||||
end
|
||||
}
|
||||
}
|
||||
|
@ -508,3 +522,7 @@ RegisterNetEvent('billing:client:showPaymentPrompt', function(data)
|
|||
-- Show the payment prompt
|
||||
lib.showContext('bill_payment_prompt')
|
||||
end)
|
||||
|
||||
RegisterNetEvent('billing:client:openBillsMenu', function()
|
||||
ViewBills()
|
||||
end)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue