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.
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" / >
< Button type = "submit" > Submit < / B u t t o n >
< / F o r m C o n t r o l l e r >
< / >
)
}