This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Verifica se o Cliente tem débitos em aberto e retorna um alerta textual, se aplicável. | |
* | |
* @return string|null | |
**/ | |
public function hasDebitosPendentes(): ?string | |
{ | |
$results = $this->getDebitosPendentes(); | |
if ($results->isEmpty()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Services\Business; | |
use App\Enums\Business\BusinessBalanceAdjustmentTransactionTypeEnum; | |
use App\Enums\Business\BusinessBalanceAdjustmentTypeEnum; | |
use App\Enums\User\UserStatusEnum; | |
use App\Helpers\VegaUtils; | |
use App\Http\Resources\Business\BusinessBalanceAdjustmentResource; | |
use App\Http\Resources\Gateways\InternalGatewayResource; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function importar() | |
{ | |
// Carrega o model Sellin | |
$this->loadModel('Sellin'); | |
// Verifica se o formulário foi submetido | |
if ($this->request->is('post')) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function importar() | |
{ | |
// Carrega o model Sellin | |
$this->loadModel('Sellin'); | |
// Verifica se o formulário foi submetido | |
if ($this->request->is('post')) { | |
// Obtém o arquivo enviado |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { createContext, useState, useContext } from "react"; | |
// Crie o contexto | |
const OrganizationContext = createContext(); | |
// Crie um componente Provider | |
export function OrganizationProvider({ children }) { | |
const [selectedOrganization, setSelectedOrganization] = useState(""); | |
return ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState, useEffect } from "react"; | |
import { Select, Space } from "antd"; | |
import axios from "axios"; | |
import { useOrganization } from "@/Contexts/OrganizationContext"; | |
import toastr from "toastr"; | |
type Organization = { | |
id: number; | |
name: string; | |
created_at: string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Estou tentando utilizar uma API para se conectar com vários bancos diferentes, ela utiliza o Sanctum para autenticação. Em cada banco de dados diferente, tem a tabela 'personal_access_tokens' onde tem o token de autenticação do usuário. | |
Para se autenticar, preciso passar o nome da conexão através da URL dessa maneira: | |
Route::post('/auth/{connection}', [AuthController::class, 'getToken']); | |
E no AuthController está assim: | |
<?php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState, useEffect, FormEventHandler } from "react"; | |
import GuestLayout from "@/Layouts/GuestLayout"; | |
import InputError from "@/Components/InputError"; | |
import InputLabel from "@/Components/InputLabel"; | |
import PrimaryButton from "@/Components/PrimaryButton"; | |
import TextInput from "@/Components/TextInput"; | |
import { Head, Link, useForm } from "@inertiajs/react"; | |
import { Checkbox, Select, Space } from "antd"; | |
import type { CheckboxChangeEvent } from "antd/es/checkbox"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header("Access-Control-Allow-Origin: *"); | |
require_once 'config/config.php'; | |
require_once 'config/ConexaoCR.php'; | |
function dd($var) | |
{ | |
echo "<pre>"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
function showNotificationModal() { | |
// Se o usuário já tiver com as notificações permitidas, não exiba a modal | |
if (Notification.permission === "granted") { | |
$("#notificationModal").hide(); | |
} else { | |
setTimeout(function() { | |
$("#notificationModal").fadeIn(); | |
}, 5000); |
NewerOlder