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 | |
error_reporting(E_ALL); | |
ini_set('display_errors', 1); |
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
<template> | |
<q-table | |
row-key="key" | |
:data="table.data" | |
:columns="table.columns" | |
:pagination.sync="table.pagination" | |
> | |
<q-tr | |
slot="body" | |
slot-scope="props" |
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
const data = this.cliente | |
const counterRef = this.$firestore.collection('contadores').doc('clientes_motos') | |
const clientesRef = this.$firestore.collection('clientes/motos/activos') | |
return this.$firestore.runTransaction(transaction => { | |
return transaction.get(counterRef).then(counterDoc => { | |
if (!counterDoc.exists) { | |
throw new Error('No se encontró el contador de clientes') | |
} |
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 axios from 'axios' | |
const axiosInstance = axios.create({ | |
baseURL: process.env.API | |
}) | |
export default ({ Vue }) => { | |
Vue.prototype.$axios = axiosInstance | |
} |
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
/** | |
* @param data Object[] Ej.: [{ nombre: Marcelo, apellido: Forclaz }] | |
* @param fields Array Ej.: ['nombre', 'apellido'] | |
* @param columns Array Ej.: ['Nombre', 'Apellido'] | |
* @param filename String Ej.: 'archivo.csv' | |
* */ | |
const generateCsv = (data, fields, columns, filename) => { | |
let csv = 'data:text/csv;charset=utf-8,' | |
csv += '"' + columnNames.join('","') + '"\n'; |
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
const merged = [].concat.apply([], arrays) |
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 | |
error_reporting(E_ALL); | |
ini_set('display_errors', 1); | |
require 'vendor/phpmailer/phpmailer/src/Exception.php'; | |
require 'vendor/phpmailer/phpmailer/src/PHPMailer.php'; | |
require 'vendor/phpmailer/phpmailer/src/SMTP.php'; | |
use PHPMailer\PHPMailer\PHPMailer; | |
use PHPMailer\PHPMailer\Exception; |
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
<template> | |
<div> | |
<div v-if="!loading"> | |
<input | |
type="text" | |
:class="inputClass" | |
:placeholder="placeholder" | |
v-model="terms" | |
@focus="resetStatus" |
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
<template> | |
<div> | |
<q-input | |
:outlined="outlined" | |
:dense="dense" | |
:filled="filled" | |
:class="inputClass" | |
:label="label" | |
:value="value" | |
mask="##/##/####" |
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
await this.$axios({ | |
url: 'apiurl', | |
method: 'POST', | |
responseType: 'blob', | |
data: payload | |
}).then(res => { | |
const fileURL = URL.createObjectURL(res.data); | |
window.open(fileURL); | |
}) |