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 { Component, OnInit } from '@angular/core'; | |
import { trackFacebookPixelEvent, trackGoogleAdsConversion } from '@/utils'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.css'] | |
}) | |
export class AppComponent implements OnInit { |
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
image |
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
const checkImageSize = (imageRealWidth, imageRealHeight, minImageSize) => { | |
return imageRealWidth <= minImageSize || | |
imageRealHeight <= minImageSize || | |
imageRealWidth < imageWidth || | |
imageRealHeight < imageHeight | |
} | |
if (checkImageSize(imageRealWidth, imageRealHeight, minImageSize)) { | |
this.setState({ imageHideZoomIcon: true }) |
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 ComingSoon from './ComingSoon.vue'; | |
/* CUSTOMER */ | |
import Customer from './customer/Customer.vue'; | |
import CustomerList from './customer/CustomerList.vue'; | |
export const views = { | |
ComingSoon, | |
/* CUSTOMER */ | |
Customer, | |
CustomerList, |
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 Vue from 'vue'; | |
import Router from 'vue-router'; | |
import Main from './views/Main.vue'; | |
Vue.use(Router); | |
export default new Router({ | |
mode: 'history', | |
routes: [ | |
{ |
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
mapRoutes = [ | |
{ | |
link: 'customer', | |
name: 'Customer', | |
routes: [ | |
{ | |
link: 'customer', | |
name: 'Customer', | |
routes: [ | |
{ |
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
<template> | |
<transition> | |
<div class="spinner"> | |
<div class="bounce1"></div> | |
<div class="bounce2"></div> | |
<div class="bounce3"></div> | |
</div> | |
</transition> | |
</template> |
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
'use strict' | |
const AWS = require('aws-sdk') | |
const env = require('../../.env') | |
const formidable = require('formidable') | |
const fs = require('fs') | |
const sendErrorsFromDB = (res, dbErros) => { | |
const errors = [] | |
_.forIn(dbErros.errors, error => errors.push(error.message)) | |
return res.status(400).json({ errors }) |
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
Resource.after('get', (req, res, next) => { | |
const tmp = res.locals.bundle.title // Permita trocar os campos do título e do ano | |
res.locals.bundle.title = res.locals.bundle.year | |
res.locals.bundle.year = tmp | |
next() // Não se esqueça de ligar para a próxima! | |
}) | |
Resource.after('recommend', do_something) // Executa após todos os verbos HTTP |
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
Resource.route('moreinfo', { | |
detail: true, | |
handler: (req, res, next) => { | |
// req.params.id holds the resource's id | |
res.send("I'm at /resources/:id/moreinfo!") | |
} | |
}) |
NewerOlder