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 { Dialog, DialogBackdrop, DialogPanel, DialogTitle } from '@headlessui/react' | |
import { XMarkIcon } from '@heroicons/react/24/outline' | |
export default function DeleteProductModal() { | |
return ( | |
<div> | |
<Dialog open={true} onClose={() => {} } className="relative z-10"> | |
<DialogBackdrop | |
transition |
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
const body = { | |
title: input.title, | |
freshcoffee_categories: input.freshcoffee_category, | |
featured_media: input.featured_media, | |
status: 'publish', | |
...(input.variable_price === "true" ? { | |
acf: { | |
variable_price: input.variable_price, | |
small: { | |
size: 'Chico', |
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 { nullToEmptyString } from '@/utils' | |
import { z } from 'astro:schema' | |
const CommonFields = { | |
title: z.preprocess( | |
nullToEmptyString, | |
z.string().trim().min(1, { message: 'El Título no puede ir vacío' }), | |
), | |
featured_media: z.preprocess( | |
nullToEmptyString, |
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
<template> | |
<div class="col-span-full"> | |
<label for="price" class="block text-sm/6 font-medium text-gray-900"> | |
Precio del Producto: | |
</label> | |
<div class="mt-2"> | |
<input | |
id="price" | |
name="price" | |
type="number" |
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
<template> | |
<div class="grid max-w-2xl grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-6 md:col-span-2"> | |
<div class="col-span-full"> | |
<div class="mt-6 space-y-6"> | |
<div class="flex gap-3"> | |
<div class="flex h-6 shrink-0 items-center"> | |
<div class="group grid size-4 grid-cols-1"> | |
<input | |
id="variable_price" type="checkbox" aria-describedby="comments-description" |
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
<div className="col-span-full"> | |
<label | |
htmlFor="cover-photo" | |
className="block text-sm/6 font-medium text-gray-900">{label} | |
</label> | |
<div {...getRootProps({ | |
className: ` | |
mt-2 py-20 outline-1 outline-dashed -outline-offset-1 outline-gray-300 text-center | |
${isDragActive ? 'outline-gray-900 text-gray-900 bg-gray-200 ' : 'border-gray-400 text-gray-400 bg-white'} | |
${isDragReject ? 'border-none cursor-not-allowed' : ''} |
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 AdminLayout from "@/layouts/AdminLayout.astro"; | |
--- | |
<AdminLayout title='Nuevo Producto'> | |
<form class="mx-auto max-w-4xl"> | |
<!-- ProductForm --> | |
<div class="mt-6 flex items-center justify-end gap-x-6"> | |
<button | |
type="submit" |
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 AdminLayout from "./AdminLayout.astro"; | |
interface Props { | |
title: string | |
} | |
const { title} = Astro.props; | |
--- | |
<AdminLayout title={title}> | |
<slot name="before-products-table" /> |
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
<div className="p-5 shadow-lg space-y-5 border border-gray-200 "> | |
<div className='text-sm grid grid-cols-2 justify-between text-gray-600'> | |
<h2>ID Orden: <span className='font-black'></span></h2> | |
<p className='text-right'>Cliente: </p> | |
</div> | |
<div> | |
Contenido: | |
<div></div> | |
</div> |
NewerOlder