feat(medusa,dashboard,tax): added tax rates and regions UI (#7026)

whats missing:

- make rules required for overrides
- conditions for other rules
- populating condition reference ids with labels on update

Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
This commit is contained in:
Riqwan Thamir
2024-04-16 10:26:12 +02:00
committed by GitHub
parent 92b633d1cb
commit 00e6b21bb5
77 changed files with 3654 additions and 104 deletions
@@ -0,0 +1,11 @@
import format from "date-fns/format"
export function formatDate(date: string | Date) {
const value = new Date(date)
value.setMinutes(value.getMinutes() - value.getTimezoneOffset())
const hour12 = Intl.DateTimeFormat().resolvedOptions().hour12
const timestampFormat = hour12 ? "dd MMM yyyy hh:MM a" : "dd MMM yyyy HH:MM"
return format(value, timestampFormat)
}