config.name},
+ {name: 'Value', extractor: config => config.value},
+ {name: '', extractor: config =>
+ config.href && (
+ Edit
+ )
+ }
+ ]}
+ rows={[
+ {id: 'tax', name: 'UT Tax Percent', value: parseFloat(config.default_tax_percent) + '%'},
+ {id: 'address', name: 'Shipping Source Address', value: (() => {
+ if(!config.shipping_from)
+ return 'Unset'
+
+ const {name, street1} = config.shipping_from
+ return `${name}, ${street1}`.slice(0, 20) + '...'
+ })(), href: '/admin/config/shipping'},
+ ]}
+ />
+ {config.modified_by && (
+
+ Config last modified on
+ {' ' + DateTime.fromISO(config.date_updated).setZone('local').toFormat('LLL dd, yyyy') + ' '}
+ by {config.modified_by.email}
+
+ )}
+
+ >
+ )
+}
\ No newline at end of file
diff --git a/pages/admin/config/shipping.js b/pages/admin/config/shipping.js
new file mode 100644
index 0000000..8b6bff6
--- /dev/null
+++ b/pages/admin/config/shipping.js
@@ -0,0 +1,32 @@
+import router from 'next/router'
+
+import ActionBar from '~/components/admin/actionBar'
+import {FormController, Input, Button} from '~/components/form'
+
+ShippingFrom.getInitialProps = async ({ctx: {axios}}) => {
+ const {data: {shipping_from: address}} = await axios.get(`/api/config`)
+ return {address}
+}
+
+export default function ShippingFrom({address}) {
+ const afterSave = () => {
+ router.push(`/admin/config`)
+ }
+
+ return (
+ <>
+
+
+ value.length > 0}/>
+ value.length > 0}/>
+
+ value.length > 0}/>
+ value.length > 0}/>
+ value.length > 0}/>
+ value.length > 0}/>
+ value.length > 0}/>
+
+
+ >
+ )
+}