1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-13 23:48:55 +01:00
fab-manager/app/frontend/src/javascript/components
Sylvain 6b224d7db1 (feat) alert unsaved changes
if the user tries to quit the product form, he will
be alerted about unsaved changes, if any
2022-09-14 14:51:54 +02:00
..
angular fix typo 2022-06-15 13:39:27 +02:00
authentication-provider (bug) OIDC scopes are not shown in the configuration form select 2022-07-06 12:59:45 +02:00
base (feat) alert unsaved changes 2022-09-14 14:51:54 +02:00
cart (fix) checkout button cant click 2022-09-07 09:59:37 +02:00
coupon add a function return the currency symbol 2022-08-26 20:14:15 +02:00
dashboard/reservations Use union type instead of enum for SettingName 2022-08-23 13:12:13 +02:00
events fixed imports 2022-06-21 12:18:54 +02:00
form (feat) alert unsaved changes 2022-09-14 14:51:54 +02:00
group Removed unused imports 2022-08-23 15:15:49 +02:00
machines Merge branch 'product_store-inte' into product_store-store 2022-09-07 09:27:57 +02:00
payment (quality) refactored categories sorting + fix ts issues 2022-09-07 17:30:21 +02:00
payment-schedule Removed unused imports 2022-08-23 15:15:49 +02:00
plan-categories linted all code expected profile-custom-fields/* and proof-of-identity/* 2022-06-21 12:10:00 +02:00
plans linted all code expected profile-custom-fields/* and proof-of-identity/* 2022-06-21 12:10:00 +02:00
prepaid-packs Removed unused imports 2022-08-23 15:15:49 +02:00
pricing (feat) show reservations panel 2022-06-29 15:34:04 +02:00
profile-completion Use union type instead of enum for SettingName 2022-08-23 13:12:13 +02:00
profile-custom-fields linted profile-custom-fields 2022-06-21 14:10:51 +02:00
settings Use union type instead of enum for SettingName 2022-08-23 13:12:13 +02:00
socials Use union type instead of enum for SettingName 2022-08-23 13:12:13 +02:00
store (feat) alert unsaved changes 2022-09-14 14:51:54 +02:00
subscriptions (wip) lint for scoped-translation 2022-06-20 18:06:15 +02:00
supporting-documents fix styling issues + rename proof of identity 2022-06-22 14:18:33 +02:00
user (quality) refactored categories sorting + fix ts issues 2022-09-07 17:30:21 +02:00
document-filters.tsx (typing) use TDateISO for typing dates 2022-05-04 14:05:36 +02:00
README.md fixed imports 2022-06-21 12:18:54 +02:00

components

This directory is holding the components built with React.

During the migration phase, these components may be included in the legacy angularJS app using react2angular.

These components must be written using the following conventions:

  • The component name must be in CamelCase.
  • The component must be exported as a named export (no export default).
  • A component FooBar must have a className="foo-bar" attribute on its top-level element.
  • The stylesheet associated with the component must be located in app/frontend/src/stylesheets/modules/same-directory-structure/foo-bar.scss.
  • All methods in the component must be commented with a comment block.
  • Other constants and variables must be commented with an inline block.
  • Depending on if we want to use the <Suspense> wrapper or not, we can export the component directly or wrap it in a <Loader> wrapper.
  • When a component is used in angularJS, the wrapper is required. The component must be named like const Foo (no export if not used in React) and must have a const FooWrapper at the end of its file, which wraps the component in a <Loader>.
  • Translations must be grouped per component. For example, the FooBar component must have its translations in the config/locales/app.$SCOPE.en.yml file, under the foo_bar key.
  • Most of these rules are validated by eslint-plugin-fabmanager. Please ensure you write eslint valid code, and think twice you have a very good reason before disabling any rule.