Skip to content

Commit

Permalink
Merge pull request #35 from Fernando-Santana-j/main
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
Fernando-Santana-j authored Nov 7, 2024
2 parents 9b92417 + 6f7a971 commit 6ada1aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions Discord/discordIndex.js
Original file line number Diff line number Diff line change
Expand Up @@ -2149,13 +2149,12 @@ module.exports.sendProductPayment = async (params, id, type) => {

let productsName = []


let products = serverData.products
for (let index = 0; index < carrinho.length; index++) {
const element = carrinho[index];
var product = await products.find(product => product.productID == element.product)
var productIndex = await products.findIndex(product => product.productID == element.product)
const requestedQuantity = parseInt(element.quantidade);
const requestedQuantity = parseInt(element.quantidade) <= 0 ? 1 : parseInt(element.quantidade);
let typeProduct = 'typeProduct' in product ? product.typeProduct : 'normal'
productsName.push(`${product.productName} - ${element.quantidade}x`);

Expand All @@ -2173,10 +2172,7 @@ module.exports.sendProductPayment = async (params, id, type) => {
if (typeProduct == 'normal') {
try {
let itensCortados = await product.estoque.splice(0, requestedQuantity)
console.log(`itensCortados ${index}`,itensCortados);
let itens = itensCortados.map(item => item.conteudo)
console.log(`item${index}`,itens);

itens.forEach(item => {
arrayItensTxt.push(item[0].content)
})
Expand Down Expand Up @@ -2417,6 +2413,7 @@ module.exports.sendProductPayment = async (params, id, type) => {
} else {
refound()
}
carrinhos[params.userID] = []
try {
setTimeout(async () => {
var DiscordServer2 = await client.guilds.cache.get(params.serverID);
Expand Down
4 changes: 2 additions & 2 deletions views/reusable/header.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
</div>
</li>
</a>
<a href="/server/backups/<%= server.id %>" class="header-nav-list-link <%= index == 7 ? 'fixedHover' : '' %>">
<!-- <a href="/server/backups/<%#= server.id %>" class="header-nav-list-link <%#= index == 7 ? 'fixedHover' : '' %>">
<li class="header-nav-list-item">
<div class="list-item-icon flex-center">
<svg xmlns="http://www.w3.org/2000/svg" width="50" style="position: relative; left: -0.2em;" height="50" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" x="0" y="" viewBox="0 0 48 48" style="enable-background:new 0 0 512 512" xml:space="preserve" class=""><g><path d="M24.53 27.47a.763.763 0 0 0-1.06 0l-2 2a.75.75 0 0 0 1.06 1.06l.72-.72V34a.75.75 0 0 0 1.5 0v-4.19l.72.72a.768.768 0 0 0 1.06 0 .75.75 0 0 0 0-1.06z" fill="#ffffff" opacity="1" data-original="#000000" data-darkreader-inline-fill="" style="--darkreader-inline-fill: #181a1b;" class=""></path><path d="M36.5 13.25H22.93a.738.738 0 0 1-.67-.417L21.083 10.5a2.224 2.224 0 0 0-2.013-1.25H11.5a2.252 2.252 0 0 0-2.25 2.25v21a2.252 2.252 0 0 0 2.25 2.25h5.723a7.742 7.742 0 0 0 13.554 0H36.5a2.252 2.252 0 0 0 2.25-2.25v-17a2.252 2.252 0 0 0-2.25-2.25zm-12.5 24A6.25 6.25 0 1 1 30.25 31 6.257 6.257 0 0 1 24 37.25zm13.25-4.75a.75.75 0 0 1-.75.75h-5.086a7.75 7.75 0 1 0-14.828 0H11.5a.75.75 0 0 1-.75-.75v-21a.75.75 0 0 1 .75-.75h7.57a.738.738 0 0 1 .67.417l1.05 2.083H17a.75.75 0 0 0 0 1.5h19.5a.75.75 0 0 1 .75.75z" fill="#ffffff" opacity="1" data-original="#000000" data-darkreader-inline-fill="" style="--darkreader-inline-fill: #181a1b;" class=""></path></g></svg>
Expand All @@ -224,7 +224,7 @@
<div class="premium-idic"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0,0,256,256"><g fill="none" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><g transform="scale(5.33333,5.33333)"><path d="M36,36h-24l-5,-20l10,8l7,-13l7,13l10,-8z" fill="#f1b604"></path><path d="M12,36h24v5h-24zM24,7c-1.10457,0 -2,0.89543 -2,2c0,1.10457 0.89543,2 2,2c1.10457,0 2,-0.89543 2,-2c0,-1.10457 -0.89543,-2 -2,-2zM42,12c-1.10457,0 -2,0.89543 -2,2c0,1.10457 0.89543,2 2,2c1.10457,0 2,-0.89543 2,-2c0,-1.10457 -0.89543,-2 -2,-2zM6,12c-1.10457,0 -2,0.89543 -2,2c0,1.10457 0.89543,2 2,2c1.10457,0 2,-0.89543 2,-2c0,-1.10457 -0.89543,-2 -2,-2z" fill="#ff9800"></path></g></g></svg></div>
</div>
</li>
</a>
</a> -->
<!-- <a href="/server/cupom/<%#= server.id %>" class="header-nav-list-link <%#= index == 7 ? 'fixedHover' : '' %>">
<li class="header-nav-list-item">
<div class="list-item-icon flex-center">
Expand Down

0 comments on commit 6ada1aa

Please sign in to comment.