Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: stuck in ui bug and missing label translation for transfer #43

Merged
merged 1 commit into from
Jan 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions html/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,19 +283,19 @@ class Render {
.cls-1 {
fill: orange;
}

.cls-1, .cls-3 {
stroke: #6c7679;
}

.cls-2 {
clip-path: url(#clip-path);
}

.cls-3, .cls-5 {
fill: none;
}

.cls-4 {
stroke: none;
}
Expand Down Expand Up @@ -722,6 +722,7 @@ $(document).ready(function () {
const defaultLabelList = {
WITHDRAW: languageText.withdraw,
DEPOSIT: languageText.deposit,
TRANSFER: languageText.transfer,
TRANSFER_RECEIVE: languageText.transferReceive
}

Expand Down
12 changes: 6 additions & 6 deletions server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function logTransaction(targetSource,label, key,amount)
print("ERROR: Do you need use these: WITHDRAW,DEPOSIT,TRANSFER_RECEIVE")
return
end

if type(key) ~= "string" or key == '' then
print("ERROR: Do you need use these: WITHDRAW,DEPOSIT,TRANSFER_RECEIVE and can only be string type!")
return
Expand All @@ -158,9 +158,9 @@ function logTransaction(targetSource,label, key,amount)

if xPlayer ~= nil then
local bankCurrentMoney = xPlayer.getAccount('bank').money
BANK.LogTransaction(targetSource, label, string.upper(key), amount, bankCurrentMoney)
BANK.LogTransaction(targetSource, label, string.upper(key), amount, bankCurrentMoney)
else
print("ERROR: xPlayer is nil!")
print("ERROR: xPlayer is nil!")
end
end
exports("logTransaction", logTransaction)
Expand Down Expand Up @@ -207,7 +207,7 @@ BANK = {
xPlayer.removeAccountMoney('bank', amount)
xTarget.addAccountMoney('bank', amount)
local bankMoney = xTarget.getAccount('bank').money
BANK.LogTransaction(xTarget.source, "TRANSFER_RECEIVE", amount, bankMoney)
BANK.LogTransaction(xTarget.source, "TRANSFER_RECEIVE", "TRANSFER_RECEIVE", amount, bankMoney)
TriggerClientEvent("esx:showNotification", xTarget.source, TranslateCap('receive_transfer', amount, xPlayer.source),
"success")

Expand All @@ -227,8 +227,8 @@ BANK = {

local xPlayer = ESX.GetPlayerFromId(playerId)
local identifier = xPlayer.getIdentifier()

MySQL.insert('INSERT INTO banking (identifier, label, type, amount, time, balance) VALUES (?, ?, ?, ?, ?, ?)',
{identifier,label,logType,amount, os.time() * 1000, bankMoney})
end
end
}
Loading