Start modelling your app today.

Get started for free

What's this?

SpringBot 1.3.0.0

The release notes for the new version 1.3.0.0 of SpringBot.


Features

  • Export functionality was added to Data table tiles. You can now select entities on a Data table tile, and export those entities as a CSV file.
  • An Export All button was added which will export every instance of an entity of a given type in CSV format.
  • An Import button was added to CRUD data table tiles, which allows creation and updates of entities from a CSV file.
  • Functionality for downloading an example CSV with the headers allowed in the import was added.

Improvements

  • Replaced Selenium tests for CRUD Permissions with client-side tests for faster test runs.
  • Hid the search bar on a Data table tile if there are no searchable attributes to avoid confusion.
  • Replaced Data table tile in Admin section with front-end implementation of Data table tiles to improve consistency between front-end and Admin section.
  • Refactored NgRx actions to use a single action with a type input instead of a different action class for every action type.
  • Added protected regions to allow code snippets to be added to the selection options bar in the CRUD Collection.

Resolved defects

  • Updated permissions to stop non-admin users from being able to see Admin Data table tiles.
  • Updated Joyride tooltip to not render when element to anchor to does not exist.
  • Updated SpringBot reserved words to handle empty names.
  • Fixed regression of validation rules for the Forms extension and references to Form tiles.

Migration path

Updates to NgRx actions

NgRx actions in the application used to have a different class for each type of action. To create an action and dispatch it, this is how it would be done:

this.store.dispatch(new modelAction.InitialiseFishCollectionState({
    queryParams: this.queryParams,
    collectionId: this.collectionId
}));

This has been updated so that there is now a single action which takes the action type as an input. The types of actions which are available can be seen in an enum in the action file

export enum FishModelActionTypes {
    CREATE_FISH = '[ENTITY] Create FishModel',
    CREATE_FISH_OK = '[ENTITY] Create FishModel successfully',
    CREATE_FISH_FAIL = '[ENTITY] Create FishModel failed',

    ...

    INITIALISE_FISH_COLLECTION_STATE = '[ENTITY] Initialize the CollectionState of FishModel',
}

Following the update, the action shown above would be created and dispatched like this. Any actions which you have added to your application will need to be updated so that they are instantiated like in the example below:

this.store.dispatch(new modelAction.FishAction(
    modelAction.FishModelActionTypes.INITIALISE_FISH_COLLECTION_STATE,
    {
        queryParams: this.queryParams,
        collectionId: this.collectionId
    }
));

Admin Data table tile changes

The Admin Data table tiles have been updated to use the same code as the front-end Data table tile. This comparison below will show how the structure of the tile has changed:

Previous Admin Data table Tile Structure:

crud
│
└─── [Entity Name]
     │   [Entity Name].admin.tile.crud.component.html
     │   [Entity Name].admin.tile.crud.component.scss
     │   [Entity Name].admin.tile.crud.component.ts
     │   [Entity Name].admin.tile.crud.module.ts


Refactored Admin Data table Tile Structure:

crud
│
└─── [Entity Name]
     │   [Entity Name]-admin-tile-crud-routing.module.ts
     │   [Entity Name]-admin-tile-crud.component.html
     │   [Entity Name]-admin-tile-crud.component.scss
     │   [Entity Name]-admin-tile-crud.component.ts
     │   [Entity Name]-admin-tile-crud.module.ts
     │
     │
     └─── list
     │    │ [Entity Name]-admin-tile-crud-list.component.html
     │    │ [Entity Name]-admin-tile-crud-list.component.scss
     │    │ [Entity Name]-admin-tile-crud-list.component.ts
     │    │ [Entity Name]-admin-tile-crud-list.component.spec.ts
     │
     └─── edit
          │ [Entity Name]-admin-tile-crud-edit.component.html
          │ [Entity Name]-admin-tile-crud-edit.component.scss
          │ [Entity Name]-admin-tile-crud-edit.component.ts

As a result of this update, and changes you have made to an admin CRUD data table (Admin CRUD data tables are found in the directory ‘clientside/src/app/admin/tiles/crud’) will not persist after writing your application with the bot. We recommend making a branch where you can store your previous changes to these tiles, updating the bot, and then migrating your changes into the new CRUD data table structure. Any changes made to front-end CRUD data tables will not be overwritten

Renamed/merged protected regions

Action protected regions

Any protected regions which were contained within an action class will be overwritten once you rewrite with the bot. Each of these action classes had the same protected regions, so this summary is only going to show the regions which were present in a single action which have now been removed. To migrate your changes to the new system, you can use the protected region in the relevant action, and execute logic depending on the action type variable, which is now passed in as a constructor argument.

[Entity Name].model.action.ts
Protected Regions
Add any additional class fields for [Action Name] here
Add any additional constructor parameters for [Action Name] here
Add any additional constructor arguments for [Action Name] here
Add any additional constructor logic for [Action Name] here
Add any additional class methods for [Action Name] here
Data table tile protected regions

As this release included restructuring the Admin section Data table tiles, all of the Admin Data table tiles have been refactored. As a result, all of the protected regions in these file have been removed. The protected regions which have been removed for each file can be seen here:

[Entity Name].admin.tile.crud.component.html
Protected Regions
Add any additional HTML structure before the main body here
Customise your header
Customise your collection here
Customise your crud tile here
Add any additional HTML structure after the main body here
[Entity Name].admin.tile.crud.component.scss
Protected Regions
Add any additional SCSS structure here
[Entity Name].admin.tile.crud.component.ts
Protected Regions
Add any additional imports here
Customise what collection actions show here
Add any additional collection actions here
Customise what item actions show here
Add any additional item actions here
Customise what multiple items actions show here
Add any additional multiple items actions here
Add any additional definitions here
Add any additional CSS styling here
Add any additional component configuration here
Add any fields here used in the search
Change your model properties here
Change your model relations here
Change your collection id if required here
Change your default ordering if required here
Add any additional default where conditions here
Change your default expands if required here
Add any additional where conditions here
Change your header options required here
Add any additional actions for the collection here
Update the default view item action here
Update the default edit item action here
Update the default delete item action here
Add any additional actions for the items here
Add any additional multiple actions for the collection here
Add any additional config for the dropdown filter question here
Add any additional filter questions for the collection here
Add any additional class fields here
Add any additional constructor parameters here
Add any additional constructor logic before the main body here
Add any additional constructor logic after the main body here
Add any additional ngOnInit logic before the main body here
Add additional processing for View and Edit mode before the main body here
Add additional processing for state configuration here
Add additional actions after setting targetModel here
Add additional processing for View and Edit mode after the main body here
Add additional processing for Create mode before the main body here
Add additional processing for Create mode after the main body here
Add any additional ngOnInit logic after the main body here
Add any additional onActionClicked logic before the main body here
Add any additional logic for View action before the main body here
Add any additional logic for View action after the main body here
Add any additional logic for Edit action before the main body here
Add any additional logic for Edit action after the main body here
Customise the single Delete modal text here
Add any additional logic for Delete action before the main body here
Add any additional logic for Delete action after the main body here
Add any additional onActionClicked logic after the main body here
Add any additional onCollectionActionClicked logic before the main body here
Add any additional onCollectionActionClicked logic after the main body here
Add any additional onMultipleItemsActionClicked logic before the main body here
Customise the mutliple Delete modal text here
Add any additional logic before deleting the selected entities here
Add any additional logic after deleted the selected entities here
Add any additional onMultipleItemsActionClicked logic after the main body here
Add any additional onViewHistory logic before the main body here
Add any additional onViewHistory logic after the main body here
Add any additional onSwitchEdit logic before the main body here
Add any additional onSwitchEdit logic after the main body here
Add any additional onCreateClicked logic before the main body here
Add any additional onCreateClicked logic after the main body here
Add any additional onCreateOrSaveClicked logic before the main body here
Add any additional logic before creating a new model here
Add any additional constructor arguments for CreateModel here
Add any additional logic before update the current model here
Add any additional constructor arguments for UpdateModel here
Add any additional onCreateOrSaveClicked logic after the main body here
Add any additional onCancelClicked logic before the main body here
Add any additional onCancelClicked logic after the main body here
Add any additional onCollectionSort logic before the main body here
Add any additional onCollectionSort logic before constructing a state config here
Add any additional onCollectionSort logic before dispatching event here
Add any additional onCollectionSort logic after the main body here
Add any additional onCollectionFilter logic before the main body here
Add any additional onCollectionFilter logic before constructing a state config here
Add any additional onCollectionFilter logic before dispatching event here
Add any additional onCollectionFilter logic after the main body here
Add any additional logic here before change the search conditions
Add any additional onCollectionSearch logic before constructing a state config here
Add any additional onCollectionSearch logic after constructing a state config here
Add any additional logic here before the main logic of collection filtered
Add any additional onFirstPageRequested logic before the main body here
Add any additional onFirstPageRequested logic before constructing a state config here
Add any additional onFirstPageRequested logic before dispatching event here
Add any additional onFirstPageRequested logic after the main body here
Add any additional onPrevPageRequested logic before the main body here
Add any additional onPrevPageRequested logic before constructing a state config here
Add any additional onPrevPageRequested logic before dispatching event here
Add any additional onPrevPageRequested logic after the main body here
Add any additional onNextPageRequested logic before the main body here
Add any additional onNextPageRequested logic before constructing a state config here
Add any additional onNextPageRequested logic before dispatching event here
Add any additional onNextPageRequested logic after the main body here
Add any additional onLastPageRequested logic before the main body here
Add any additional onLastPageRequested logic before constructing a state config here
Add any additional onLastPageRequested logic before dispatching event here
Add any additional onLastPageRequested logic after the main body here
Add any additional code here before the main logic of prepareReferenceCollections
Add any additional code here after the main logic of prepareReferenceCollections
Add any additional createReactiveForm logic before the main body here
Add any additional createReactiveForm logic after the main body here
Add any additional class methods here
[Entity Name].admin.tile.crud.module.ts
Protected Regions
Add any additional imports here
Add any additional declaration here
Add any additional module imports here
Add any additional module exports here
Add any additional providers here
Add any additional module configurations here

Ready to start building?

Sign up to Codebots today to see how much faster you can build apps with us.