wallet-core/packages/merchant-backend-ui
2023-03-02 14:09:44 -03:00
..
contrib repo: integrate packages from former merchant-backoffice.git 2022-10-24 10:46:14 +02:00
src fix #7714 2023-03-02 13:51:03 -03:00
.gitignore repo: integrate packages from former merchant-backoffice.git 2022-10-24 10:46:14 +02:00
babel.config-linaria.json fix #7714 2023-03-02 13:51:03 -03:00
build.mjs camel case for prebuilt 2023-03-02 14:09:44 -03:00
copyleft-header.js repo: integrate packages from former merchant-backoffice.git 2022-10-24 10:46:14 +02:00
package.json camel case for prebuilt 2023-03-02 14:09:44 -03:00
README.md depleted rollback 2023-01-23 14:57:26 -03:00
render-examples.ts camel case for prebuilt 2023-03-02 14:09:44 -03:00
rollup.config.js camel case for prebuilt 2023-03-02 14:09:44 -03:00
trim-extension.cjs fix #7714 2023-03-02 13:51:03 -03:00
tsconfig.json repo: integrate packages from former merchant-backoffice.git 2022-10-24 10:46:14 +02:00

Merchant Backend pages

Description

This project generate 5 templates for the merchant backend:

  • DepletedTip
  • OfferRefund
  • OfferTip
  • RequestPayment
  • ShowOrderDetails

This pages are to be serve from the merchant-backend service and will be queried for browser that may or may not have JavaScript enabled, so we are going to do server side rendering. The merchant-backend service is currently supporting mustache library for server side rendering. We also want the be able to create a more interactive design if the browser have JavaScript enabled, so the pages will be serve with all the information in the HTML but also in JavaScript.

In this scenario, we are using jsx to build the template of the page that will be build-time rendered into the mustache template. This template can the be deployed into a merchant-backend that will complete the information before send it to the browser.

Building

The building process can be executed with pnpm build

Testing

This project is using a JavaScript implementation of mustache that can be executed with the command pnpm render-examples. This script will take the pages previously built in dist/pages directory and the examples definition in the src/pages/[exampleName].examples.ts files and render a to-be-sent-to-the-user page like the merchant would do. This examples will be saved invidivualy into directory dist/examples and should be opened with your testing browser. Testing should be done with JavaScript enabled and JavaScript disabled, both should look ok.