Skip to content

Latest commit

 

History

History
166 lines (144 loc) · 5.89 KB

v1.20.md

File metadata and controls

166 lines (144 loc) · 5.89 KB

alias on main entity (sql)

Oracle 10g only has 32 characters for table and field names. If we need to 'shrink' a main name we can give it an alias This feature isn't fully working yet: it will be fixed on the nightly

 tables: {
    where: [...],
    entity: {
      type: 'Main',
      table: accountT,
      alias: 'j',

Messaging

messageType on output params

This notation tells the framework that if the variable is a non empty string that it is to be treated as a message. For example if a stored procedure has an output errorMsg then if that is non null we will display the error message on the gui

There are three msgLevels: error, info and warning

  { type: 'output', javaType: 'String', name: 'errorMsg', msgLevel: 'error' },

Data format changed to support messages

The data from the APIs has all changed. You can see this in the browser console (network tab). The main data is now under data and messages are under messages

Pages have time stamps now

This will probably have no impact on you yet. It's done so that we can improve how messages are displayed to the user.

Redux

  • We can now use redux as the engine This should have no impact on you. It does remove a number of (rarely occuring) race conditions and eases integration with the main gui

Main tables as modal pages

This still needs more testing: it's beleived complete and all the current tests past, but there is every chance we 'missed something'. It's a beta release feature

modals in pageD

We need to add the main page to the list of modals. Note that it is a 'main' and not a modal

export const LinkedAccountDetailsPD: ExampleMainPage = {
  name: "LinkedAccountDetails",
  display: { target: '~/display', dataDD: linkedAccountDetailsDD },
  modals: [ { modal: SelectMandateMP }, { modal: CreatePaymentMP }, { main: OverpaymentMainPage } ],
  //....
}

modal button

We use a 'main' instead of a modal and there is no focuson property. This should be typechecked but there is a typescript bug Note that now when we do copies the meaning of '~' changes depending on whether we are copying from or to...

 buttons: {
    overpaymentHistory: {
      control: 'ModalButton',
      mode: 'view',
      main: OverpaymentMainPage,    
      copy: { from: '~/rememberedForTest', to: '~/selectedIndex' },
      copyOnClose: { from: '~/selectedIndex', to: '~/rememberedForTest' }
    }
  },

Tables

emptyData & tableTitle

export const postCodeSearchResponseDD: RepeatingDataD<AllGuards> = {
  name: "PostCodeSearchResponseForListOfPayments",
  description: "The array of all the data",
  dataDD: postCodeDataForListOfPaymentsLineD,
  paged: false,
  display: TableCD,
  displayParams: {
    emptyData: 'No results',
    tableTitle: 'Search results',
    order: [ 'postcode', 'line1', 'line2', 'line3', 'line4' ],
    //...
  }
}

Structure Tables

There will be occasions where the data being shown isn't just a simple child of a data structure. The idea in @focuson is that the simple is easy and the complex is doable. The simple (most of the data being a single structure) is easy. But when we move to more complicated structures it is a little more complex.

Instead of order we have paths. The other difference is that there are no joiners.

export const postCodeSearchResponseDD: RepeatingDataD<AllGuards> = {
  name: "PostCodeSearchResponse",
  description: "The array of all the data",
  dataDD: postCodeDataLineD,
  paged: false,
  display: StructureTableCD,
  displayParams: {
    paths: { postcode: 'postcode', line1: 'line1', line2: 'line2', line3: 'line3', line4: 'line4' },  //<--------------
    copySelectedItemTo: [ 'postcode', 'addressResults' ],
    copySelectedIndexTo: [ 'selectedPostcodeIndex' ],
  }}

Rests

Rests can have multiple deletes

Multiple paths on action buttons

 buttons: {
  approvePendingFees: { control: "ActionButton", 
          path: '#editingData', 
          paths: { 
                    pathRepeated: '#editingData',
                    otherData: '~/selectedDateItem/dateCreated' 
               },
          text: 'Approve Pending Fees', 
            action: 'approvePendingFees' },
  authoriseApprovedFees: { control: "ActionButton", path: '#editingData', text: 'Authorise Approved Fees', action: 'authoriseApprovedFees' },

}

Bug fixes

Empty values and booleans...

Mutations / Resolvers

autowiring for class variables

   mutations: [{
            restAction: 'create',
            autowired: { class: '{thePackage}.utils.IOGNL', variableName: 'ognl', imports: true },
            //...

makeMock

We sometimes don't want a mock being created for our mutations and resolvers. We can turn them off with our makeMock.

mutations: [
    {
      restAction: 'get', mutateBy:
        {
          type: 'manual', name: 'testForMessages',
          makeMock: false,                            //<-----------
          code: [ `
          String errorMsg = "the error message";
          String warningMsg = "the warning message";
          String infoMsg = "the info message";
          ` ], params: [
            { type: 'output', javaType: 'String', name: 'errorMsg', msgLevel: 'error' },
            { type: 'output', javaType: 'String', name: 'warningMsg', msgLevel: 'warning' },
            { type: 'output', javaType: 'String', name: 'infoMsg', msgLevel: 'info' },
          ]
        }
    }
  ]

Optional names for manual and sql mutations and resolvers

Previously we had to give a name for manual and sql mutations and resolvers. We don't now

Migration guide

There are no known migration issues.

You MUST delete the generated source code, and run npm install in both the generators and the generated code