Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

feat: Order details #277

Merged
merged 99 commits into from
Feb 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
0a4764d
add radix/popover
pKorsholm Jan 20, 2022
0b3aa89
date picker checkpoint
pKorsholm Jan 20, 2022
056393c
date picker styling
pKorsholm Jan 20, 2022
44dc2e6
number scroller for time picker
pKorsholm Jan 20, 2022
51eb56b
move date picker to atoms
pKorsholm Jan 20, 2022
cc3541b
utc formatting
pKorsholm Jan 20, 2022
e93001c
add popover
pKorsholm Jan 24, 2022
0a35b4a
Merge branch 'feat/revamp-date-picker' into feat/revamp-product-list
pKorsholm Jan 24, 2022
18850b7
make "CalendarComponent" available
pKorsholm Jan 24, 2022
a7c0b95
refactor filter dropdown
pKorsholm Jan 24, 2022
d4eecd6
update import and format
pKorsholm Jan 24, 2022
57eb5df
chevron up
pKorsholm Jan 24, 2022
df2e205
filter dropdown component
pKorsholm Jan 24, 2022
9bc01a3
Merge branch 'feat/revamp' into feat/revamp-product-list
pKorsholm Jan 24, 2022
5389d07
tag input and naming field
pKorsholm Jan 24, 2022
6a0dc9c
restructure filter dropdown for tag input
pKorsholm Jan 24, 2022
adf172e
styling
pKorsholm Jan 24, 2022
165fec1
open boolean
pKorsholm Jan 24, 2022
8307214
delete file
pKorsholm Jan 24, 2022
65904fd
initial product table
pKorsholm Jan 25, 2022
d8ccb97
add default status
pKorsholm Jan 25, 2022
adfe2f1
icons
pKorsholm Jan 25, 2022
195b4f2
table change
pKorsholm Jan 25, 2022
d7d30a0
pagination component
pKorsholm Jan 25, 2022
00b306a
add react-table
pKorsholm Jan 25, 2022
f225abe
cleanup
pKorsholm Jan 25, 2022
0a61296
product table filtering
pKorsholm Jan 25, 2022
938bb59
remove qs library
pKorsholm Jan 25, 2022
8a7f267
add debounce
pKorsholm Jan 25, 2022
e223a9b
merge feat/revamp
pKorsholm Jan 25, 2022
24ae2b0
make products index typescript
pKorsholm Jan 25, 2022
81723a2
fix imports
pKorsholm Jan 25, 2022
c810470
remove console.log
pKorsholm Jan 25, 2022
9bf8ab3
medusa-react and debounced search
pKorsholm Jan 25, 2022
3b63c50
clean up
pKorsholm Jan 25, 2022
308f07f
update status indicator import
pKorsholm Jan 25, 2022
4f621eb
fix input header props
pKorsholm Jan 26, 2022
c6662cf
camelCase properties of svg
pKorsholm Jan 26, 2022
aabff6e
adds order table
olivermrbl Jan 26, 2022
01b94ff
:rge branch 'feat/revamp' into feat/revamp-order-list
olivermrbl Jan 26, 2022
5ccbbbe
init work on filters
olivermrbl Jan 26, 2022
fcdf696
max height and scroll
pKorsholm Jan 26, 2022
188c0ff
fix merge conflicts
olivermrbl Jan 26, 2022
09b2eb7
fix merge conflicts from date picker
olivermrbl Jan 26, 2022
6099843
rounded corners
pKorsholm Jan 26, 2022
72bbad1
add status filters
olivermrbl Jan 26, 2022
0e308b2
Merge branch 'feat/revamp-filter-dropdown' into feat/revamp-order-list
olivermrbl Jan 26, 2022
579cb41
add poc order filters
olivermrbl Jan 26, 2022
bedecd9
Adds datefilter
olivermrbl Jan 26, 2022
2ed4926
merge feat/revamp
pKorsholm Jan 26, 2022
3d780b6
Adds functional date filter
olivermrbl Jan 26, 2022
32da9fb
fix merge conflicts
olivermrbl Jan 27, 2022
53be69f
Missing pageindex on load
olivermrbl Jan 27, 2022
089f190
Adds initial work on order overview
olivermrbl Jan 27, 2022
d25c0af
Finish first take on order overview (without timeline)
olivermrbl Jan 27, 2022
34a4d71
clean up
olivermrbl Jan 27, 2022
4cbdd47
custom actionables
kasperkristensen Jan 28, 2022
7ea9001
fix merge conflicts
olivermrbl Jan 28, 2022
3f6ce88
Adds more work
olivermrbl Jan 28, 2022
1f4f864
Finalizes first take on Order details overview
olivermrbl Jan 30, 2022
75dcec6
Adds address modal
olivermrbl Jan 30, 2022
6721b3a
init
kasperkristensen Feb 1, 2022
412f011
Merge branch 'feat/revamp' into feat/revamp-collection-details
kasperkristensen Feb 1, 2022
02ac03a
merged revamp
kasperkristensen Feb 1, 2022
a781dfc
merge feat/revamp
kasperkristensen Feb 1, 2022
bd13296
progress
kasperkristensen Feb 1, 2022
e3f87b2
fixed merge conflicts
olivermrbl Feb 1, 2022
9b1a457
created raw data component
kasperkristensen Feb 1, 2022
648c1e3
fix payment button
olivermrbl Feb 1, 2022
932f270
finalize component
kasperkristensen Feb 1, 2022
df756ef
fixed chevron icon
kasperkristensen Feb 1, 2022
afacd71
added optional name
kasperkristensen Feb 1, 2022
4c276fc
Merge branch 'feat/raw-data-component' into feat/revamp-collection-de…
kasperkristensen Feb 1, 2022
4946b04
init work on create fulfillment
olivermrbl Feb 1, 2022
edca547
progress on table
kasperkristensen Feb 2, 2022
a92ad34
progress on add product
kasperkristensen Feb 2, 2022
480ac31
commit changes
kasperkristensen Feb 2, 2022
bbdefc8
progress
kasperkristensen Feb 2, 2022
ee4eeb4
Merge branch 'feat/revamp' into feat/revamp-collection-details
kasperkristensen Feb 2, 2022
61f7eb0
fixed merge conflicts
olivermrbl Feb 2, 2022
d77c1b6
progress on modal
kasperkristensen Feb 2, 2022
d93c379
merge feat/revamp
kasperkristensen Feb 2, 2022
5b5fa54
add country select to address modal
olivermrbl Feb 2, 2022
2c6ffaf
add items to create fulfillment modal
olivermrbl Feb 2, 2022
c996929
push progress
kasperkristensen Feb 2, 2022
bbd2621
fix merge conflicts
olivermrbl Feb 2, 2022
c74f860
metadata
kasperkristensen Feb 2, 2022
16ea711
add metadata
olivermrbl Feb 2, 2022
5032564
Merge branch 'feat/revamp-collection-details' into feat/revamp-order-…
olivermrbl Feb 2, 2022
edfb2dd
Adds create fulfillment modal
olivermrbl Feb 2, 2022
abf8714
fix merge
olivermrbl Feb 2, 2022
673f052
Separate fulfillment items to own file
olivermrbl Feb 2, 2022
44fa016
adds OrderLine component
olivermrbl Feb 3, 2022
c447160
Update src/domain/orders/details/create-fulfillment/index.tsx
olivermrbl Feb 4, 2022
73a6b72
Add no notis to fulfillment modal
olivermrbl Feb 4, 2022
e2bbb15
Merge branch 'feat/revamp' into feat/revamp-order-overview
olivermrbl Feb 4, 2022
4a9c302
fix page number
olivermrbl Feb 4, 2022
3e93bb1
fix: prices + split components to /templates
srindom Feb 4, 2022
a9d8d1e
fix: show N/A if no phone
olivermrbl Feb 4, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions src/components/fundamentals/icons/cancel-icon/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import React from "react"
import IconProps from "../types/icon-type"

const CancelIcon: React.FC<IconProps> = ({
size = "16",
color = "currentColor",
...attributes
}) => {
return (
<svg
width={size}
height={size}
viewBox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...attributes}
>
<path
d="M10 17.5C14.1421 17.5 17.5 14.1421 17.5 10C17.5 5.85786 14.1421 2.5 10 2.5C5.85786 2.5 2.5 5.85786 2.5 10C2.5 14.1421 5.85786 17.5 10 17.5Z"
stroke={color}
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
/>
<path
d="M5 5L15 15"
stroke={color}
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
)
}

export default CancelIcon
36 changes: 36 additions & 0 deletions src/components/fundamentals/icons/corner-down-right-icon/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import React from "react"
import IconProps from "../types/icon-type"

const CornerDownRightIcon: React.FC<IconProps> = ({
size = "16",
color = "currentColor",
...attributes
}) => {
return (
<svg
width={size}
height={size}
viewBox="0 0 16 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...attributes}
>
<path
d="M10 6.66602L13.3333 9.99935L10 13.3327"
stroke={color}
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
/>
<path
d="M2.66797 2.66602V7.33268C2.66797 8.03993 2.94892 8.7182 3.44902 9.2183C3.94911 9.7184 4.62739 9.99935 5.33464 9.99935H13.3346"
stroke={color}
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
)
}

export default CornerDownRightIcon
50 changes: 50 additions & 0 deletions src/components/fundamentals/icons/package-icon/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import React from "react"
import IconProps from "../types/icon-type"

const PackageIcon: React.FC<IconProps> = ({
size = "16",
color = "currentColor",
...attributes
}) => {
return (
<svg
width={size}
height={size}
viewBox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...attributes}
>
<path
d="M13.3634 8.02713L6.73047 4.21289"
stroke={color}
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
/>
<path
d="M16.723 12.9577V6.98101C16.7228 6.71899 16.6536 6.46164 16.5225 6.23479C16.3913 6.00794 16.2029 5.81956 15.9759 5.68855L10.7463 2.70018C10.5192 2.56904 10.2615 2.5 9.99921 2.5C9.73692 2.5 9.47926 2.56904 9.25212 2.70018L4.02248 5.68855C3.79556 5.81956 3.60708 6.00794 3.47596 6.23479C3.34483 6.46164 3.27566 6.71899 3.27539 6.98101V12.9577C3.27566 13.2198 3.34483 13.4771 3.47596 13.704C3.60708 13.9308 3.79556 14.1192 4.02248 14.2502L9.25212 17.2386C9.47926 17.3697 9.73692 17.4388 9.99921 17.4388C10.2615 17.4388 10.5192 17.3697 10.7463 17.2386L15.9759 14.2502C16.2029 14.1192 16.3913 13.9308 16.5225 13.704C16.6536 13.4771 16.7228 13.2198 16.723 12.9577Z"
stroke={color}
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
/>
<path
d="M3.47852 6.2041L10.0006 9.97691L16.5227 6.2041"
stroke={color}
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
/>
<path
d="M10 17.5004V9.96973"
stroke={color}
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
)
}

export default PackageIcon
10 changes: 5 additions & 5 deletions src/components/molecules/actionables.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export type ActionType = {
label: string
onClick: (e: React.MouseEvent<HTMLButtonElement>) => void
variant?: "normal" | "danger"
icon: React.ReactNode
icon?: React.ReactNode
}

type ActionablesProps = {
Expand All @@ -26,11 +26,11 @@ const Actionables: React.FC<ActionablesProps> = ({
customTrigger,
forceDropdown = false,
}) => {
if (!actions?.length) {
if (!actions?.length && !customTrigger) {
return null
}

return actions.length > 1 || forceDropdown ? (
return actions?.length > 1 || forceDropdown ? (
<div>
<DropdownMenu.Root>
<DropdownMenu.Trigger asChild>
Expand Down Expand Up @@ -59,9 +59,9 @@ const Actionables: React.FC<ActionablesProps> = ({
variant="ghost"
size="small"
className={clsx("w-full justify-start", {
"text-rose-50": action.variant === "danger",
"text-rose-50": action?.variant === "danger",
})}
onClick={action.onClick}
onClick={action?.onClick}
>
{action.icon}
{action.label}
Expand Down
58 changes: 58 additions & 0 deletions src/components/molecules/indeterminate-checkbox/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import React, { forwardRef, useEffect, useRef } from "react"
import CheckIcon from "../../fundamentals/icons/check-icon"

interface Props {
indeterminate?: boolean
name: string
}

const useCombinedRefs = (...refs): React.MutableRefObject<any> => {
const targetRef = React.useRef()

React.useEffect(() => {
refs.forEach((ref) => {
if (!ref) {
return
}

if (typeof ref === "function") {
ref(targetRef.current)
} else {
ref.current = targetRef.current
}
})
}, [refs])

return targetRef
}

const IndeterminateCheckbox = forwardRef<HTMLInputElement, Props>(
({ indeterminate, ...rest }, ref: React.Ref<HTMLInputElement>) => {
const defaultRef = useRef(null)
const combinedRef = useCombinedRefs(ref, defaultRef)

useEffect(() => {
if (combinedRef?.current) {
combinedRef.current.indeterminate = indeterminate ?? false
}
}, [combinedRef, indeterminate])

return (
<div className="items-center h-full flex">
<div
onClick={() => combinedRef.current?.click()}
className={`w-5 h-5 flex justify-center text-grey-0 border-grey-30 border cursor-pointer rounded-base ${
combinedRef.current?.checked && "bg-violet-60"
}`}
>
<span className="self-center">
{combinedRef.current?.checked && <CheckIcon size={16} />}
</span>
</div>
<input type="checkbox" className="hidden" ref={combinedRef} {...rest} />
</div>
)
}
)

export default IndeterminateCheckbox
13 changes: 8 additions & 5 deletions src/components/molecules/view-raw/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React, { useState } from "react"
import ReactJson from "react-json-view"
import * as Collapsible from "@radix-ui/react-collapsible"
import ChevronDownIcon from "../../fundamentals/icons/chevron-down"
import Button from "../../fundamentals/button"
import clsx from "clsx"
import React, { useState } from "react"
import ReactJson from "react-json-view"
import useClipboard from "../../../hooks/use-clipboard"
import Button from "../../fundamentals/button"
import ChevronDownIcon from "../../fundamentals/icons/chevron-down"
import ClipboardCopyIcon from "../../fundamentals/icons/clipboard-copy-icon"

type ViewRawProps = {
Expand Down Expand Up @@ -63,7 +63,10 @@ const ViewRaw: React.FC<ViewRawProps> = ({ raw, title = "Data", name }) => {
variant="ghost"
size="small"
type="button"
onClick={handleCopy}
onClick={(e) => {
e.currentTarget.blur()
handleCopy()
}}
>
<ClipboardCopyIcon size={20} />
</Button>
Expand Down
20 changes: 0 additions & 20 deletions src/components/organisms/add-metadata/add-metadata.stories.tsx

This file was deleted.

117 changes: 0 additions & 117 deletions src/components/organisms/add-metadata/index.tsx

This file was deleted.

Loading