@@ -38,6 +38,7 @@ import { useComponentDictionary } from '@/i18n/I18n'
3838interface PaymentMethodProps extends CommonComponentInterface < 'Employee.PaymentMethod' > {
3939 employeeId : string
4040 defaultValues ?: never
41+ isAdmin ?: boolean
4142}
4243
4344export function PaymentMethod ( props : PaymentMethodProps & BaseComponentInterface ) {
@@ -48,7 +49,7 @@ export function PaymentMethod(props: PaymentMethodProps & BaseComponentInterface
4849 )
4950}
5051
51- const Root = ( { employeeId, className, dictionary } : PaymentMethodProps ) => {
52+ const Root = ( { employeeId, className, dictionary, isAdmin = false } : PaymentMethodProps ) => {
5253 useI18n ( 'Employee.PaymentMethod' )
5354 useComponentDictionary ( 'Employee.PaymentMethod' , dictionary )
5455 const { baseSubmitHandler, onEvent } = useBase ( )
@@ -239,6 +240,7 @@ const Root = ({ employeeId, className, dictionary }: PaymentMethodProps) => {
239240 handleAdd,
240241 handleDelete,
241242 handleSplit,
243+ isAdmin,
242244 } }
243245 >
244246 < FormProvider { ...formMethods } >
@@ -257,7 +259,7 @@ const Root = ({ employeeId, className, dictionary }: PaymentMethodProps) => {
257259}
258260
259261export const PaymentMethodContextual = ( ) => {
260- const { employeeId, onEvent } = useFlow < OnboardingContextInterface > ( )
262+ const { employeeId, onEvent, isAdmin } = useFlow < OnboardingContextInterface > ( )
261263 const { t } = useTranslation ( 'common' )
262264
263265 if ( ! employeeId ) {
@@ -269,5 +271,5 @@ export const PaymentMethodContextual = () => {
269271 } ) ,
270272 )
271273 }
272- return < PaymentMethod employeeId = { employeeId } onEvent = { onEvent } />
274+ return < PaymentMethod employeeId = { employeeId } onEvent = { onEvent } isAdmin = { isAdmin } />
273275}
0 commit comments