Skip to content

Releases: traels-it/kommandant

v0.3.0

11 Jun 10:56
Compare
Choose a tag to compare

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)

v0.2.1

21 Feb 12:44
4bcef35
Compare
Choose a tag to compare

What's changed

First usable version of the gem