Skip to content

Commit

Permalink
feat: add company name
Browse files Browse the repository at this point in the history
  • Loading branch information
b3aton committed Nov 30, 2022
1 parent 9365900 commit 7b02b7e
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 14 deletions.
1 change: 0 additions & 1 deletion apps/storefront/src/components/B3TipsDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import React, {
import {
Box,
Button,
Typography,
} from '@mui/material'
import HighlightOffIcon from '@mui/icons-material/HighlightOff'
import CheckCircleOutlineIcon from '@mui/icons-material/CheckCircleOutline'
Expand Down
1 change: 0 additions & 1 deletion apps/storefront/src/components/filter/B3Filter.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {
useState,
ReactElement,
ReactNode,
} from 'react'
import {
Box,
Expand Down
3 changes: 2 additions & 1 deletion apps/storefront/src/pages/address/Address.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
import {
Pagination,
B3Table,
} from '@/components/B3Table'
} from '@/components/table/B3Table'
import {
B3Sping,
} from '@/components/spin/B3Sping'
Expand Down Expand Up @@ -331,6 +331,7 @@ const Address = () => {
onEdit={() => handleEdit(row)}
onDelete={handleDelete}
onSetDefault={handleSetDefault}
companyName={companyName}
editPermission={editPermission}
isBCPermission={isBCPermission}
/>
Expand Down
9 changes: 0 additions & 9 deletions apps/storefront/src/pages/address/components/AddressForm.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {
useEffect,
useContext,
useState,
forwardRef,
useImperativeHandle,
Expand Down Expand Up @@ -33,14 +32,6 @@ import {
snackbar,
} from '@/utils'

import {
GlobaledContext,
} from '@/shared/global'

import {
snackbar,
} from '@/utils'

import {
updateB2BAddress,
createB2BAddress,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export interface OrderItemCardProps {
onSetDefault: (data: AddressItemType) => void
editPermission: boolean
isBCPermission: boolean
companyName: string | number
}

interface TagBoxProps {
Expand Down Expand Up @@ -66,6 +67,7 @@ export const AddressItemCard = (props: OrderItemCardProps) => {
onSetDefault,
editPermission: hasPermission,
isBCPermission,
companyName,
} = props

const theme = useTheme()
Expand Down Expand Up @@ -114,7 +116,7 @@ export const AddressItemCard = (props: OrderItemCardProps) => {
<Typography variant="body1">
{`${addressInfo.firstName} ${addressInfo.lastName}`}
</Typography>
<Typography variant="body1">company name</Typography>
<Typography variant="body1">{(isBCPermission ? addressInfo.company : companyName) || ''}</Typography>
<Typography variant="body1">{addressInfo.addressLine1}</Typography>
<Typography variant="body1">{addressInfo.addressLine2}</Typography>
<Typography variant="body1">
Expand Down
2 changes: 1 addition & 1 deletion apps/storefront/src/types/address.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface AddressItemType {
isDefaultShipping?: number
isDefaultBilling?: number
bcAddressId?: number
company: string
company?: string
}

export interface BcAddressExtraFieldType {
Expand Down

0 comments on commit 7b02b7e

Please sign in to comment.