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 related tables models.
Implement the model's functions per interface definitions.
Configuration files
Add Module name to App\Services\App\Interfaces\modules\ConfigInterface.modules
Create new Configuration files [Module]Config, [Module]Groups, [Module]InitDetails, [Module]Related and 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) => {tag, slug}
- 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