Skip to content

Instantly share code, notes, and snippets.

View iErik's full-sized avatar
🌀
Tapping keys

Erik Isidore iErik

🌀
Tapping keys
View GitHub Profile
import { shallowMount } from '@vue/test-utils'
import FAccordion from './FAccordion'
const WRAPPER_PROPS = { title: 'Test' }
describe('FAccordion tests', () => {
let WRAPPER
beforeEach(
() => (WRAPPER = shallowMount(FAccordion, { propsData: WRAPPER_PROPS }))
<template>
<section class="f-pagination">
<ul>
<li>
<button :disabled="isFirstPage" @click="jumpTo('first')">
Primeira
</button>
</li>
<li>
<button :disabled="isFirstPage" @click="jumpTo('prev')">
<template>
<ul :class="menuListClasses">
<li
v-for="(item, index) in items"
:key="item.id"
class="FMenuList__li"
>
<slot v-bind="{ item, index }">
</li>
</ul>
import { shallowMount } from '@vue/test-utils'
import FPagination from './FPagination'
const WRAPPER_PROPS = { currentPage: 1, total: 100, perPage: 6, max: 10 }
describe('FPaginantion tests', () => {
let WRAPPER
beforeEach(() => WRAPPER = shallowMount(FPagination, { propsData: WRAPPER_PROPS }))
show() {
const base = this.localCurrentPage
const max = this.max
const factor = Math.ceil(max / 2)
const pgFrom = (base - factor) || 1
const pgTo = base <= this.totalPages ? base + factor : this.totalPages
const result = Array.from({ length: max }, (e, i) =>

Currently, we're using two different folder structures for this SPA for each sub-project, one for the Payroll project and another for the Employee project. Although the folder structure used in Payroll is outdated and probably won't be there anytime soon. Both structures share a lot of similarities with each other.

In the Payroll project, we're currently following this structure:

src/

SAAS Admin SPA

Instalação

O único requisito é ter o Node.js versão 8 ou superior.

  1. Copie o conteúdo do arquivo .env.default para o .env e altere as configurações conforme a necessidade.

  2. Instale as dependências usando o Yarn.

const Collapsible = (refName = 'contentWrapper') => ({
data: () => ({
hideContents: false,
contentObs: null,
contentHeight: 0,
}),
mounted () {
this.$nextTick(() => {
if (!this.$refs[refName]) return
<template>
<c-card class="employee-info-card" no-border no-hover>
<div class="heading">
<slot>
<c-title class="title" :grey="isMobile && hideContents">
{{ title }}
</c-title>
<div class="actions">
<slot name="actions">
{"errors":[{"debugMessage":"Undefined property: stdClass::$city_external_id","message":"Internal server error","category":"internal","locations":[{"line":9,"column":3}],"path":["address","city"],"trace":[{"file":"\/srv\/release\/app\/Http\/GraphQL\/Resolvers\/DefaultConfigResolver.php","line":60,"call":"Illuminate\\Foundation\\Bootstrap\\HandleExceptions::handleError(8, 'Undefined property: stdClass::$city_external_id', '\/srv\/release\/app\/Http\/GraphQL\/Resolvers\/DefaultConfigResolver.php', 60, array(4))"},{"file":"\/srv\/release\/vendor\/nuwave\/lighthouse\/src\/Support\/helpers.php","line":151,"call":"App\\Http\\GraphQL\\Resolvers\\DefaultConfigResolver::city(instance of stdClass, array(1), instance of Nuwave\\Lighthouse\\Schema\\Context, instance of GraphQL\\Type\\Definition\\ResolveInfo)"},{"file":"\/srv\/release\/vendor\/nuwave\/lighthouse\/src\/Schema\/Directives\/Fields\/FieldDirective.php","line":63,"function":"{closure}(instance of stdClass, array(1), instance of Nuwave\\Lighthouse\\Schema\\Conte