Skip to content

Customizing the Software

Special attention was paid to making this software modular & adaptable to different excavation needs.

This section explain the general steps required to add a module.

Further documentation about cloning and adapting the complete application is planned.

Adding a new module is easy:

Backend

DB migartion & seeding

Create table schema. If used, add tags and onps tables. This is done in the migrations folder @database/migration folder. Add seeders if required.

Model

Add module name to App\Providers\AppServiceProvider.enforceMorphMap.

Add Module Model file to app\Models\DigModule\Specific. If used, add Tag & TagGroup models.

Implement restricted fields, derivedId, short.

Configuration file

Add Module name to App\Services\App\Interfaces\modules\ConfigInterface.modules

Create new Configuration files [Module]Config & [Module]InitDetails Implement all required functions

Frontend

types

Create a new file @app/resources/js/types/modules define fields Import newly created module type @app/resources/js/types/moduleTypes and add it to TAllModules

module configs

Add module to @app/resources/js/scripts/stores/module/moduleToUrlModuleName. Add module configurations to @app/resources/js/scripts/stores/moduleDefinitions.ts. These includes:

  • id & slug regular expressions
  • function idDerived(id) =>
  • function idFormatter(slug) => id

forms

Create a new Module folder @app/resources/js/components/modules Create and implement [Module]Form, [Module]IdSelector & [Module]New form components