-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from PrestaShopCorp/feature/install-event-bus
Account - Event bus not installed & update Ps Account module alert component
- Loading branch information
Showing
12 changed files
with
3,122 additions
and
2,390 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
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 |
---|---|---|
|
@@ -71,7 +71,15 @@ Once integrated, the component can show different cases: | |
onboardingLink: 'http://perdu.com', | ||
superAdminEmail: '[email protected]', | ||
ssoResendVerificationEmail: 'http://perdu.com', | ||
manageAccountLink: 'http://perdu.com' | ||
manageAccountLink: 'http://perdu.com', | ||
dependencies: { | ||
"ps_eventbus": { | ||
"enableLink": "http://localhost:80/admin-dev/index.php/improve/modules/manage/action/enable/ps_eventbus?_token=up_TmQFm66p9dwunsmfNzk2UfDD3a8tsxdW5a7KviKw", | ||
"installLink": "http://localhost:80/admin-dev/index.php/improve/modules/manage/action/install/ps_eventbus?_token=up_TmQFm66p9dwunsmfNzk2UfDD3a8tsxdW5a7KviKw", | ||
"isEnabled": true, | ||
"isInstalled": true, | ||
}, | ||
}, | ||
}) | ||
}, | ||
}, | ||
|
@@ -126,7 +134,15 @@ If the shop is in a multi-store context, the user will have a selector like this | |
onboardingLink: 'http://perdu.com', | ||
superAdminEmail: '[email protected]', | ||
ssoResendVerificationEmail: 'http://perdu.com', | ||
manageAccountLink: 'http://perdu.com' | ||
manageAccountLink: 'http://perdu.com', | ||
dependencies: { | ||
"ps_eventbus": { | ||
"enableLink": "http://localhost:80/admin-dev/index.php/improve/modules/manage/action/enable/ps_eventbus?_token=up_TmQFm66p9dwunsmfNzk2UfDD3a8tsxdW5a7KviKw", | ||
"installLink": "http://localhost:80/admin-dev/index.php/improve/modules/manage/action/install/ps_eventbus?_token=up_TmQFm66p9dwunsmfNzk2UfDD3a8tsxdW5a7KviKw", | ||
"isEnabled": true, | ||
"isInstalled": true, | ||
}, | ||
}, | ||
}) | ||
}, | ||
}, | ||
|
@@ -189,7 +205,15 @@ If the shop is in a multi-store context, the user will have a selector like this | |
onboardingLink: 'http://perdu.com', | ||
superAdminEmail: '[email protected]', | ||
ssoResendVerificationEmail: 'http://perdu.com', | ||
manageAccountLink: 'http://perdu.com' | ||
manageAccountLink: 'http://perdu.com', | ||
dependencies: { | ||
"ps_eventbus": { | ||
"enableLink": "http://localhost:80/admin-dev/index.php/improve/modules/manage/action/enable/ps_eventbus?_token=up_TmQFm66p9dwunsmfNzk2UfDD3a8tsxdW5a7KviKw", | ||
"installLink": "http://localhost:80/admin-dev/index.php/improve/modules/manage/action/install/ps_eventbus?_token=up_TmQFm66p9dwunsmfNzk2UfDD3a8tsxdW5a7KviKw", | ||
"isEnabled": true, | ||
"isInstalled": true, | ||
}, | ||
}, | ||
}) | ||
}, | ||
}, | ||
|
@@ -255,7 +279,15 @@ his address from the link received in his mailbox. | |
onboardingLink: 'http://perdu.com', | ||
superAdminEmail: '[email protected]', | ||
ssoResendVerificationEmail: 'http://perdu.com', | ||
manageAccountLink: 'http://perdu.com' | ||
manageAccountLink: 'http://perdu.com', | ||
dependencies: { | ||
"ps_eventbus": { | ||
"enableLink": "http://localhost:80/admin-dev/index.php/improve/modules/manage/action/enable/ps_eventbus?_token=up_TmQFm66p9dwunsmfNzk2UfDD3a8tsxdW5a7KviKw", | ||
"installLink": "http://localhost:80/admin-dev/index.php/improve/modules/manage/action/install/ps_eventbus?_token=up_TmQFm66p9dwunsmfNzk2UfDD3a8tsxdW5a7KviKw", | ||
"isEnabled": true, | ||
"isInstalled": true, | ||
}, | ||
}, | ||
}) | ||
}, | ||
}, | ||
|
@@ -289,6 +321,8 @@ You can have these different cases when the shop prerequisites are not fully val | |
psIs17: true, | ||
psAccountsInstallLink: 'http://localhost:8082/admin-dev/index.php/improve/modules/manage/action/install/ps_accounts?_token=dCspOkG6tWwGoJIKdugKufBFtdNF--UPq8NVmyiUKLM', | ||
psAccountsEnableLink: null, | ||
psAccountsNeedsUpgrade: false, | ||
psAccountsUpgradeLink: 'http://localhost:8082/admin-dev/index.php/improve/modules/manage/action/install/ps_accounts?_token=dCspOkG6tWwGoJIKdugKufBFtdNF--UPq8NVmyiUKLM', | ||
currentShop: { | ||
id: 1, | ||
name: 'PrestaShop', | ||
|
@@ -326,7 +360,15 @@ You can have these different cases when the shop prerequisites are not fully val | |
onboardingLink: 'http://perdu.com', | ||
superAdminEmail: '[email protected]', | ||
ssoResendVerificationEmail: 'http://perdu.com', | ||
manageAccountLink: 'http://perdu.com' | ||
manageAccountLink: 'http://perdu.com', | ||
dependencies: { | ||
"ps_eventbus": { | ||
"enableLink": "http://localhost:80/admin-dev/index.php/improve/modules/manage/action/enable/ps_eventbus?_token=up_TmQFm66p9dwunsmfNzk2UfDD3a8tsxdW5a7KviKw", | ||
"installLink": "http://localhost:80/admin-dev/index.php/improve/modules/manage/action/install/ps_eventbus?_token=up_TmQFm66p9dwunsmfNzk2UfDD3a8tsxdW5a7KviKw", | ||
"isEnabled": true, | ||
"isInstalled": true, | ||
}, | ||
}, | ||
}) | ||
}, | ||
}, | ||
|
@@ -349,6 +391,8 @@ You can have these different cases when the shop prerequisites are not fully val | |
psIs17: true, | ||
psAccountsInstallLink: null, | ||
psAccountsEnableLink: 'http://localhost:8082/admin-dev/index.php/improve/modules/manage/action/enable/ps_accounts?_token=dCspOkG6tWwGoJIKdugKufBFtdNF--UPq8NVmyiUKLM', | ||
psAccountsNeedsUpgrade: false, | ||
psAccountsUpgradeLink: 'http://localhost:8082/admin-dev/index.php/improve/modules/manage/action/install/ps_accounts?_token=dCspOkG6tWwGoJIKdugKufBFtdNF--UPq8NVmyiUKLM', | ||
currentShop: { | ||
id: 1, | ||
name: 'PrestaShop', | ||
|
@@ -386,7 +430,15 @@ You can have these different cases when the shop prerequisites are not fully val | |
onboardingLink: 'http://perdu.com', | ||
superAdminEmail: '[email protected]', | ||
ssoResendVerificationEmail: 'http://perdu.com', | ||
manageAccountLink: 'http://perdu.com' | ||
manageAccountLink: 'http://perdu.com', | ||
dependencies: { | ||
"ps_eventbus": { | ||
"enableLink": "http://localhost:80/admin-dev/index.php/improve/modules/manage/action/enable/ps_eventbus?_token=up_TmQFm66p9dwunsmfNzk2UfDD3a8tsxdW5a7KviKw", | ||
"installLink": "http://localhost:80/admin-dev/index.php/improve/modules/manage/action/install/ps_eventbus?_token=up_TmQFm66p9dwunsmfNzk2UfDD3a8tsxdW5a7KviKw", | ||
"isEnabled": true, | ||
"isInstalled": true, | ||
}, | ||
}, | ||
}) | ||
}, | ||
}, | ||
|
@@ -400,6 +452,132 @@ You can have these different cases when the shop prerequisites are not fully val | |
}} | ||
</Story> | ||
|
||
<Story name='Ps event bus not installed' height='300px'> | ||
{{ | ||
components: { PsAccounts }, | ||
props: { | ||
context: { | ||
default: object('context', { | ||
psIs17: true, | ||
psAccountsInstallLink: null, | ||
psAccountsEnableLink: null, | ||
psAccountsNeedsUpgrade: false, | ||
psAccountsUpgradeLink: 'http://localhost:8082/admin-dev/index.php/improve/modules/manage/action/install/ps_accounts?_token=dCspOkG6tWwGoJIKdugKufBFtdNF--UPq8NVmyiUKLM', | ||
currentShop: { | ||
id: 1, | ||
name: 'PrestaShop', | ||
url: 'http://localhost:8082/admin-dev/index.php?controller=AdminModules&setShopContext=s-1&token=7e6ed965a445faaa639275d16418264d', | ||
domain: 'my-domain.com', | ||
domainSsl: 'my-secure-domain.com', | ||
}, | ||
shops: [ | ||
{ | ||
id: 1, | ||
name: 'Default', | ||
shops: [ | ||
{ | ||
id: 1, | ||
name: 'PrestaShop', | ||
url: 'http://localhost:8082/admin-dev/index.php?controller=AdminModules&setShopContext=s-1&token=7e6ed965a445faaa639275d16418264d', | ||
domain: 'my-domain.com', | ||
domainSsl: 'my-secure-domain.com', | ||
} | ||
], | ||
}, | ||
], | ||
user: { | ||
email: null, | ||
emailIsValidated: false, | ||
isSuperAdmin: true, | ||
}, | ||
onboardingLink: 'http://perdu.com', | ||
superAdminEmail: '[email protected]', | ||
ssoResendVerificationEmail: 'http://perdu.com', | ||
manageAccountLink: 'http://perdu.com', | ||
dependencies: { | ||
"ps_eventbus": { | ||
"enableLink": "http://localhost:80/admin-dev/index.php/improve/modules/manage/action/enable/ps_eventbus?_token=up_TmQFm66p9dwunsmfNzk2UfDD3a8tsxdW5a7KviKw", | ||
"installLink": "http://localhost:80/admin-dev/index.php/improve/modules/manage/action/install/ps_eventbus?_token=up_TmQFm66p9dwunsmfNzk2UfDD3a8tsxdW5a7KviKw", | ||
"isEnabled": false, | ||
"isInstalled": false, | ||
}, | ||
}, | ||
}) | ||
}, | ||
}, | ||
methods: { | ||
actionEvent: action('actioned'), | ||
viewEvent: action('viewed'), | ||
}, | ||
template: '<PsAccounts :context="context" class="m-4" @actioned="actionEvent" @viewed="viewEvent">' + | ||
'<template v-slot:body>- Module settings part, disabled -</template>' + | ||
'</PsAccounts>', | ||
}} | ||
</Story> | ||
|
||
<Story name='Ps Accounts needs an update' height='350px'> | ||
{{ | ||
components: { PsAccounts }, | ||
props: { | ||
context: { | ||
default: object('context', { | ||
psIs17: true, | ||
psAccountsInstallLink: null, | ||
psAccountsEnableLink: null, | ||
psAccountsNeedsUpgrade: true, | ||
psAccountsUpgradeLink: 'http://localhost:8082/admin-dev/index.php/improve/modules/manage/action/install/ps_accounts?_token=dCspOkG6tWwGoJIKdugKufBFtdNF--UPq8NVmyiUKLM', | ||
currentShop: { | ||
id: 1, | ||
name: 'PrestaShop', | ||
url: 'http://localhost:8082/admin-dev/index.php?controller=AdminModules&setShopContext=s-1&token=7e6ed965a445faaa639275d16418264d', | ||
domain: 'my-domain.com', | ||
domainSsl: 'my-secure-domain.com', | ||
}, | ||
shops: [ | ||
{ | ||
id: 1, | ||
name: 'Default', | ||
shops: [ | ||
{ | ||
id: 1, | ||
name: 'PrestaShop', | ||
url: 'http://localhost:8082/admin-dev/index.php?controller=AdminModules&setShopContext=s-1&token=7e6ed965a445faaa639275d16418264d', | ||
domain: 'my-domain.com', | ||
domainSsl: 'my-secure-domain.com', | ||
} | ||
], | ||
}, | ||
], | ||
user: { | ||
email: null, | ||
emailIsValidated: false, | ||
isSuperAdmin: true, | ||
}, | ||
onboardingLink: 'http://perdu.com', | ||
superAdminEmail: '[email protected]', | ||
ssoResendVerificationEmail: 'http://perdu.com', | ||
manageAccountLink: 'http://perdu.com', | ||
dependencies: { | ||
"ps_eventbus": { | ||
"enableLink": "http://localhost:80/admin-dev/index.php/improve/modules/manage/action/enable/ps_eventbus?_token=up_TmQFm66p9dwunsmfNzk2UfDD3a8tsxdW5a7KviKw", | ||
"installLink": "http://localhost:80/admin-dev/index.php/improve/modules/manage/action/install/ps_eventbus?_token=up_TmQFm66p9dwunsmfNzk2UfDD3a8tsxdW5a7KviKw", | ||
"isEnabled": false, | ||
"isInstalled": true, | ||
}, | ||
}, | ||
}) | ||
}, | ||
}, | ||
methods: { | ||
actionEvent: action('actioned'), | ||
viewEvent: action('viewed'), | ||
}, | ||
template: '<PsAccounts :context="context" class="m-4" @actioned="actionEvent" @viewed="viewEvent">' + | ||
'<template v-slot:body>- Module settings part, disabled -</template>' + | ||
'</PsAccounts>', | ||
}} | ||
</Story> | ||
|
||
<Story name='No admin rights' height='350px'> | ||
{{ | ||
components: { PsAccounts }, | ||
|
@@ -409,6 +587,8 @@ You can have these different cases when the shop prerequisites are not fully val | |
psIs17: true, | ||
psAccountsInstallLink: null, | ||
psAccountsEnableLink: null, | ||
psAccountsNeedsUpgrade: false, | ||
psAccountsUpgradeLink: 'http://localhost:8082/admin-dev/index.php/improve/modules/manage/action/install/ps_accounts?_token=dCspOkG6tWwGoJIKdugKufBFtdNF--UPq8NVmyiUKLM', | ||
currentShop: { | ||
id: 1, | ||
name: 'PrestaShop', | ||
|
@@ -446,7 +626,15 @@ You can have these different cases when the shop prerequisites are not fully val | |
onboardingLink: 'http://perdu.com', | ||
superAdminEmail: '[email protected]', | ||
ssoResendVerificationEmail: 'http://perdu.com', | ||
manageAccountLink: 'http://perdu.com' | ||
manageAccountLink: 'http://perdu.com', | ||
dependencies: { | ||
"ps_eventbus": { | ||
"enableLink": "http://localhost:80/admin-dev/index.php/improve/modules/manage/action/enable/ps_eventbus?_token=up_TmQFm66p9dwunsmfNzk2UfDD3a8tsxdW5a7KviKw", | ||
"installLink": "http://localhost:80/admin-dev/index.php/improve/modules/manage/action/install/ps_eventbus?_token=up_TmQFm66p9dwunsmfNzk2UfDD3a8tsxdW5a7KviKw", | ||
"isEnabled": true, | ||
"isInstalled": true, | ||
}, | ||
}, | ||
}) | ||
}, | ||
}, | ||
|
@@ -476,6 +664,8 @@ component and the standard behavior won't let the user do anything: | |
psIs17: true, | ||
psAccountsInstallLink: 'true', // will pass: can be casted to uri by Joi | ||
psAccountsEnableLink: 'ptet-ben-k-non', // will pass: can be casted to uri by Joi | ||
psAccountsNeedsUpgrade: false, | ||
psAccountsUpgradeLink: 'http://localhost:8082/admin-dev/index.php/improve/modules/manage/action/install/ps_accounts?_token=dCspOkG6tWwGoJIKdugKufBFtdNF--UPq8NVmyiUKLM', | ||
currentShop: 42, | ||
shops: [ | ||
{ | ||
|
@@ -567,6 +757,8 @@ If you want to pass something to the component footer like another component you | |
psIs17: true, | ||
psAccountsInstallLink: null, | ||
psAccountsEnableLink: null, | ||
psAccountsNeedsUpgrade: false, | ||
psAccountsUpgradeLink: 'http://localhost:8082/admin-dev/index.php/improve/modules/manage/action/install/ps_accounts?_token=dCspOkG6tWwGoJIKdugKufBFtdNF--UPq8NVmyiUKLM', | ||
currentShop: { | ||
id: 1, | ||
name: 'PrestaShop', | ||
|
@@ -598,6 +790,14 @@ If you want to pass something to the component footer like another component you | |
superAdminEmail: '[email protected]', | ||
ssoResendVerificationEmail: 'http://perdu.com', | ||
manageAccountLink: 'http://perdu.com', | ||
dependencies: { | ||
"ps_eventbus": { | ||
"enableLink": "http://localhost:80/admin-dev/index.php/improve/modules/manage/action/enable/ps_eventbus?_token=up_TmQFm66p9dwunsmfNzk2UfDD3a8tsxdW5a7KviKw", | ||
"installLink": "http://localhost:80/admin-dev/index.php/improve/modules/manage/action/install/ps_eventbus?_token=up_TmQFm66p9dwunsmfNzk2UfDD3a8tsxdW5a7KviKw", | ||
"isEnabled": true, | ||
"isInstalled": true, | ||
}, | ||
}, | ||
}) | ||
}, | ||
}, | ||
|
Oops, something went wrong.