Merge pull request #10806 from mfo/US/fix-number-not-number-in-filters
Correctif: ETQ instructeur, la recherche par numéro de dossier ne doit accepter que des numero
This commit is contained in:
commit
1e0391c9dc
2 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@ module ColumnsConcern
|
||||||
end
|
end
|
||||||
|
|
||||||
def dossier_columns
|
def dossier_columns
|
||||||
common = [Column.new(table: 'self', column: 'id', classname: 'number-col'), Column.new(table: 'notifications', column: 'notifications', label: "notifications", filterable: false)]
|
common = [Column.new(table: 'self', column: 'id', classname: 'number-col', type: :number), Column.new(table: 'notifications', column: 'notifications', label: "notifications", filterable: false)]
|
||||||
|
|
||||||
dates = ['created_at', 'updated_at', 'depose_at', 'en_construction_at', 'en_instruction_at', 'processed_at']
|
dates = ['created_at', 'updated_at', 'depose_at', 'en_construction_at', 'en_instruction_at', 'processed_at']
|
||||||
.map { |column| Column.new(table: 'self', column:, type: :date) }
|
.map { |column| Column.new(table: 'self', column:, type: :date) }
|
||||||
|
|
|
@ -12,7 +12,7 @@ describe ColumnsConcern do
|
||||||
let(:tdc_private_2) { procedure.active_revision.types_de_champ_private[1] }
|
let(:tdc_private_2) { procedure.active_revision.types_de_champ_private[1] }
|
||||||
let(:expected) {
|
let(:expected) {
|
||||||
[
|
[
|
||||||
{ label: 'Nº dossier', table: 'self', column: 'id', classname: 'number-col', displayable: true, type: :text, scope: '', value_column: :value, filterable: true },
|
{ label: 'Nº dossier', table: 'self', column: 'id', classname: 'number-col', displayable: true, type: :number, scope: '', value_column: :value, filterable: true },
|
||||||
{ label: 'notifications', table: 'notifications', column: 'notifications', displayable: true, type: :text, scope: '', value_column: :value, filterable: false },
|
{ label: 'notifications', table: 'notifications', column: 'notifications', displayable: true, type: :text, scope: '', value_column: :value, filterable: false },
|
||||||
{ label: 'Créé le', table: 'self', column: 'created_at', classname: '', displayable: true, type: :date, scope: '', value_column: :value, filterable: true },
|
{ label: 'Créé le', table: 'self', column: 'created_at', classname: '', displayable: true, type: :date, scope: '', value_column: :value, filterable: true },
|
||||||
{ label: 'Mis à jour le', table: 'self', column: 'updated_at', classname: '', displayable: true, type: :date, scope: '', value_column: :value, filterable: true },
|
{ label: 'Mis à jour le', table: 'self', column: 'updated_at', classname: '', displayable: true, type: :date, scope: '', value_column: :value, filterable: true },
|
||||||
|
|
Loading…
Reference in a new issue