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
# Server | |
API_LOCAL_BASE_URL=http://localhost:3000/api | |
API_BASE_URL=https://api.parceiros.sistematodos.com.br/v1/filiado | |
API_USER=mgm | |
API_PASSWORD=30TMwQ2bea7f | |
API_AUTH_BASE_URL=https://wallet-homolog.maistodos.com.br/api/v1/member-get-member/auth | |
API_AUTH_USER=cdt-mgm | |
API_AUTH_PASSWORD=5069g2zpz31qbhbysicbuncjfbmiimwgs9ex9nodll7i93afycdh7iffm259ggma | |
API_KEY=apikeyUNIzsmpFfh1sfleSCh-E1U_lV1mlNBKNiLbG2LXW__21Jmg8FuL3ciKpmskRl_hh3tmHzgjLQ3ahHz-dpM6yGg | |
FERNET_KEY=qltrY4rh25bHsAgGSqgh3EBhrHgELCtH4lrNzADxVK8= |
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
export type RequestParams = Record<string, string | number>; | |
export type RequestHeaders = Record<string, string>; | |
export interface HttpClient { | |
request<T>(url: string, options: RequestOptions): Promise<T>; | |
} | |
export interface RequestOptions { | |
method?: string; | |
headers?: RequestHeaders; |
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
{ | |
"emulator.simulatorPath": "/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app", | |
"update.mode": "manual", | |
"breadcrumbs.enabled": false, | |
"editor.defaultFormatter": "dbaeumer.vscode-eslint", | |
"emmet.syntaxProfiles": { | |
"javascript": "jsx" | |
}, | |
"editor.fontSize": 16, | |
"javascript.suggest.autoImports": true, |
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 { useState } from 'react' | |
function hexToRgba(hex: string, opacity: number) { | |
hex = hex.replace('#', '') | |
const r = parseInt(hex.substring(0, 2), 16) | |
const g = parseInt(hex.substring(2, 4), 16) | |
const b = parseInt(hex.substring(4, 6), 16) | |
return `rgba(${r}, ${g}, ${b}, ${opacity})` | |
} |
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 { HTMLAttributes } from 'react' | |
import { twMerge } from 'tailwind-merge' | |
export const Typography = { | |
H1: ({ | |
children, | |
className, | |
...rest | |
}: HTMLAttributes<HTMLHeadingElement>) => ( | |
<h1 |
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
/* eslint-disable no-undef */ | |
import { env } from '@/env' | |
import { buildColor } from '@/utils/build-color' | |
import { mapDarkStyle } from '@/utils/map-dark-style' | |
import { mapHiddenStyle } from '@/utils/map-hidden-style' | |
import { Loader, LoaderOptions } from '@googlemaps/js-api-loader' | |
import MarkerClusterer from '@googlemaps/markerclustererplus' | |
export class Map { | |
private mapInstance: google.maps.Map | null = null |
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
'use client' | |
import * as React from 'react' | |
import { Drawer as DrawerPrimitive } from 'vaul' | |
import { cn } from '@/lib/utils/ui' | |
const DrawerContext = React.createContext<{ | |
direction?: 'top' | 'bottom' | 'right' | 'left' | |
}>({}) |
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"; | |
export default { | |
async afterCreate(event) { | |
const routeId = event.result.id; | |
const address = event.result.startingAddress; | |
const coordinates = await strapi | |
.service("api::route.route") | |
.getCoordinates(routeId); |
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
async function handleEditClient(data: Client) { | |
const url = `${process.env.NEXT_PUBLIC_API_URL}/clients/${rowsIds[0]}` | |
const body = { | |
data: { | |
email: data.email, | |
name: data.name, | |
phone: data.phone, | |
address: { | |
cep: data.cep, |
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
export default (plugin) => { | |
plugin.controllers.user.userExists = async (ctx) => { | |
const baseUrl = '/api/user-exists/' | |
const username = ctx.request.url.slice(baseUrl.length).toLowerCase() | |
const response = await strapi.entityService.findMany('admin::user', { | |
filters: { | |
username: username, | |
isActive: true, | |
blocked: false | |
} |
NewerOlder