kit

Multi-value picker

Built revision v17.10.0

Phoenix
Topics

Human support

Bring a missing role, layout, or state, or a rendering against the standard, to the session working on kit. Name the package and the entry.

Multi-value picker

  • Urgent
  • Warranty
  • Urgent
  • Warranty
  • Repeat customer
  • Awaiting parts
  • New label
Urgent, Warranty Labels help you find this job later.
Cannot be changed
  • Urgent
  • Warranty
  • Urgent
  • Warranty
  • Repeat customer
  • Awaiting parts
  • New label
Urgent, Warranty Only the owner can change this.
Source
<Kit.Phoenix.Roles.FormGroup.form_group id="phoenix-labels">
  <:label>Labels</:label>
  <:control :let={binding}>
    <Kit.Phoenix.Roles.MultiValuePicker.multi_value_picker
      binding={binding}
      name="labels"
      set={:names}
      chosen={[
        %Kit.Phoenix.Roles.RecordPicker.Record{id: "l-urgent", name: ["Urgent"]},
        %Kit.Phoenix.Roles.RecordPicker.Record{id: "l-warranty", name: ["Warranty"]}
      ]}
      recent={[
        %Kit.Phoenix.Roles.RecordPicker.Record{id: "l-urgent", name: ["Urgent"]},
        %Kit.Phoenix.Roles.RecordPicker.Record{id: "l-warranty", name: ["Warranty"]},
        %Kit.Phoenix.Roles.RecordPicker.Record{id: "l-repeat", name: ["Repeat customer"]},
        %Kit.Phoenix.Roles.RecordPicker.Record{id: "l-parts", name: ["Awaiting parts"]}
      ]}
      none="No labels match."
      query_event="search_labels"
    >
      <:new>label</:new>
    </Kit.Phoenix.Roles.MultiValuePicker.multi_value_picker>
  </:control>
  <:help>Labels help you find this job later.</:help>
  <:printed_value>Urgent, Warranty</:printed_value>
</Kit.Phoenix.Roles.FormGroup.form_group>
<Kit.Phoenix.Roles.FormGroup.form_group id="phoenix-labels-disabled">
<:label>Labels</:label>
<:control :let={binding}>
  <Kit.Phoenix.Roles.MultiValuePicker.multi_value_picker
    disabled
    binding={binding}
    name="labels"
    set={:names}
    chosen={[
      %Kit.Phoenix.Roles.RecordPicker.Record{id: "l-urgent", name: ["Urgent"]},
      %Kit.Phoenix.Roles.RecordPicker.Record{id: "l-warranty", name: ["Warranty"]}
    ]}
    recent={[
      %Kit.Phoenix.Roles.RecordPicker.Record{id: "l-urgent", name: ["Urgent"]},
      %Kit.Phoenix.Roles.RecordPicker.Record{id: "l-warranty", name: ["Warranty"]},
      %Kit.Phoenix.Roles.RecordPicker.Record{id: "l-repeat", name: ["Repeat customer"]},
      %Kit.Phoenix.Roles.RecordPicker.Record{id: "l-parts", name: ["Awaiting parts"]}
    ]}
    none="No labels match."
    query_event="search_labels"
  >
    <:new>label</:new>
  </Kit.Phoenix.Roles.MultiValuePicker.multi_value_picker>
</:control>
<:help>Only the owner can change this.</:help>
<:printed_value>Urgent, Warranty</:printed_value>
</Kit.Phoenix.Roles.FormGroup.form_group>

Multi-value picker, open

Show it open

Source
<Kit.Phoenix.Roles.FormGroup.form_group id="phoenix-labels-recent">
  <:label>Labels</:label>
  <:control :let={binding}>
    <Kit.Phoenix.Roles.MultiValuePicker.multi_value_picker
      binding={binding}
      name="labels"
      set={:names}
      chosen={[%Kit.Phoenix.Roles.RecordPicker.Record{id: "l-urgent", name: ["Urgent"]}]}
      recent={[
        %Kit.Phoenix.Roles.RecordPicker.Record{id: "l-urgent", name: ["Urgent"]},
        %Kit.Phoenix.Roles.RecordPicker.Record{id: "l-warranty", name: ["Warranty"]},
        %Kit.Phoenix.Roles.RecordPicker.Record{id: "l-repeat", name: ["Repeat customer"]},
        %Kit.Phoenix.Roles.RecordPicker.Record{id: "l-parts", name: ["Awaiting parts"]}
      ]}
      none="No labels match."
      query_event="search_labels"
    >
      <:new>label</:new>
    </Kit.Phoenix.Roles.MultiValuePicker.multi_value_picker>
  </:control>
  <:printed_value>Urgent</:printed_value>
</Kit.Phoenix.Roles.FormGroup.form_group>

Multi-value picker, matches

Show it open

Source
<Kit.Phoenix.Roles.FormGroup.form_group id="phoenix-labels-matches">
  <:label>Labels</:label>
  <:control :let={binding}>
    <Kit.Phoenix.Roles.MultiValuePicker.multi_value_picker
      binding={binding}
      name="labels"
      set={:names}
      chosen={[
        %Kit.Phoenix.Roles.RecordPicker.Record{id: "l-urgent", name: ["Urgent"]},
        %Kit.Phoenix.Roles.RecordPicker.Record{id: "l-warranty", name: ["Warranty"]}
      ]}
      matches={[
        %Kit.Phoenix.Roles.RecordPicker.Record{id: "l-warranty", name: [{:matched, "Wa"}, "rranty"]},
        %Kit.Phoenix.Roles.RecordPicker.Record{id: "l-parts", name: ["A", {:matched, "wa"}, "iting parts"]},
        %Kit.Phoenix.Roles.RecordPicker.Record{id: "l-waste", name: [{:matched, "Wa"}, "ste collection"]}
      ]}
      none="No labels match."
      query_event="search_labels"
    >
      <:new>label</:new>
    </Kit.Phoenix.Roles.MultiValuePicker.multi_value_picker>
  </:control>
  <:printed_value>Urgent, Warranty</:printed_value>
</Kit.Phoenix.Roles.FormGroup.form_group>

Multi-value picker, tags

  • Regular
  • Harbourside Community Association Youth Theatre and Drama Club rehearsals
  • Regular
  • Wedding
  • Needs parking
  • Harbourside Community Association Youth Theatre and Drama Club rehearsals
  • New tag
Regular, Harbourside Community Association Youth Theatre and Drama Club rehearsals
Source
<Kit.Phoenix.Roles.FormGroup.form_group id="phoenix-tags">
  <:label>Tags</:label>
  <:control :let={binding}>
    <Kit.Phoenix.Roles.MultiValuePicker.multi_value_picker
      binding={binding}
      name="tags"
      set={:tags}
      chosen={[
        %Kit.Phoenix.Roles.RecordPicker.Record{id: "t-regular", name: ["Regular"], colour: "#27ae60"},
        %Kit.Phoenix.Roles.RecordPicker.Record{id: "t-drama", name: ["Harbourside Community Association Youth Theatre and Drama Club rehearsals"], colour: "#c0392b"}
      ]}
      recent={[
        %Kit.Phoenix.Roles.RecordPicker.Record{id: "t-regular", name: ["Regular"], colour: "#27ae60"},
        %Kit.Phoenix.Roles.RecordPicker.Record{id: "t-wedding", name: ["Wedding"], colour: "#8e44ad"},
        %Kit.Phoenix.Roles.RecordPicker.Record{id: "t-parking", name: ["Needs parking"], colour: "#d35400"},
        %Kit.Phoenix.Roles.RecordPicker.Record{id: "t-drama", name: ["Harbourside Community Association Youth Theatre and Drama Club rehearsals"], colour: "#c0392b"}
      ]}
      none="No tags match."
      query_event="search_tags"
    >
      <:new>tag</:new>
    </Kit.Phoenix.Roles.MultiValuePicker.multi_value_picker>
  </:control>
  <:printed_value>Regular, Harbourside Community Association Youth Theatre and Drama Club rehearsals</:printed_value>
</Kit.Phoenix.Roles.FormGroup.form_group>