This file contains 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 | |
/* Handle CORS */ | |
// Specify domains from which requests are allowed | |
header('Access-Control-Allow-Origin: *'); | |
// Specify which request methods are allowed | |
header('Access-Control-Allow-Methods: PUT, GET, POST, DELETE, OPTIONS'); |
This file contains 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
function dataURItoBlob(dataURI) { | |
var byteString = atob(dataURI.split(',')[1]); | |
var ab = new ArrayBuffer(byteString.length); | |
var ia = new Uint8Array(ab); | |
for (var i = 0; i < byteString.length; i++) { | |
ia[i] = byteString.charCodeAt(i); | |
} | |
return new Blob([ab], { type: 'image/jpeg' }); | |
} | |
function supportFile (){ |
This file contains 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
{ | |
"UF": [ | |
{"nome": "Acre", "sigla": "AC"}, | |
{"nome": "Alagoas", "sigla": "AL"}, | |
{"nome": "Amapá", "sigla": "AP"}, | |
{"nome": "Amazonas", "sigla": "AM"}, | |
{"nome": "Bahia", "sigla": "BA"}, | |
{"nome": "Ceará", "sigla": "CE"}, | |
{"nome": "Distrito Federal", "sigla": "DF"}, | |
{"nome": "Espírito Santo", "sigla": "ES"}, |
This file contains 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 { MatPaginatorIntl } from '@angular/material'; | |
const portugueseRangeLabel = (page: number, pageSize: number, length: number) => { | |
if (length === 0 || pageSize === 0) { return `0 de ${length}`; } | |
length = Math.max(length, 0); | |
const startIndex = page * pageSize; | |
const endIndex = startIndex < length ? |
This file contains 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
$('input[name="datetimes"]').daterangepicker({ | |
timePicker: true, | |
startDate: moment().startOf('hour'), | |
endDate: moment().startOf('hour').add(32, 'hour'), | |
locale: { | |
"format": 'DD/MM/YYYY hh:mm A', | |
"separator": '~', | |
"applyLabel": 'Confirmar', | |
"cancelLabel": 'Cancelar', | |
"daysOfWeek": [ |