2021-11-05 20:32:02 +00:00
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
|
|
|
import { __ } from '@wordpress/i18n';
|
2022-01-06 12:53:30 +00:00
|
|
|
import { getAdminLink } from '@woocommerce/settings';
|
2022-02-21 02:34:25 +00:00
|
|
|
import interpolateComponents from '@automattic/interpolate-components';
|
2021-11-05 20:32:02 +00:00
|
|
|
import { recordEvent } from '@woocommerce/tracks';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
|
|
|
import { PartnerCard } from '../components/partner-card';
|
2022-04-21 05:10:56 +00:00
|
|
|
import { TaxChildProps } from '../utils';
|
2021-11-05 20:32:02 +00:00
|
|
|
import logo from './logo.png';
|
|
|
|
|
2022-04-21 05:10:56 +00:00
|
|
|
export const Card: React.FC< TaxChildProps > = ( { task } ) => {
|
2022-04-21 04:44:19 +00:00
|
|
|
const { additionalData: { avalaraActivated } = {} } = task;
|
2021-11-05 20:32:02 +00:00
|
|
|
|
|
|
|
return (
|
|
|
|
<PartnerCard
|
2022-03-30 09:00:04 +00:00
|
|
|
name={ __( 'Avalara', 'woocommerce' ) }
|
2021-11-05 20:32:02 +00:00
|
|
|
logo={ logo }
|
2022-03-30 09:00:04 +00:00
|
|
|
description={ __( 'Powerful all-in-one tax tool', 'woocommerce' ) }
|
2021-11-05 20:32:02 +00:00
|
|
|
benefits={ [
|
2022-03-30 09:00:04 +00:00
|
|
|
__( 'Real-time sales tax calculation', 'woocommerce' ),
|
2021-11-05 20:32:02 +00:00
|
|
|
interpolateComponents( {
|
|
|
|
mixedString: __(
|
|
|
|
'{{strong}}Multi{{/strong}}-economic nexus compliance',
|
2022-03-30 09:00:04 +00:00
|
|
|
'woocommerce'
|
2021-11-05 20:32:02 +00:00
|
|
|
),
|
|
|
|
components: {
|
|
|
|
strong: <strong />,
|
|
|
|
},
|
|
|
|
} ),
|
|
|
|
__(
|
|
|
|
'Cross-border and multi-channel compliance',
|
2022-03-30 09:00:04 +00:00
|
|
|
'woocommerce'
|
2021-11-05 20:32:02 +00:00
|
|
|
),
|
2022-03-30 09:00:04 +00:00
|
|
|
__( 'Automate filing & remittance', 'woocommerce' ),
|
2021-11-05 20:32:02 +00:00
|
|
|
__(
|
|
|
|
'Return-ready, jurisdiction-level reporting.',
|
2022-03-30 09:00:04 +00:00
|
|
|
'woocommerce'
|
2021-11-05 20:32:02 +00:00
|
|
|
),
|
|
|
|
] }
|
2023-02-20 05:56:34 +00:00
|
|
|
terms={ '' }
|
2021-11-05 20:32:02 +00:00
|
|
|
actionText={
|
|
|
|
avalaraActivated
|
2022-03-30 09:00:04 +00:00
|
|
|
? __( 'Continue setup', 'woocommerce' )
|
2023-03-15 05:37:07 +00:00
|
|
|
: __( 'Download', 'woocommerce' )
|
2021-11-05 20:32:02 +00:00
|
|
|
}
|
|
|
|
onClick={ () => {
|
|
|
|
recordEvent( 'tasklist_tax_select_option', {
|
|
|
|
selected_option: 'avalara',
|
|
|
|
} );
|
|
|
|
|
|
|
|
if ( avalaraActivated ) {
|
|
|
|
window.location.href = getAdminLink(
|
|
|
|
'/admin.php?page=wc-settings&tab=tax§ion=avatax'
|
|
|
|
);
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
window.open(
|
|
|
|
new URL(
|
|
|
|
'https://woocommerce.com/products/woocommerce-avatax/'
|
2022-04-21 04:44:19 +00:00
|
|
|
).toString(),
|
2021-11-05 20:32:02 +00:00
|
|
|
'_blank'
|
|
|
|
);
|
|
|
|
} }
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
};
|