Skip to content

Instantly share code, notes, and snippets.

View dansp89's full-sized avatar

DanSP dansp89

View GitHub Profile
// src/stores/useCartStore.ts
import { empty, productSingleImage } from "@/core/helpers/functions";
import ApiService from "@/core/services/ApiService";
import { defineStore } from "pinia";
// Definindo a interface Product baseada na descrição fornecida
interface MediaData {
// Defina os campos da mídia aqui se necessário
}
@dansp89
dansp89 / Tabelas.vue
Created March 3, 2024 19:27
Coluna 'Actions' não está renderizando
<template>
<!--begin::Card-->
<div class="card">
<!--begin::Card header-->
<div class="card-header border-0 pt-6">
<!--begin::Card title-->
<div class="card-title">
<!--begin::Search-->
<div class="d-flex align-items-center position-relative my-1">
<KTIcon icon-name="magnifier" icon-class="fs-1 position-absolute ms-6" />
@dansp89
dansp89 / Drav-TEMP.vue
Last active February 29, 2024 21:32
Apagar depois
<template>
<el-upload
v-model:file-list="fileList"
class="photo-wall-uploader"
:list-type="listType"
:drag="true"
:name="name"
:action="uploadMetas.url"
:method="uploadMetas.method"
:headers="uploadMetas.headers"
@dansp89
dansp89 / CourseContent-Para-ajustes.vue
Created February 29, 2024 14:31
Para ajustar, apagar depois
<template>
<div @update:modelValue="$emit('update:modelValue', $event)">
<el-button
type=""
@click="addModule"
class="mb-5 border-bottom border-secondary"
>
<i class="fa-solid fa-plus text-dark px-3"></i>
Adicionar Módulo
</el-button>
@dansp89
dansp89 / ContentCourse-integrado.vue
Created February 29, 2024 12:48
Componente VUE3 para criar Gestão de aulas, Módulos - Aulas,
<template>
<div @update:modelValue="$emit('update:modelValue', $event)">
<el-button
type=""
@click="addModule"
class="mb-5 border-bottom border-secondary"
>
<i class="fa-solid fa-plus text-dark px-3"></i>
Adicionar Módulo
</el-button>
@dansp89
dansp89 / ContentCourse-estatic.vue
Last active February 29, 2024 12:47
Componente VUE3 para criar Gestão de aulas, Módulos - Aulas,
<template>
<el-button type="primary" @click="addModule">Adicionar Módulo</el-button>
<el-tree
:data="treeData"
draggable
default-expand-all
node-key="id"
:allow-drag="allowDrag"
:allow-drop="allowDrop"
@node-drag-start="handleDragStart"
@dansp89
dansp89 / cpu.json
Created February 18, 2024 02:10
CPU to miner
[
"Athlon 3000G",
"Ryzen 3 1200",
"Ryzen 3 2200G",
"Ryzen 3 3100",
"Ryzen 5 1400",
"Ryzen 5 1600",
"Ryzen 5 3500X",
"Ryzen 5 3600",
"Ryzen 5 3600X",
@dansp89
dansp89 / menu.ts
Created February 6, 2024 23:39
Modelo a ser gerado de menu
{
pages: [
{
heading: "dashboard",
route: "/dashboard",
keenthemesIcon: "element-11",
bootstrapIcon: "bi-app-indicator",
},
{
heading: "layoutBuilder",
@dansp89
dansp89 / rotas.ts
Last active February 7, 2024 00:19
Rotas v3
import {
createRouter,
createWebHistory,
type RouteRecordRaw,
} from "vue-router";
import { useAuthStore } from "@/stores/auth";
import { useConfigStore } from "@/stores/config";
import { filterRoutesByRole } from "@/core/plugins/ManagerAccessDashboard";
export let routes: Array<RouteRecordRaw> = [
@dansp89
dansp89 / 000-readme.me
Last active January 30, 2024 00:00
STRAPI 4 - Add custom routes and also add to the SWAGGER documentation.
> With this code, you can add your custom routes in swagger, read the documentation if you have any further questions.
## Tested on:
1. Node 18.17.1
1. Strapi 4.15.5
1. Language: Typescript