diff --git a/docu/Concepts/TechnicalRequirements/BusinessEventProtocol.md b/docu/Concepts/TechnicalRequirements/BusinessEventProtocol.md new file mode 100644 index 000000000..5a436d057 --- /dev/null +++ b/docu/Concepts/TechnicalRequirements/BusinessEventProtocol.md @@ -0,0 +1,81 @@ +# Business Event Protocol + +With the business event protocol the gradido application will capture and persist business information for future reports and statistics. The idea is to design and implement general functionality to capture and store business events. Each business event will be defined as a separate event type with its own business attributes. Each event type extends a basic event type to ensure a type safetiness with its mandatory and optional attributes. + +## EventType - Enum + +The different event types will be defined as Enum. The following list is a first draft and will grow with further event types in the future. + +| EventType | Value | Description | +| --------------------------- | ----- | ---------------------------------------------------------------------------------------------------- | +| BasicEvent | 0 | the basic event is the root of all further extending event types | +| VisitGradidoEvent | 10 | if a user visits a gradido page without login or register | +| RegisterEvent | 20 | the user presses the register button | +| RedeemRegisterEvent | 21 | the user presses the register button initiated by the redeem link | +| InActiveAccountEvent | 22 | the systems create an inactive account during the register process | +| SendConfirmEmailEvent | 23 | the system send a confirmation email to the user during the register process | +| ConfirmEmailEvent | 24 | the user confirms his email during the register process | +| RegisterEmailKlickTippEvent | 25 | the system registers the confirmed email at klicktipp | +| LoginEvent | 30 | the user presses the login button | +| RedeemLoginEvent | 31 | the user presses the login button initiated by the redeem link | +| ActivateAccountEvent | 32 | the system activates the users account during the first login process | +| PasswordChangeEvent | 33 | the user changes his password | +| TxSendEvent | 40 | the user creates a transaction and sends it online | +| TxSendRedeemEvent | 41 | the user creates a transaction and sends it per redeem link | +| TxRepeateRedeemEvent | 42 | the user recreates a redeem link of a still open transaction | +| TxCreationEvent | 50 | the user receives a creation transaction for his confirmed contribution | +| TxReceiveEvent | 51 | the user receives a transaction from an other user and posts the amount on his account | +| TxReceiveRedeemEvent | 52 | the user activates the redeem link and receives the transaction and posts the amount on his account | +| ContribCreateEvent | 60 | the user enters his contribution and asks for confirmation | +| ContribConfirmEvent | 61 | the user confirms a contribution of an other user (for future multi confirmation from several users) | +| | | | + +## EventProtocol - Entity + +The business events will be stored in database in the new table `EventProtocol`. The tabel will have the following attributes: + +| Attribute | Type | Description | +| ------------- | --------- | ------------------------------------------------------------------------------------------------ | +| id | int | technical unique key (from db sequence) | +| type | enum | type of event | +| createdAt | timestamp | timestamp the event occurs (not the time of writing) | +| userID | string | the user ID, who invokes the event | +| XuserID | string | the cross user ID, who is involved in the process like a tx-sender, contrib-receiver, ... | +| XcommunityID | string | the cross community ID, which is involved in the process like a tx-sender, contrib-receiver, ... | +| transactionID | int | the technical key of the transaction, which triggers the event | +| contribID | int | the technical key of the contribution, which triggers the event | +| amount | digital | the amount of gradido transferred by transaction, creation or redeem | + +## Event Types + +The following table lists for each event type the mandatory attributes, which have to be initialized at event occurence and to be written in the database event protocol table: + +| EventType | id | type | createdAt | userID | XuserID | XCommunityID | transactionID | contribID | amount | +| :-------------------------- | :-: | :--: | :-------: | :----: | :-----: | :----------: | :-----------: | :-------: | :----: | +| BasicEvent | x | x | x | | | | | | | +| VisitGradidoEvent | x | x | x | | | | | | | +| RegisterEvent | x | x | x | x | | | | | | +| RedeemRegisterEvent | x | x | x | x | | | | | | +| InActiveAccountEvent | x | x | x | x | | | | | | +| SendConfirmEmailEvent | x | x | x | x | | | | | | +| ConfirmEmailEvent | x | x | x | x | | | | | | +| RegisterEmailKlickTippEvent | x | x | x | x | | | | | | +| LoginEvent | x | x | x | x | | | | | | +| RedeemLoginEvent | x | x | x | x | | | | | | +| ActivateAccountEvent | x | x | x | x | | | | | | +| PasswordChangeEvent | x | x | x | x | | | | | | +| TxSendEvent | x | x | x | x | x | x | x | | x | +| TxSendRedeemEvent | x | x | x | x | x | x | x | | x | +| TxRepeateRedeemEvent | x | x | x | x | x | x | x | | x | +| TxCreationEvent | x | x | x | x | | | x | | x | +| TxReceiveEvent | x | x | x | x | x | x | x | | x | +| TxReceiveRedeemEvent | x | x | x | x | x | x | x | | x | +| ContribCreateEvent | x | x | x | x | | | | x | | +| ContribConfirmEvent | x | x | x | x | x | x | | x | | +| | | | | | | | | | | + +## Event creation + +The business logic needs a *general event creation* service/methode, which accepts as input one of the predefined event type objects. An event object have to be initialized with its mandatory attributes before it can be given as input parameters for event creation. The service maps the event object attributes to the database entity and writes a new entry in the `EventProtocol `table. + +At each specific location of the gradido business logic an event creation invocation has to be introduced manually, which matches the corresponding event type - see [EventType-Enum](#EventType-Enum) above. diff --git a/frontend/.eslintrc.js b/frontend/.eslintrc.js index 4e45ede62..5127fc1cc 100644 --- a/frontend/.eslintrc.js +++ b/frontend/.eslintrc.js @@ -50,6 +50,7 @@ module.exports = { '/time./', '/decay.types./', 'settings.password.resend_subtitle', + 'settings.password.reset', 'settings.password.reset-password.text', 'settings.password.set', 'settings.password.set-password.text', diff --git a/frontend/package.json b/frontend/package.json index 9d70ace58..68c4aca84 100755 --- a/frontend/package.json +++ b/frontend/package.json @@ -45,7 +45,6 @@ "jest": "^26.6.3", "jest-canvas-mock": "^2.3.1", "jest-environment-jsdom-sixteen": "^2.0.0", - "particles-bg-vue": "1.2.3", "portal-vue": "^2.1.7", "prettier": "^2.2.1", "qrcanvas-vue": "2.1.1", diff --git a/frontend/public/img/template/Blaetter.png b/frontend/public/img/template/Blaetter.png index af11b67f2..f54dde670 100644 Binary files a/frontend/public/img/template/Blaetter.png and b/frontend/public/img/template/Blaetter.png differ diff --git a/frontend/public/img/template/Foto_01_2400_small.jpg b/frontend/public/img/template/Foto_01_2400_small.jpg new file mode 100644 index 000000000..90b24d99a Binary files /dev/null and b/frontend/public/img/template/Foto_01_2400_small.jpg differ diff --git a/frontend/public/img/template/Foto_02_2400_small.jpg b/frontend/public/img/template/Foto_02_2400_small.jpg new file mode 100644 index 000000000..48489347f Binary files /dev/null and b/frontend/public/img/template/Foto_02_2400_small.jpg differ diff --git a/frontend/public/img/template/Foto_03_2400_small.jpg b/frontend/public/img/template/Foto_03_2400_small.jpg new file mode 100644 index 000000000..b6f6829c7 Binary files /dev/null and b/frontend/public/img/template/Foto_03_2400_small.jpg differ diff --git a/frontend/public/img/template/Foto_04_2400_small.jpg b/frontend/public/img/template/Foto_04_2400_small.jpg new file mode 100644 index 000000000..958824ddc Binary files /dev/null and b/frontend/public/img/template/Foto_04_2400_small.jpg differ diff --git a/frontend/src/App.spec.js b/frontend/src/App.spec.js new file mode 100644 index 000000000..79467e2a8 --- /dev/null +++ b/frontend/src/App.spec.js @@ -0,0 +1,61 @@ +import { mount, RouterLinkStub } from '@vue/test-utils' +import App from './App' + +const localVue = global.localVue +const mockStoreCommit = jest.fn() + +const stubs = { + RouterLink: RouterLinkStub, + RouterView: true, +} + +describe('App', () => { + const mocks = { + $i18n: { + locale: 'en', + }, + $t: jest.fn((t) => t), + $store: { + commit: mockStoreCommit, + state: { + token: null, + }, + }, + $route: { + meta: { + requiresAuth: false, + }, + }, + } + + let wrapper + + const Wrapper = () => { + return mount(App, { localVue, mocks, stubs }) + } + + describe('mount', () => { + beforeEach(() => { + wrapper = Wrapper() + }) + + it('renders the App', () => { + expect(wrapper.find('#app').exists()).toBe(true) + }) + + it('has a component AuthLayout', () => { + expect(wrapper.findComponent({ name: 'AuthLayout' }).exists()).toBe(true) + }) + + describe('route requires authorization', () => { + beforeEach(() => { + mocks.$route.meta.requiresAuth = true + wrapper = Wrapper() + }) + + it('has a component DashboardLayout', () => { + expect(wrapper.findComponent({ name: 'DashboardLayout' }).exists()).toBe(true) + }) + }) + }) +}) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index d7945ec69..b7d4d1154 100755 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -1,47 +1,49 @@ + diff --git a/frontend/src/assets/scss/custom/gradido-custom/_body.scss b/frontend/src/assets/scss/custom/gradido-custom/_body.scss index df8f91f5b..b45b24b18 100644 --- a/frontend/src/assets/scss/custom/gradido-custom/_body.scss +++ b/frontend/src/assets/scss/custom/gradido-custom/_body.scss @@ -1,4 +1,4 @@ // Body -$body-bg: #f8f9fe !default; +$body-bg: #fff !default; $body-color: $gray-700 !default; diff --git a/frontend/src/assets/scss/custom/gradido-custom/_custom-forms.scss b/frontend/src/assets/scss/custom/gradido-custom/_custom-forms.scss index 4fa437b38..0d9fb946e 100644 --- a/frontend/src/assets/scss/custom/gradido-custom/_custom-forms.scss +++ b/frontend/src/assets/scss/custom/gradido-custom/_custom-forms.scss @@ -16,7 +16,9 @@ $custom-control-indicator-active-bg: $component-active-bg !default; $custom-control-indicator-active-border-color: $component-active-border-color !default; $custom-control-indicator-active-box-shadow: $custom-control-indicator-box-shadow !default; $custom-control-indicator-checked-color: $component-active-color !default; -$custom-control-indicator-checked-bg: $component-active-bg !default; + +// $custom-control-indicator-checked-bg: $component-active-bg !default; +$custom-control-indicator-checked-bg: #047006 !default; $custom-control-indicator-checked-border-color: $component-active-border-color !default; $custom-control-indicator-checked-box-shadow: $custom-control-indicator-box-shadow !default; @@ -24,6 +26,8 @@ $custom-control-indicator-checked-box-shadow: $custom-control-indicator-box-shad $custom-control-indicator-checked-disabled-bg: theme-color("primary") !default; $custom-control-indicator-disabled-bg: $gray-200 !default; $custom-control-label-disabled-color: $gray-600 !default; -$custom-checkbox-indicator-border-radius: $border-radius-sm !default; + +// $custom-checkbox-indicator-border-radius: $border-radius-sm !default; +$custom-checkbox-indicator-border-radius: 50px !default; // $custom-checkbox-indicator-icon-checked: str-replace(url("data:image/svg+xml !default;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E"), "#", "%23") !default; diff --git a/frontend/src/assets/scss/custom/gradido-custom/_grid-breakpoint.scss b/frontend/src/assets/scss/custom/gradido-custom/_grid-breakpoint.scss index af4296cf6..b6dc059fb 100644 --- a/frontend/src/assets/scss/custom/gradido-custom/_grid-breakpoint.scss +++ b/frontend/src/assets/scss/custom/gradido-custom/_grid-breakpoint.scss @@ -4,7 +4,7 @@ $grid-breakpoints: ( xs: 0, sm: 576px, md: 768px, - lg: 992px, + lg: 1025px, xl: 1200px ); diff --git a/frontend/src/assets/scss/custom/gradido-custom/_sections.scss b/frontend/src/assets/scss/custom/gradido-custom/_sections.scss index df8f91f5b..f696cc4cd 100644 --- a/frontend/src/assets/scss/custom/gradido-custom/_sections.scss +++ b/frontend/src/assets/scss/custom/gradido-custom/_sections.scss @@ -1,4 +1,13 @@ -// Body +// Sections -$body-bg: #f8f9fe !default; -$body-color: $gray-700 !default; +// $section-colors: () !default; +// $section-colors: map-merge( +// ( +// "primary": $body-bg, +// "secondary": $secondary, +// "light": $gray-400, +// "dark": $dark, +// "darker": $darker +// ), +// $section-colors +// ); diff --git a/frontend/src/assets/scss/fonts/WorkSans-VariableFont_wght.ttf b/frontend/src/assets/scss/fonts/WorkSans-VariableFont_wght.ttf new file mode 100644 index 000000000..09829a516 Binary files /dev/null and b/frontend/src/assets/scss/fonts/WorkSans-VariableFont_wght.ttf differ diff --git a/frontend/src/assets/scss/gradido-template.scss b/frontend/src/assets/scss/gradido-template.scss new file mode 100644 index 000000000..97118ca2b --- /dev/null +++ b/frontend/src/assets/scss/gradido-template.scss @@ -0,0 +1,183 @@ +html, +body { + height: 100%; +} + +.pointer { + cursor: pointer; +} + +.c-grey { + color: #383838 !important; +} + +.c-blau { + color: #0e79bc !important; +} + +/* Navbar */ +a, +.navbar-light .navbar-nav .nav-link { + color: #047006; +} + +.navbar-light .navbar-nav .nav-link.active { + color: rgb(35 121 188 / 90%); +} + +.text-gradido { + color: rgb(249 205 105 / 100%); +} + +.gradient-gradido { + background-image: linear-gradient(146deg, rgb(220 167 44) 50%, rgb(197 141 56 / 100%) 100%); +} + +/* Button */ +.btn { + border-radius: 25px; + padding-right: 50px; + padding-left: 50px; +} + +.btn-gradido { + background-image: linear-gradient(146deg, rgb(220 167 44) 50%, rgb(197 141 56 / 100%) 100%); + background-size: auto; + background-position: 0% 0%; + background-repeat: repeat; + border-style: none; + box-shadow: 10px 10px 50px 10px rgb(56 56 56 / 31%); + color: #fff; +} + +.btn-gradido:hover { + color: #212529; +} + +.btn-gradido:focus { + outline: none; +} + +.btn-outline-gradido { + color: rgb(140 121 88); + border: 1px solid #f5b805; +} + +.form-control, +.custom-select { + border-radius: 17px; + height: 50px; +} + +.rounded-right { + border-top-right-radius: 17px !important; + border-bottom-right-radius: 17px !important; +} + +.alert-success { + background-color: #d4edda; + border-color: #c3e6cb; + color: #155724; +} + +.alert-danger { + color: #721c24; + background-color: #f8d7da; + border-color: #f5c6cb; +} + +.b-toast-danger .toast .toast-header { + color: #721c24; + background-color: rgb(248 215 218 / 85%); + border-bottom-color: rgb(245 198 203 / 85%); +} + +.b-toast-danger .toast .toast-body { + background-color: rgb(252 237 238 / 85%); + border-color: rgb(245 198 203 / 85%); + color: #721c24; +} + +.b-toast-success .toast .toast-header { + color: #155724; + background-color: rgb(212 237 218 / 58%); + border-bottom-color: rgb(195 230 203 / 85%); +} + +.b-toast-success .toast .toast-body { + color: #155724; + background-color: rgb(212 237 218 / 85%); + border-bottom-color: rgb(195 230 203 / 85%); +} + +// .btn-primary pim { +.btn-primary { + background-color: #5a7b02; + border-color: #5e72e4; +} + +.gradido-font-large { + font-size: large; + height: auto !important; +} + +.font2em { + font-size: 1.5em; +} + +.zindex10 { + z-index: 10; +} + +.zindex100 { + z-index: 100; +} + +.zindex1000 { + z-index: 1000; +} + +.zindex10000 { + z-index: 10000; +} + +.zindex100000 { + z-index: 100000; +} + +.gradido-global-color-blue { + color: #0e79bc; +} + +.gradido-global-color-accent { + color: #047006; +} + +.gradido-global-color-gray { + color: #858383; +} + +.gradido-custom-background { + background-color: #ebebeba3 !important; + border-radius: 25pt; +} + +.gradido-width-300 { + width: 300px; +} + +.gradido-width-96 { + width: 96%; +} + +.gradido-no-border-radius { + border-radius: 0; +} + +.gradido-no-border { + border: 0; +} + +.gradido-font-15rem { + font-size: 1.5rem; +} diff --git a/frontend/src/assets/scss/gradido.scss b/frontend/src/assets/scss/gradido.scss index 68577d0b5..7366eb466 100644 --- a/frontend/src/assets/scss/gradido.scss +++ b/frontend/src/assets/scss/gradido.scss @@ -51,165 +51,4 @@ // Bootstrap-vue (2.21.1) scss @import "~bootstrap-vue/src/index"; - -.alert-success { - color: #155724; - background-color: #d4edda; - border-color: #c3e6cb; -} - -.alert-danger { - color: #721c24; - background-color: #f8d7da; - border-color: #f5c6cb; -} - -.b-toast-danger .toast .toast-header { - color: #721c24; - background-color: rgb(248 215 218 / 85%); - border-bottom-color: rgb(245 198 203 / 85%); -} - -.b-toast-danger .toast .toast-body { - background-color: rgb(252 237 238 / 85%); - border-color: rgb(245 198 203 / 85%); - color: #721c24; -} - -.b-toast-success .toast .toast-header { - color: #155724; - background-color: rgb(212 237 218 / 58%); - border-bottom-color: rgb(195 230 203 / 85%); -} - -.b-toast-success .toast .toast-body { - color: #155724; - background-color: rgb(212 237 218 / 85%); - border-bottom-color: rgb(195 230 203 / 85%); -} - -// .btn-primary pim { -.btn-primary { - background-color: #5a7b02; - border-color: #5e72e4; -} - -.gradido-font-large { - font-size: large; - height: auto !important; -} - -a, -.copyright { - color: #5a7b02; -} - -.font12em { - font-size: 1.2em; -} - -.font2em { - font-size: 1.5em; -} - -.gradido-global-color-text { - color: #3d443b; -} - -.gradido-global-color-accent { - color: #047006; -} - -.gradido-global-color-6e0a9c9e { - color: #000; -} - -.gradido-global-color-2d0fb154 { - color: #047006; -} - -.gradido-global-color-16efe88c { - color: #7ebc55; -} - -.gradido-global-color-1939326 { - color: #f6fff6; -} - -.gradido-global-color-9d79fc1 { - color: #047006; -} - -.gradido-global-color-6347f4d { - color: #5a7b02; -} - -.gradido-global-color-4fbc19a { - color: #014034; -} - -.gradido-global-color-d341874 { - color: #b6d939; -} - -.gradido-global-color-619d338 { - color: #8ebfb1; -} - -.gradido-global-color-44819a9 { - color: #026873; -} - -.gradido-global-color-gray { - color: #858383; -} - -.gradido-custom-background { - background-color: #ebebeba3 !important; -} - -.gradido-shadow-inset { - box-shadow: inset 0.3em rgba(241 187 187 / 100%); -} - -.gradido-max-width { - width: 100%; -} - -.gradido-width-300 { - width: 300px; -} - -.gradido-absolute { - position: absolute; -} - -.gradido-width-95-absolute { - width: 95%; - position: absolute; -} - -.gradido-width-96-absolute { - width: 96%; - position: absolute; -} - -.gradido-no-border-radius { - border-radius: 0; -} - -.gradido-no-border { - border: 0; -} - -.gradido-background-f1 { - background-color: #f1f1f1; -} - -.gradido-background-white { - background-color: #fff; -} - -.gradido-font-15rem { - font-size: 1.5rem; -} +@import "gradido-template"; diff --git a/frontend/src/components/Auth/Carousel.vue b/frontend/src/components/Auth/Carousel.vue new file mode 100644 index 000000000..d46352c59 --- /dev/null +++ b/frontend/src/components/Auth/Carousel.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/frontend/src/components/Auth/Footer.vue b/frontend/src/components/Auth/Footer.vue new file mode 100644 index 000000000..02268f4f6 --- /dev/null +++ b/frontend/src/components/Auth/Footer.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/frontend/src/components/Auth/MobileStart.vue b/frontend/src/components/Auth/MobileStart.vue new file mode 100644 index 000000000..b6bfcbc2d --- /dev/null +++ b/frontend/src/components/Auth/MobileStart.vue @@ -0,0 +1,124 @@ + + + + + diff --git a/frontend/src/components/Auth/Navbar.vue b/frontend/src/components/Auth/Navbar.vue new file mode 100644 index 000000000..ffef864fe --- /dev/null +++ b/frontend/src/components/Auth/Navbar.vue @@ -0,0 +1,73 @@ + + + + + diff --git a/frontend/src/components/Auth/NavbarSmall.vue b/frontend/src/components/Auth/NavbarSmall.vue new file mode 100644 index 000000000..1bb06b481 --- /dev/null +++ b/frontend/src/components/Auth/NavbarSmall.vue @@ -0,0 +1,17 @@ + + + diff --git a/frontend/src/components/DecayInformations/CollapseLinksList.vue b/frontend/src/components/DecayInformations/CollapseLinksList.vue index 0c1db5f0a..ce742e66e 100644 --- a/frontend/src/components/DecayInformations/CollapseLinksList.vue +++ b/frontend/src/components/DecayInformations/CollapseLinksList.vue @@ -1,7 +1,7 @@ + + diff --git a/frontend/src/components/Menu/Navbar.vue b/frontend/src/components/Menu/Navbar.vue index f998783f7..2f26f381e 100644 --- a/frontend/src/components/Menu/Navbar.vue +++ b/frontend/src/components/Menu/Navbar.vue @@ -1,5 +1,5 @@