Skip to content

v0.3.0

Latest
Compare
Choose a tag to compare
@woller woller released this 11 Jun 10:56
· 1 commit to main since this release

Breaking changes

Replaces the JSON-backed Kommandant::Command model with a database backed version (#25)

Also adds a UI for CRUDing commands. The easiest way to migrate is to convert your old JSON file to a script:

// commands.json
{
  "id": "find_policy",
  "icon": "file_invoice_dollar",
  "path": "/kommandant/commands/find_policy",
  "http_method": "get",
  "resource_class": "Policy",
  "text_keys": [
    "insurable"
  ],
  "translations": {
    "da": {
      "name": "Find police",
      "placeholder": "Søg på kundenavn, nummerplade, pantdeklarationsnummer eller id"
    }
  }
}
# your shiny new migration script
Kommandant::Command.create!(
  icon: "file_invoice_dollar",
  http_method: "get",
  resource_class: "Policy",
  search_result_text_method: "name",
  translations: {da: {
    name: "Find police",
    placeholder: "Søg på kundenavn, nummerplade, pantdeklarationsnummer eller id"
  }}
)

Note that the path is no longer needed for search commands and the text_keys object has been replaced with a field called search_result_text_method.

Non-breaking changes

Adds option for highlighting match between query and found resources (#20)

Upgrades Turbo dependency (#23)