You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
1.1 KiB
JavaScript

import React, {useState} from 'react'
import Router from 'next/router'
import ActionBar from '~/components/admin/actionBar'
import {FormController, DateInput, TextArea, Button} from '~/components/form'
EnterDelivery.getInitialProps = async ({ctx: {query: {id}}}) => {
return {uuid: id}
}
export default function EnterDelivery({uuid}){
return (
<>
<ActionBar title="Mark Delivered"/>
<FormController afterSubmit={() => Router.push(`/admin/orders/${uuid}`)} url={`/api/orders/${uuid}/ship/delivery`}>
<p>Use this to enter delivery information for packages delivered in-person or at a con.</p>
<p>In case we ever have future corespondence with this person, please be sure to describe where, when, and to who you gave the package.</p>
<TextArea label="Description" validate={val => val.length > 0} type="text" name="description" hint="Please describe how and where you delivered the order to them" />
<DateInput label="Delivery Date" placeholder="Today" name="date" maxDate={new Date()} />
<Button type="submit">Submit</Button>
</FormController>
</>
)
}