Fix hoover tooltip for company logo [SCI-7766] (#4827)

This commit is contained in:
ajugo 2023-01-16 10:23:34 +01:00 committed by GitHub
parent 1e01d1f2b7
commit 56fb8a4efa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View file

@ -7,7 +7,7 @@ class LabelTemplatesController < ApplicationController
before_action :check_view_permissions, except: %i(create duplicate set_default delete update)
before_action :check_manage_permissions, only: %i(create duplicate set_default delete update)
before_action :load_label_templates, only: %i(index datatable)
before_action :load_label_template, only: %i(show set_default update)
before_action :load_label_template, only: %i(show set_default update template_tags)
layout 'fluid'
@ -125,7 +125,7 @@ class LabelTemplatesController < ApplicationController
end
def template_tags
render json: LabelTemplates::TagService.new(current_team).tags
render json: LabelTemplates::TagService.new(current_team, @label_template).tags
end
def zpl_preview

View file

@ -15,7 +15,7 @@ class LabelTemplateSerializer < ActiveModel::Serializer
return {} unless can_manage_label_templates?(object.team)
{
update: label_template_path(object),
fields: template_tags_label_templates_path
fields: template_tags_label_templates_path(id: object.id)
}
end
end

View file

@ -9,8 +9,9 @@ module LabelTemplates
{ key: 'added_by', tag: '{{ADDED_BY}}' }
].freeze
def initialize(team)
def initialize(team, label_template)
@team = team
@label_template = label_template
end
def tags