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';
|
|
|
|
import logo from './logo.png';
|
|
|
|
|
2021-11-15 20:09:02 +00:00
|
|
|
export const Card = ( { task } ) => {
|
2021-11-09 12:42:33 +00:00
|
|
|
const { avalaraActivated } = task.additionalData;
|
2021-11-05 20:32:02 +00:00
|
|
|
|
|
|
|
return (
|
|
|
|
<PartnerCard
|
|
|
|
name={ __( 'Avalara', 'woocommerce-admin' ) }
|
|
|
|
logo={ logo }
|
|
|
|
description={ __(
|
|
|
|
'Powerful all-in-one tax tool',
|
|
|
|
'woocommerce-admin'
|
|
|
|
) }
|
|
|
|
benefits={ [
|
|
|
|
__( 'Real-time sales tax calculation', 'woocommerce-admin' ),
|
|
|
|
interpolateComponents( {
|
|
|
|
mixedString: __(
|
|
|
|
'{{strong}}Multi{{/strong}}-economic nexus compliance',
|
|
|
|
'woocommerce-admin'
|
|
|
|
),
|
|
|
|
components: {
|
|
|
|
strong: <strong />,
|
|
|
|
},
|
|
|
|
} ),
|
|
|
|
__(
|
|
|
|
'Cross-border and multi-channel compliance',
|
|
|
|
'woocommerce-admin'
|
|
|
|
),
|
|
|
|
__( 'Automate filing & remittance', 'woocommerce-admin' ),
|
|
|
|
__(
|
|
|
|
'Return-ready, jurisdiction-level reporting.',
|
|
|
|
'woocommerce-admin'
|
|
|
|
),
|
|
|
|
] }
|
|
|
|
terms={ __(
|
|
|
|
'30-day free trial. No credit card needed.',
|
|
|
|
'woocommerce-admin'
|
|
|
|
) }
|
|
|
|
actionText={
|
|
|
|
avalaraActivated
|
|
|
|
? __( 'Continue setup', 'woocommerce-admin' )
|
|
|
|
: __( 'Enable & set up', 'woocommerce-admin' )
|
|
|
|
}
|
|
|
|
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/'
|
|
|
|
),
|
|
|
|
'_blank'
|
|
|
|
);
|
|
|
|
} }
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
};
|