Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Erik Isidore iErik

🏠
Working from home
Block or report user

Report or block iErik

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View FPagination.spec.js
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 }))
View FPagination.js
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) =>
View Folder Structure.md

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/
View Readme.md

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.

View Collapsible.js
const Collapsible = (refName = 'contentWrapper') => ({
data: () => ({
hideContents: false,
contentObs: null,
contentHeight: 0,
}),
mounted () {
this.$nextTick(() => {
if (!this.$refs[refName]) return
View InfoCard.vue
<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">
View AddressError.json
{"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
View UnionContributioError.json
{"errors":[{"debugMessage":"Class App\\Services\\RpcService does not exist","message":"Internal server error","category":"internal","locations":[{"line":4,"column":3}],"path":["unionContributions",0,"syndicate"],"trace":[{"file":"\/srv\/release\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/Container.php","line":767,"call":"ReflectionClass::__construct('App\\Services\\RpcService')"},{"file":"\/srv\/release\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/Container.php","line":646,"call":"Illuminate\\Container\\Container::build('App\\Services\\RpcService')"},{"file":"\/srv\/release\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/Container.php","line":601,"call":"Illuminate\\Container\\Container::resolve('App\\Services\\RpcService', array(0))"},{"file":"\/srv\/release\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Application.php","line":734,"call":"Illuminate\\Container\\Container::make('App\\Services\\RpcService', array(0))"},{"file":"\/srv\/release\/vendor\/laravel\/fram
View CSelect.vue
<template>
<c-input-container
v-click-outside="close"
:class="containerClasses"
:style="{ '--options-length': (computedOptions || []).length }"
v-bind="containerAttributes"
@click.native="opened = !opened"
>
<select
v-if="mobileNative || nativeCompatible"
View DocumentsService.js
import request from '@Employee:graphql'
import * as get from '@Employee:graphql/queries'
import * as set from '@Employee:graphql/mutations'
import * as mappers from './mappers'
import * as formatters from './formatters'
/**
* Getters
You can’t perform that action at this time.