This commit is contained in:
Nordi98 2025-08-05 15:06:44 +02:00
parent f8715d76de
commit 73b43626e7
2 changed files with 100 additions and 10 deletions

View file

@ -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)