-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(commerce): adds mvp navigation mocked
- Loading branch information
1 parent
8bf973b
commit d6d4905
Showing
12 changed files
with
620 additions
and
377 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import { i18n } from '@/locales'; | ||
|
||
function sleep(timeInMs) { | ||
return new Promise((resolve) => { | ||
setTimeout(resolve, timeInMs); | ||
}); | ||
} | ||
|
||
export default { | ||
async listIntegratedByCategory({ category }) { | ||
await sleep(500); | ||
|
||
return [ | ||
// { | ||
// id: 'abandoned_cart', | ||
// title: i18n.global.t('solutions.abandoned_cart.title'), | ||
// description: i18n.global.t( | ||
// 'solutions.abandoned_cart.description', | ||
// ), | ||
// }, | ||
]; | ||
}, | ||
|
||
async listByCategory({ category }) { | ||
await sleep(500); | ||
|
||
if (category === 'active') { | ||
return [ | ||
{ | ||
id: 'abandoned_cart', | ||
title: i18n.global.t('solutions.abandoned_cart.title'), | ||
description: i18n.global.t('solutions.abandoned_cart.description'), | ||
}, | ||
{ | ||
id: 'order_status', | ||
title: i18n.global.t('solutions.order_status.title'), | ||
description: i18n.global.t('solutions.order_status.description'), | ||
}, | ||
{ | ||
id: 'recurring_purchase', | ||
title: i18n.global.t('solutions.recurring_purchase.title'), | ||
description: i18n.global.t( | ||
'solutions.recurring_purchase.description', | ||
), | ||
}, | ||
]; | ||
} else if (category === 'passive') { | ||
return [ | ||
{ | ||
id: 'order_status_passive', | ||
title: i18n.global.t('solutions.order_status_passive.title'), | ||
description: i18n.global.t( | ||
'solutions.order_status_passive.description', | ||
), | ||
}, | ||
{ | ||
id: 'refer_and_win', | ||
title: i18n.global.t('solutions.refer_and_win.title'), | ||
description: i18n.global.t('solutions.refer_and_win.description'), | ||
globals: [ | ||
'VTEX API App Key', | ||
'VTEX API App Token', | ||
'VTEX API App Key MD', | ||
'VTEX API App Token MD', | ||
'URL API Vtex', | ||
], | ||
}, | ||
]; | ||
} else { | ||
return []; | ||
} | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
src/components/solutions/SolutionsGroupSkeletonLoading.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<template> | ||
<section class="solutions__group"> | ||
<header class="solutions__header"> | ||
<UnnnicSkeletonLoading | ||
width="40px" | ||
height="40px" | ||
/> | ||
|
||
<UnnnicSkeletonLoading | ||
width="180px" | ||
height="28px" | ||
/> | ||
</header> | ||
|
||
<section class="solutions__list"> | ||
<UnnnicSkeletonLoading | ||
v-for="i in 4" | ||
:key="i" | ||
height="162px" | ||
/> | ||
</section> | ||
</section> | ||
</template> | ||
|
||
<style lang="scss" scoped> | ||
.solutions { | ||
&__group { | ||
display: flex; | ||
flex-direction: column; | ||
row-gap: $unnnic-spacing-sm; | ||
} | ||
&__header { | ||
display: flex; | ||
align-items: center; | ||
column-gap: $unnnic-spacing-sm; | ||
} | ||
&__list { | ||
display: grid; | ||
grid-template-columns: repeat( | ||
auto-fill, | ||
minmax(15.625 * $unnnic-font-size, 1fr) | ||
); | ||
gap: $unnnic-spacing-sm; | ||
} | ||
} | ||
</style> |
Oops, something went wrong.