diff --git a/CHANGELOG.md b/CHANGELOG.md index faa1ef2..d1ee101 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # Changelog - + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [1.1.1] - 2024-10-11 + +Release of the internally named version 1.0, integrating with the real API. + + +### Added + +- Solutions modal images. + + +## [1.1.0] - 2024-10-10 + +Release of the internally named version 1.0, integrating with the real API. + + +### Added + +- [Sentry](https://sentry.io/) integration. +- Unit tests for: `utils/index.ts`, `TreatUnhandledRejection.ts` and `HomeView.vue` + +### Fixed + +- Error when trying to integrate or edit a solution integration when the globals were empty. ## [1.0.0] - 2024-10-04 @@ -14,3 +42,4 @@ Release of the internally named version 1.0, integrating with the real API. - [APIPhantom](https://github.com/weni-ai/APIPhantom) support. [1.0.0]: https://github.com/weni-ai/commerce-webapp/compare/0.1.3...1.0.0 +[1.1.0]: https://github.com/weni-ai/commerce-webapp/compare/1.0.0...1.1.0 diff --git a/env.d.ts b/env.d.ts index 7881d3d..2c534b3 100644 --- a/env.d.ts +++ b/env.d.ts @@ -5,6 +5,7 @@ declare global { declare const __APP_VERSION__: string; type Solution = { + version: string; uuid: string; title: string; description: string; @@ -12,6 +13,11 @@ declare global { tip: string; globals: { [key: string]: { value: string } }; sectors: { [key: string]: { value: string[] } }; + versions: { + version: string; + globals: { [key: string]: { value: string } }; + sectors: { [key: string]: { value: string[] } }; + }[]; }; } diff --git a/package.json b/package.json index 1b0f40e..2e04b85 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "commerce-webapp", - "version": "1.0.0", + "version": "1.1.1", "author": "Weni ", "private": true, "type": "module", diff --git a/src/api/solutions.ts b/src/api/solutions.ts index 00568a7..272ccb3 100644 --- a/src/api/solutions.ts +++ b/src/api/solutions.ts @@ -10,17 +10,23 @@ export default { }: { data: { results: { + version?: string; feature_uuid: string; description: string; disclaimer: string; documentation_url: string; globals?: string[]; - initial_flow: { + initial_flow?: { name: string; uuid: string; }[]; name: string; sectors: string[]; + versions?: { + version: string; + globals: string[]; + sectors: string[]; + }[]; }[]; }; } = await request.$http.get( @@ -28,6 +34,7 @@ export default { ); return data.results.map((solution) => ({ + version: solution.version || '', uuid: solution.feature_uuid, title: solution.name, description: solution.description, @@ -49,6 +56,27 @@ export default { }), {}, ), + versions: + solution.versions && + solution.versions.map((version) => ({ + version: version.version, + globals: (version.globals || []).reduce( + (previous, current) => ({ + ...previous, + [current]: { value: '' }, + }), + {}, + ), + sectors: version.sectors.reduce( + (previous, sectorName) => ({ + ...previous, + [sectorName]: { + value: [], + }, + }), + {}, + ), + })), })); }, diff --git a/src/components/solutions/DrawerSolution.vue b/src/components/solutions/DrawerSolution.vue index b43e2ec..3ff9a35 100644 --- a/src/components/solutions/DrawerSolution.vue +++ b/src/components/solutions/DrawerSolution.vue @@ -30,9 +30,9 @@
-