Feat: Blog new article.
This commit is contained in:
@@ -128,18 +128,28 @@ class Parameters_Bribe(Get_Many_Parameters_Base):
|
||||
get_inactive_bribe: bool
|
||||
ids_bribe: str
|
||||
names_bribe: str
|
||||
get_all_user: bool
|
||||
get_inactive_user: bool
|
||||
ids_user: str
|
||||
names_user: str
|
||||
emails_user: str
|
||||
require_all_id_search_filters_met: bool
|
||||
require_any_id_search_filters_met: bool
|
||||
require_all_non_id_search_filters_met: bool
|
||||
require_any_non_id_search_filters_met: bool
|
||||
|
||||
@classmethod
|
||||
def get_default(cls):
|
||||
def get_default(cls, id_user_session):
|
||||
return cls(
|
||||
get_all_bribe = True
|
||||
, get_inactive_bribe = False
|
||||
, ids_bribe = ''
|
||||
, names_bribe = ''
|
||||
, get_all_user = False
|
||||
, get_inactive_user = False
|
||||
, ids_user = str(id_user_session)
|
||||
, names_user = ''
|
||||
, emails_user = ''
|
||||
, require_all_id_search_filters_met = True
|
||||
, require_any_id_search_filters_met = True
|
||||
, require_all_non_id_search_filters_met = False
|
||||
@@ -153,6 +163,11 @@ class Parameters_Bribe(Get_Many_Parameters_Base):
|
||||
, get_inactive_bribe = json.get('a_get_inactive_bribe', False)
|
||||
, ids_bribe = json.get('a_ids_bribe', '')
|
||||
, names_bribe = json.get('a_names_bribe', '')
|
||||
, get_all_user = json.get('a_get_all_user', False)
|
||||
, get_inactive_user = json.get('a_get_inactive_user', False)
|
||||
, ids_user = json.get('a_ids_user', '')
|
||||
, names_user = json.get('a_names_user', '')
|
||||
, emails_user = json.get('a_emails_user', '')
|
||||
, require_all_id_search_filters_met = json.get('a_require_all_id_search_filters_met', True)
|
||||
, require_any_id_search_filters_met = json.get('a_require_any_id_search_filters_met', True)
|
||||
, require_all_non_id_search_filters_met = json.get('a_require_all_non_id_search_filters_met', False)
|
||||
@@ -180,6 +195,11 @@ class Parameters_Bribe(Get_Many_Parameters_Base):
|
||||
, 'a_get_inactive_bribe': self.get_inactive_bribe
|
||||
, 'a_ids_bribe': self.ids_bribe
|
||||
, 'a_names_bribe': self.names_bribe
|
||||
, 'a_get_all_user': self.get_all_user
|
||||
, 'a_get_inactive_user': self.get_inactive_user
|
||||
, 'a_ids_user': self.ids_user
|
||||
, 'a_names_user': self.names_user
|
||||
, 'a_emails_user': self.emails_user
|
||||
, 'a_require_all_id_search_filters_met': self.require_all_id_search_filters_met
|
||||
, 'a_require_any_id_search_filters_met': self.require_any_id_search_filters_met
|
||||
, 'a_require_all_non_id_search_filters_met': self.require_all_non_id_search_filters_met
|
||||
|
||||
@@ -157,6 +157,11 @@ class Parameters_Button_Icon(Get_Many_Parameters_Base):
|
||||
get_inactive_image: bool
|
||||
ids_image: str
|
||||
names_image: str
|
||||
get_all_user: bool
|
||||
get_inactive_user: bool
|
||||
ids_user: str
|
||||
names_user: str
|
||||
emails_user: str
|
||||
get_all_button_icon: bool
|
||||
get_inactive_button_icon: bool
|
||||
ids_button_icon: str
|
||||
@@ -168,7 +173,7 @@ class Parameters_Button_Icon(Get_Many_Parameters_Base):
|
||||
require_any_non_id_search_filters_met: bool
|
||||
|
||||
@classmethod
|
||||
def get_default(cls):
|
||||
def get_default(cls, id_user_session):
|
||||
return cls(
|
||||
get_all_file_type = True
|
||||
, get_inactive_file_type = False
|
||||
@@ -178,6 +183,11 @@ class Parameters_Button_Icon(Get_Many_Parameters_Base):
|
||||
, get_inactive_image = False
|
||||
, ids_image = ''
|
||||
, names_image = ''
|
||||
, get_all_user = False
|
||||
, get_inactive_user = False
|
||||
, ids_user = str(id_user_session)
|
||||
, names_user = ''
|
||||
, emails_user = ''
|
||||
, get_all_button_icon = True
|
||||
, get_inactive_button_icon = False
|
||||
, ids_button_icon = ''
|
||||
@@ -200,6 +210,11 @@ class Parameters_Button_Icon(Get_Many_Parameters_Base):
|
||||
, get_inactive_image = json.get('a_get_inactive_image', False)
|
||||
, ids_image = json.get('a_ids_image', '')
|
||||
, names_image = json.get('a_names_image', '')
|
||||
, get_all_user = json.get('a_get_all_user', False)
|
||||
, get_inactive_user = json.get('a_get_inactive_user', False)
|
||||
, ids_user = json.get('a_ids_user', '')
|
||||
, names_user = json.get('a_names_user', '')
|
||||
, emails_user = json.get('a_emails_user', '')
|
||||
, get_all_button_icon = json.get('a_get_all_button_icon', False)
|
||||
, get_inactive_button_icon = json.get('a_get_inactive_button_icon', False)
|
||||
, ids_button_icon = json.get('a_ids_button_icon', '')
|
||||
@@ -212,11 +227,11 @@ class Parameters_Button_Icon(Get_Many_Parameters_Base):
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def from_form_filters_button_icon(cls, form):
|
||||
def from_form_filters_button_icon(cls, form, id_user_session):
|
||||
av.val_instance(form, 'form', 'Parameters_Button_Icon.from_form_filters_button_icon', Filters_Button_Icon)
|
||||
has_filter_search_text = not (form.search.data == '' or form.search.data is None)
|
||||
active_only = av.input_bool(form.active_only.data, "active", "Parameters_Button_Icon.from_form_filters_button_icon")
|
||||
filters = cls.get_default()
|
||||
filters = cls.get_default(id_user_session)
|
||||
filters.get_all_file_type = True
|
||||
filters.get_inactive_file_type = not active_only
|
||||
filters.ids_file_type = ''
|
||||
@@ -242,6 +257,11 @@ class Parameters_Button_Icon(Get_Many_Parameters_Base):
|
||||
, 'a_get_inactive_image': self.get_inactive_image
|
||||
, 'a_ids_image': self.ids_image
|
||||
, 'a_names_image': self.names_image
|
||||
, 'a_get_all_user': self.get_all_user
|
||||
, 'a_get_inactive_user': self.get_inactive_user
|
||||
, 'a_ids_user': self.ids_user
|
||||
, 'a_names_user': self.names_user
|
||||
, 'a_emails_user': self.emails_user
|
||||
, 'a_get_all_button_icon': self.get_all_button_icon
|
||||
, 'a_get_inactive_button_icon': self.get_inactive_button_icon
|
||||
, 'a_ids_button_icon': self.ids_button_icon
|
||||
|
||||
@@ -190,13 +190,18 @@ class Parameters_Command_Button_Link(Get_Many_Parameters_Base):
|
||||
get_inactive_location: bool
|
||||
ids_location: str
|
||||
names_location: str
|
||||
get_all_user: bool
|
||||
get_inactive_user: bool
|
||||
ids_user: str
|
||||
names_user: str
|
||||
emails_user: str
|
||||
require_all_id_search_filters_met: bool
|
||||
require_any_id_search_filters_met: bool
|
||||
require_all_non_id_search_filters_met: bool
|
||||
require_any_non_id_search_filters_met: bool
|
||||
|
||||
@classmethod
|
||||
def get_default(cls):
|
||||
def get_default(cls, id_user_session):
|
||||
return cls(
|
||||
get_all_link = True
|
||||
, get_inactive_link = False
|
||||
@@ -237,6 +242,11 @@ class Parameters_Command_Button_Link(Get_Many_Parameters_Base):
|
||||
, get_inactive_location = False
|
||||
, ids_location = ''
|
||||
, names_location = ''
|
||||
, get_all_user = False
|
||||
, get_inactive_user = False
|
||||
, ids_user = str(id_user_session)
|
||||
, names_user = ''
|
||||
, emails_user = ''
|
||||
, require_all_id_search_filters_met = True
|
||||
, require_any_id_search_filters_met = True
|
||||
, require_all_non_id_search_filters_met = False
|
||||
@@ -285,6 +295,11 @@ class Parameters_Command_Button_Link(Get_Many_Parameters_Base):
|
||||
, get_inactive_location = json.get('a_get_inactive_location', False)
|
||||
, ids_location = json.get('a_ids_location', '')
|
||||
, names_location = json.get('a_names_location', '')
|
||||
, get_all_user = json.get('a_get_all_user', False)
|
||||
, get_inactive_user = json.get('a_get_inactive_user', False)
|
||||
, ids_user = json.get('a_ids_user', '')
|
||||
, names_user = json.get('a_names_user', '')
|
||||
, emails_user = json.get('a_emails_user', '')
|
||||
, require_all_id_search_filters_met = json.get('a_require_all_id_search_filters_met', True)
|
||||
, require_any_id_search_filters_met = json.get('a_require_any_id_search_filters_met', True)
|
||||
, require_all_non_id_search_filters_met = json.get('a_require_all_non_id_search_filters_met', False)
|
||||
@@ -292,7 +307,7 @@ class Parameters_Command_Button_Link(Get_Many_Parameters_Base):
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def from_form_filters_command_button_link(cls, form):
|
||||
def from_form_filters_command_button_link(cls, form, id_user_session):
|
||||
_m = f'{cls.__qualname__}.from_form_filters_command_button_link'
|
||||
av.val_instance(form, 'form', _m, Filters_Command_Button_Link)
|
||||
has_filter_search_text = not (form.search.data == '' or form.search.data is None)
|
||||
@@ -304,7 +319,7 @@ class Parameters_Command_Button_Link(Get_Many_Parameters_Base):
|
||||
has_filter_location = not (form.id_location.data == '0' or form.id_location.data == '' or form.id_location.data is None)
|
||||
active_only = av.input_bool(form.active_only.data, "active", _m)
|
||||
|
||||
filters = cls.get_default()
|
||||
filters = cls.get_default(id_user_session)
|
||||
filters.get_all_link = True
|
||||
filters.get_inactive_link = not active_only
|
||||
filters.ids_link = ''
|
||||
@@ -387,6 +402,11 @@ class Parameters_Command_Button_Link(Get_Many_Parameters_Base):
|
||||
, 'a_get_inactive_location': self.get_inactive_location
|
||||
, 'a_ids_location': self.ids_location
|
||||
, 'a_names_location': self.names_location
|
||||
, 'a_get_all_user': self.get_all_user
|
||||
, 'a_get_inactive_user': self.get_inactive_user
|
||||
, 'a_ids_user': self.ids_user
|
||||
, 'a_names_user': self.names_user
|
||||
, 'a_emails_user': self.emails_user
|
||||
, 'a_require_all_id_search_filters_met': self.require_all_id_search_filters_met
|
||||
, 'a_require_any_id_search_filters_met': self.require_any_id_search_filters_met
|
||||
, 'a_require_all_non_id_search_filters_met': self.require_all_non_id_search_filters_met
|
||||
|
||||
@@ -159,6 +159,11 @@ class Parameters_Dog_Command_Link(Get_Many_Parameters_Base):
|
||||
hand_signal_descriptions_link: str
|
||||
notes_command: str
|
||||
notes_link: str
|
||||
get_all_user: bool
|
||||
get_inactive_user: bool
|
||||
ids_user: str
|
||||
names_user: str
|
||||
emails_user: str
|
||||
require_all_id_search_filters_met: bool
|
||||
require_any_id_search_filters_met: bool
|
||||
require_all_non_id_search_filters_met: bool
|
||||
@@ -185,6 +190,11 @@ class Parameters_Dog_Command_Link(Get_Many_Parameters_Base):
|
||||
, hand_signal_descriptions_link = ''
|
||||
, notes_command = ''
|
||||
, notes_link = ''
|
||||
, get_all_user = False
|
||||
, get_inactive_user = False
|
||||
, ids_user = str(id_user_session)
|
||||
, names_user = ''
|
||||
, emails_user = ''
|
||||
, require_all_id_search_filters_met = True
|
||||
, require_any_id_search_filters_met = True
|
||||
, require_all_non_id_search_filters_met = False
|
||||
@@ -212,6 +222,11 @@ class Parameters_Dog_Command_Link(Get_Many_Parameters_Base):
|
||||
, hand_signal_descriptions_link = json.get('a_hand_signal_descriptions_link', '')
|
||||
, notes_command = json.get('a_notes_command', '')
|
||||
, notes_link = json.get('a_notes_link', '')
|
||||
, get_all_user = json.get('a_get_all_user', False)
|
||||
, get_inactive_user = json.get('a_get_inactive_user', False)
|
||||
, ids_user = json.get('a_ids_user', '')
|
||||
, names_user = json.get('a_names_user', '')
|
||||
, emails_user = json.get('a_emails_user', '')
|
||||
, require_all_id_search_filters_met = json.get('a_require_all_id_search_filters_met', True)
|
||||
, require_any_id_search_filters_met = json.get('a_require_any_id_search_filters_met', True)
|
||||
, require_all_non_id_search_filters_met = json.get('a_require_all_non_id_search_filters_met', False)
|
||||
@@ -219,7 +234,7 @@ class Parameters_Dog_Command_Link(Get_Many_Parameters_Base):
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def from_form_filters_dog_command_link(cls, form):
|
||||
def from_form_filters_dog_command_link(cls, form, id_user_session):
|
||||
_m = f'{cls.__qualname__}.from_form_filters_dog_command_link'
|
||||
av.val_instance(form, 'form', _m, Filters_Dog_Command_Link)
|
||||
has_filter_search_text = not (form.search.data == '' or form.search.data is None)
|
||||
@@ -228,7 +243,7 @@ class Parameters_Dog_Command_Link(Get_Many_Parameters_Base):
|
||||
has_filter_command = not (form.id_command.data == '0' or form.id_command.data == '' or form.id_command.data is None)
|
||||
active_only = av.input_bool(form.active_only.data, "active", _m)
|
||||
|
||||
filters = cls.get_default()
|
||||
filters = cls.get_default(id_user_session)
|
||||
filters.get_all_link = True
|
||||
filters.get_inactive_link = not active_only
|
||||
filters.ids_link = ''
|
||||
@@ -269,6 +284,11 @@ class Parameters_Dog_Command_Link(Get_Many_Parameters_Base):
|
||||
, 'a_hand_signal_descriptions_link': self.hand_signal_descriptions_link
|
||||
, 'a_notes_command': self.notes_command
|
||||
, 'a_notes_link': self.notes_link
|
||||
, 'a_get_all_user': self.get_all_user
|
||||
, 'a_get_inactive_user': self.get_inactive_user
|
||||
, 'a_ids_user': self.ids_user
|
||||
, 'a_names_user': self.names_user
|
||||
, 'a_emails_user': self.emails_user
|
||||
, 'a_require_all_id_search_filters_met': self.require_all_id_search_filters_met
|
||||
, 'a_require_any_id_search_filters_met': self.require_any_id_search_filters_met
|
||||
, 'a_require_all_non_id_search_filters_met': self.require_all_non_id_search_filters_met
|
||||
|
||||
@@ -209,11 +209,11 @@ class Parameters_Location(Get_Many_Parameters_Base):
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def from_form_filters_location(cls, form):
|
||||
def from_form_filters_location(cls, form, id_user_session):
|
||||
av.val_instance(form, 'form', 'Parameters_Location.from_form_filters_location', Filters_Location)
|
||||
has_filter_search_text = not (form.search.data == '' or form.search.data is None)
|
||||
active_only = av.input_bool(form.active_only.data, "active", "Parameters_Location.from_form_filters_location")
|
||||
filters = cls.get_default()
|
||||
filters = cls.get_default(id_user_session)
|
||||
filters.get_all_location = True
|
||||
filters.get_inactive_location = not active_only
|
||||
filters.ids_location = ''
|
||||
|
||||
@@ -274,7 +274,8 @@ class Model_View_Base(BaseModel, ABC):
|
||||
HASH_PAGE_ACCESSIBILITY_STATEMENT: ClassVar[str] = '/accessibility-statement'
|
||||
HASH_PAGE_ADMIN_HOME: ClassVar[str] = '/admin'
|
||||
HASH_PAGE_APPLY_FOUNDING_PARTNER: ClassVar[str] = '/apply-founding-partner'
|
||||
HASH_PAGE_APPLY_FOUNDING_PARTNER_SUCCESS: ClassVar[str] = '/apply-founding-partner-success'#
|
||||
HASH_PAGE_APPLY_FOUNDING_PARTNER_SUCCESS: ClassVar[str] = '/apply-founding-partner-success'
|
||||
HASH_PAGE_BLOG_ARTICLE_5_WAYS_TO_INCREASE_CLIENT_RETENTION_IN_YOUR_DOG_TRAINING_BUSINESS: ClassVar[str] = '/blog/article/5-ways-to-increase-client-retention-in-your-dog-training-business'
|
||||
HASH_PAGE_BLOG_ARTICLE_HOW_TO_SCALE_YOUR_DOG_TRAINING_BUSINESS_FROM_25_TO_100_PLUS_CLIENTS: ClassVar[str] = '/blog/article/how-to-scale-your-dog-training-business-from-25-to-100-plus-clients'
|
||||
HASH_PAGE_BLOG_ARTICLE_HOW_TO_SCALE_YOUR_DOG_TRAINING_BUSINESS_FROM_SOLO_TO_MULTI_TRAINER_SUCCESS: ClassVar[str] = '/blog/article/how-to-scale-your-dog-training-business-from-solo-to-multi-trainer-success'
|
||||
HASH_PAGE_BLOG_ARTICLE_THE_HIDDEN_COSTS_OF_SPREADSHEET_DOG_TRAINING_WHY_UK_TRAINERS_ARE_LOSING_2000_PLUS_POUNDS_PER_YEAR: ClassVar[str] = '/blog/article/the-hidden-costs-of-spreadsheet-dog-training-why-uk-trainers-are-losing-2000-plus-pounds-per-year'
|
||||
|
||||
@@ -160,7 +160,7 @@ class Model_View_Dog_Assessment(Model_View_Dog_Base):
|
||||
self.form_filters.id_command_modality.choices += [(str(command_modality.id_command_modality), command_modality.name) for command_modality in self.filter_command_modalities]
|
||||
"""
|
||||
|
||||
parameters_filter_bribe = Parameters_Bribe.get_default()
|
||||
parameters_filter_bribe = Parameters_Bribe.get_default(user_session.id_user)
|
||||
self.filter_bribes, errors = datastore_dog.get_many_bribe(parameters_filter_bribe)
|
||||
"""
|
||||
if len(self.filter_bribes) > 0:
|
||||
|
||||
@@ -35,8 +35,8 @@ class Model_View_Dog_Button_Icon(Model_View_Dog_Base):
|
||||
self._title = 'Button Icon'
|
||||
self.form_filters = form_filters_old
|
||||
datastore = DataStore_Dog()
|
||||
|
||||
user_session = datastore.get_user_session()
|
||||
Helper_App.console_log(f'Form filters: {self.form_filters}')
|
||||
parameters_filter_button_icon = Parameters_Button_Icon.from_form_filters_button_icon(self.form_filters)
|
||||
parameters_filter_button_icon = Parameters_Button_Icon.from_form_filters_button_icon(self.form_filters, user_session.id_user)
|
||||
Helper_App.console_log(f'Query args: {parameters_filter_button_icon}')
|
||||
self.button_icons, errors = datastore.get_many_button_icon(parameters_filter_button_icon)
|
||||
|
||||
@@ -46,6 +46,6 @@ class Model_View_Dog_Command(Model_View_Dog_Base):
|
||||
self.form_filters.id_command_category.choices += [(str(command_category.id_command_category), command_category.name) for command_category in self.filter_command_categories]
|
||||
|
||||
Helper_App.console_log(f'Form filters: {self.form_filters}')
|
||||
parameters_filter_command = Parameters_Command.from_form_filters_command(self.form_filters)
|
||||
parameters_filter_command = Parameters_Command.from_form_filters_command(self.form_filters, user_session.id_user)
|
||||
Helper_App.console_log(f'Query args: {parameters_filter_command}')
|
||||
command_categories, self.commands, errors = datastore.get_many_command(parameters_filter_command)
|
||||
|
||||
@@ -73,7 +73,7 @@ class Model_View_Dog_Command_Button_Link(Model_View_Dog_Base):
|
||||
if len(self.filter_colours) > 0:
|
||||
self.form_filters.id_colour.choices += [(str(colour.id_colour), colour.name) for colour in self.filter_colours]
|
||||
|
||||
parameters_filter_button_icon = Parameters_Button_Icon.get_default()
|
||||
parameters_filter_button_icon = Parameters_Button_Icon.get_default(user_session.id_user)
|
||||
self.filter_button_icons, errors = datastore.get_many_button_icon(parameters_filter_button_icon)
|
||||
if len(self.filter_button_icons) > 0:
|
||||
self.form_filters.id_button_icon.choices += [(str(button_icon.id_button_icon), button_icon.name) for button_icon in self.filter_button_icons]
|
||||
@@ -84,6 +84,6 @@ class Model_View_Dog_Command_Button_Link(Model_View_Dog_Base):
|
||||
self.form_filters.id_location.choices += [(str(location.id_location), location.name) for location in self.filter_locations]
|
||||
|
||||
Helper_App.console_log(f'Form filters: {self.form_filters}')
|
||||
parameters_command_button_link = Parameters_Command_Button_Link.from_form_filters_command_button_link(self.form_filters)
|
||||
parameters_command_button_link = Parameters_Command_Button_Link.from_form_filters_command_button_link(self.form_filters, user_session.id_user)
|
||||
Helper_App.console_log(f'Query args: {parameters_command_button_link}')
|
||||
self.command_button_links, errors = datastore.get_many_command_button_link(parameters_command_button_link)
|
||||
@@ -36,9 +36,10 @@ class Model_View_Dog_Command_Category(Model_View_Dog_Base):
|
||||
self._title = 'Command Category'
|
||||
self.form_filters = form_filters_old
|
||||
datastore = DataStore_Dog()
|
||||
user_session = datastore.get_user_session()
|
||||
|
||||
Helper_App.console_log(f'Form filters: {self.form_filters}')
|
||||
parameters_filter_command = Parameters_Command.from_form_filters_command_category(self.form_filters)
|
||||
parameters_filter_command = Parameters_Command.from_form_filters_command_category(self.form_filters, user_session.id_user)
|
||||
Helper_App.console_log(f'Query args: {parameters_filter_command}')
|
||||
self.command_categories, commands, errors = datastore.get_many_command(parameters_filter_command)
|
||||
|
||||
|
||||
@@ -35,8 +35,8 @@ class Model_View_Dog_Dog(Model_View_Dog_Base):
|
||||
self._title = 'Dog'
|
||||
self.form_filters = form_filters_old
|
||||
datastore = DataStore_Dog()
|
||||
|
||||
user_session = datastore.get_user_session()
|
||||
Helper_App.console_log(f'Form filters: {self.form_filters}')
|
||||
parameters_filter_dog = Parameters_Dog.from_form_filters_dog(self.form_filters)
|
||||
parameters_filter_dog = Parameters_Dog.from_form_filters_dog(self.form_filters, user_session.id_user)
|
||||
Helper_App.console_log(f'Query args: {parameters_filter_dog}')
|
||||
self.dogs, errors = datastore.get_many_dog(parameters_filter_dog)
|
||||
|
||||
@@ -61,6 +61,6 @@ class Model_View_Dog_Dog_Command_Link(Model_View_Dog_Base):
|
||||
self.form_filters.id_command.choices += [(str(command.id_command), command.name) for command in sorted_filter_commands] # .sort(key = lambda command: command[1])
|
||||
|
||||
Helper_App.console_log(f'Form filters: {self.form_filters}')
|
||||
parameters_filter_dog_command_link = Parameters_Dog_Command_Link.from_form_filters_dog_command_link(self.form_filters)
|
||||
parameters_filter_dog_command_link = Parameters_Dog_Command_Link.from_form_filters_dog_command_link(self.form_filters, user_session.id_user)
|
||||
Helper_App.console_log(f'Query args: {parameters_filter_dog_command_link}')
|
||||
self.dog_command_links, errors = datastore.get_many_dog_command_link(parameters_filter_dog_command_link)
|
||||
@@ -35,9 +35,9 @@ class Model_View_Dog_Location(Model_View_Dog_Base):
|
||||
self._title = 'Location'
|
||||
self.form_filters = form_filters_old
|
||||
datastore = DataStore_Dog()
|
||||
|
||||
user_session = datastore.get_user_session()
|
||||
Helper_App.console_log(f'Form filters: {self.form_filters}')
|
||||
parameters_filter_location = Parameters_Location.from_form_filters_location(self.form_filters)
|
||||
parameters_filter_location = Parameters_Location.from_form_filters_location(self.form_filters, user_session.id_user)
|
||||
Helper_App.console_log(f'Query args: {parameters_filter_location}')
|
||||
self.locations, errors = datastore.get_many_location(parameters_filter_location)
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -25,6 +25,11 @@ CREATE PROCEDURE fetchmetrics.p_dog_get_many_dog_command_link (
|
||||
, IN a_hand_signal_descriptions_link TEXT
|
||||
, IN a_notes_command TEXT
|
||||
, IN a_notes_link TEXT
|
||||
, IN a_get_all_user BIT
|
||||
, IN a_get_inactive_user BIT
|
||||
, IN a_ids_user TEXT
|
||||
, IN a_names_user TEXT
|
||||
, IN a_emails_user TEXT
|
||||
, IN a_require_all_id_search_filters_met BIT
|
||||
, IN a_require_any_id_search_filters_met BIT
|
||||
, IN a_require_all_non_id_search_filters_met BIT
|
||||
@@ -35,6 +40,7 @@ BEGIN
|
||||
DECLARE v_code_type_error_bad_data VARCHAR(100);
|
||||
DECLARE v_code_type_error_no_permission VARCHAR(100);
|
||||
DECLARE v_code_type_error_warning VARCHAR(100);
|
||||
DECLARE v_guid BINARY(36);
|
||||
DECLARE v_has_filter_command_category_id BIT;
|
||||
DECLARE v_has_filter_command_category_name BIT;
|
||||
DECLARE v_has_filter_command_id BIT;
|
||||
@@ -46,13 +52,15 @@ BEGIN
|
||||
DECLARE v_has_filter_link_id BIT;
|
||||
DECLARE v_has_filter_link_notes BIT;
|
||||
DECLARE v_id_access_level_view INT;
|
||||
DECLARE v_id_permission_command_view INT;
|
||||
DECLARE v_id_permission_dog_view INT;
|
||||
DECLARE v_id_type_error_bad_data INT;
|
||||
DECLARE v_id_type_error_no_permission INT;
|
||||
DECLARE v_id_type_error_warning INT;
|
||||
DECLARE v_has_filter_dog BIT;
|
||||
DECLARE v_guid BINARY(36);
|
||||
DECLARE v_id_permission_dog_view INT;
|
||||
DECLARE v_id_minimum INT;
|
||||
DECLARE v_ids_permission_required VARCHAR(200);
|
||||
DECLARE v_is_super_user BIT;
|
||||
DECLARE v_priority_access_level_none INT;
|
||||
DECLARE v_priority_access_level_view INT;
|
||||
DECLARE v_time_start TIMESTAMP(6);
|
||||
DECLARE v_can_view BIT;
|
||||
|
||||
@@ -111,9 +119,17 @@ BEGIN
|
||||
SET v_id_type_error_bad_data := (SELECT ERROR_TYPE.id_type FROM fetchmetrics.CORE_Msg_Error_Type ERROR_TYPE WHERE ERROR_TYPE.code = v_code_type_error_bad_data LIMIT 1);
|
||||
SET v_id_type_error_no_permission := (SELECT ERROR_TYPE.id_type FROM fetchmetrics.CORE_Msg_Error_Type ERROR_TYPE WHERE ERROR_TYPE.code = v_code_type_error_no_permission LIMIT 1);
|
||||
SET v_id_type_error_warning := (SELECT ERROR_TYPE.id_type FROM fetchmetrics.CORE_Msg_Error_Type ERROR_TYPE WHERE ERROR_TYPE.code = v_code_type_error_warning LIMIT 1);
|
||||
SET v_id_permission_dog_view := (SELECT PERMISSION.id_permission FROM fetchmetrics.DOG_Permission PERMISSION WHERE PERMISSION.code = 'DOG_VIEW' LIMIT 1);
|
||||
SET v_id_permission_command_view := (SELECT PERMISSION.id_permission FROM fetchmetrics.DOG_Permission PERMISSION WHERE PERMISSION.code = 'COMMAND_VIEW' LIMIT 1);
|
||||
SET v_ids_permission_required := (SELECT PERMISSION.id_permission FROM fetchmetrics.DOG_Permission PERMISSION WHERE PERMISSION.code = 'DOG_VIEW' LIMIT 1);
|
||||
SET v_id_access_level_view := (SELECT ACCESS_LEVEL.id_access_level FROM fetchmetrics.DOG_Access_Level ACCESS_LEVEL WHERE ACCESS_LEVEL.code = 'VIEW' LIMIT 1);
|
||||
|
||||
SET v_ids_permission_required := (SELECT CONCAT(
|
||||
CONVERT(v_ids_permission_required, CHAR)
|
||||
, ','
|
||||
, CONVERT(v_id_permission_command_view, CHAR)
|
||||
));
|
||||
SET v_priority_access_level_none := (SELECT ACCESS_LEVEL.priority FROM fetchmetrics.DOG_Access_Level ACCESS_LEVEL WHERE ACCESS_LEVEL.code = 'NONE' LIMIT 1);
|
||||
SET v_priority_access_level_view := (SELECT ACCESS_LEVEL.priority FROM fetchmetrics.DOG_Access_Level ACCESS_LEVEL WHERE ACCESS_LEVEL.id_access_level = v_id_access_level_view);
|
||||
|
||||
SET a_id_user := IFNULL(a_id_user, 0);
|
||||
SET a_get_all_link := IFNULL(a_get_all_link, 0);
|
||||
SET a_get_inactive_link := IFNULL(a_get_inactive_link, 0);
|
||||
@@ -180,7 +196,9 @@ BEGIN
|
||||
, v_id_type_error_no_permission
|
||||
, v_id_type_error_warning
|
||||
, v_guid
|
||||
, v_id_permission_dog_view
|
||||
, v_id_permission_command_view
|
||||
, v_ids_permission_required
|
||||
, v_ids_permission_required
|
||||
, v_time_start
|
||||
;
|
||||
|
||||
@@ -295,7 +313,7 @@ BEGIN
|
||||
, 1 -- a_require_any_id_search_filters_met
|
||||
, 0 -- a_require_all_non_id_search_filters_met
|
||||
, 0 -- a_require_any_non_id_search_filters_met
|
||||
, v_id_permission_dog_view -- ids_permission
|
||||
, v_ids_permission_required -- ids_permission
|
||||
, v_id_access_level_view -- ids_access_level
|
||||
, 0 -- a_show_errors
|
||||
, 0 -- a_debug
|
||||
@@ -314,7 +332,7 @@ BEGIN
|
||||
, 1 -- a_require_any_id_search_filters_met
|
||||
, 0 -- a_require_all_non_id_search_filters_met
|
||||
, 0 -- a_require_any_non_id_search_filters_met
|
||||
, v_id_permission_dog_view -- ids_permission
|
||||
, v_ids_permission_required -- ids_permission
|
||||
, v_id_access_level_view -- ids_access_level
|
||||
, 0 -- a_show_errors
|
||||
, 0 -- a_debug
|
||||
@@ -367,6 +385,11 @@ BEGIN
|
||||
, a_get_inactive_dog -- a_get_inactive_dog
|
||||
, a_ids_dog -- a_ids_dog
|
||||
, a_names_dog -- a_names_dog
|
||||
, a_get_all_user -- get_all_user
|
||||
, a_get_inactive_user -- get_inactive_user
|
||||
, a_ids_user -- ids_user
|
||||
, a_names_user -- a_names_user
|
||||
, a_emails_user -- a_emails_user
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -383,6 +406,11 @@ BEGIN
|
||||
, a_get_inactive_dog -- a_get_inactive_dog
|
||||
, a_ids_dog -- a_ids_dog
|
||||
, a_names_dog -- a_names_dog
|
||||
, a_get_all_user -- get_all_user
|
||||
, a_get_inactive_user -- get_inactive_user
|
||||
, a_ids_user -- ids_user
|
||||
, a_names_user -- a_names_user
|
||||
, a_emails_user -- a_emails_user
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -437,6 +465,11 @@ BEGIN
|
||||
, a_names_command -- a_names_command
|
||||
, '' -- a_hand_signal_descriptions_link
|
||||
, a_notes_command -- a_notes_command
|
||||
, a_get_all_user -- get_all_user
|
||||
, a_get_inactive_user -- get_inactive_user
|
||||
, a_ids_user -- ids_user
|
||||
, a_names_user -- a_names_user
|
||||
, a_emails_user -- a_emails_user
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -459,6 +492,11 @@ BEGIN
|
||||
, a_names_command -- a_names_command
|
||||
, '' -- a_hand_signal_descriptions_link
|
||||
, a_notes_command -- a_notes_command
|
||||
, a_get_all_user -- get_all_user
|
||||
, a_get_inactive_user -- get_inactive_user
|
||||
, a_ids_user -- ids_user
|
||||
, a_names_user -- a_names_user
|
||||
, a_emails_user -- a_emails_user
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -882,6 +920,11 @@ CALL fetchmetrics.p_dog_get_many_dog_command_link (
|
||||
, 'pat' -- a_hand_signal_descriptions_link
|
||||
, 'pat' -- a_notes_command
|
||||
, 'pat' -- a_notes_link
|
||||
, 1 -- a_get_all_user
|
||||
, 0 -- a_get_inactive_user
|
||||
, '' -- a_ids_user
|
||||
, '' -- a_names_user
|
||||
, '' -- a_emails_user
|
||||
, 1 -- a_require_all_id_search_filters_met
|
||||
, 1 -- a_require_any_id_search_filters_met
|
||||
, 0 -- a_require_all_non_id_search_filters_met
|
||||
@@ -909,6 +952,11 @@ CALL fetchmetrics.p_dog_get_many_dog_command_link (
|
||||
, '' -- a_hand_signal_descriptions_link
|
||||
, '' -- a_notes_command
|
||||
, '' -- a_notes_link
|
||||
, 1 -- a_get_all_user
|
||||
, 0 -- a_get_inactive_user
|
||||
, '' -- a_ids_user
|
||||
, '' -- a_names_user
|
||||
, '' -- a_emails_user
|
||||
, 1 -- a_require_all_id_search_filters_met
|
||||
, 1 -- a_require_any_id_search_filters_met
|
||||
, 0 -- a_require_all_non_id_search_filters_met
|
||||
@@ -936,6 +984,11 @@ CALL fetchmetrics.p_dog_get_many_dog_command_link (
|
||||
, 'pat,point' -- a_hand_signal_descriptions_link
|
||||
, 'pat,point' -- a_notes_command
|
||||
, 'pat,point' -- a_notes_link
|
||||
, 1 -- a_get_all_user
|
||||
, 0 -- a_get_inactive_user
|
||||
, '' -- a_ids_user
|
||||
, '' -- a_names_user
|
||||
, '' -- a_emails_user
|
||||
, 1 -- a_require_all_id_search_filters_met
|
||||
, 1 -- a_require_any_id_search_filters_met
|
||||
, 0 -- a_require_all_non_id_search_filters_met
|
||||
|
||||
@@ -15,6 +15,11 @@ CREATE PROCEDURE fetchmetrics.p_dog_calc_button_icon (
|
||||
, IN a_get_inactive_image BIT
|
||||
, IN a_ids_image TEXT
|
||||
, IN a_names_image TEXT
|
||||
, IN a_get_all_user BIT
|
||||
, IN a_get_inactive_user BIT
|
||||
, IN a_ids_user TEXT
|
||||
, IN a_names_user TEXT
|
||||
, IN a_emails_user TEXT
|
||||
, IN a_get_all_button_icon BIT
|
||||
, IN a_get_inactive_button_icon BIT
|
||||
, IN a_ids_button_icon TEXT
|
||||
@@ -136,6 +141,11 @@ BEGIN
|
||||
, a_get_inactive_image
|
||||
, a_ids_image
|
||||
, a_names_image
|
||||
, a_get_all_user
|
||||
, a_get_inactive_user
|
||||
, a_ids_user
|
||||
, a_names_user
|
||||
, a_emails_user
|
||||
, a_get_all_button_icon
|
||||
, a_get_inactive_button_icon
|
||||
, a_ids_button_icon
|
||||
@@ -230,6 +240,11 @@ BEGIN
|
||||
, a_get_inactive_image -- a_get_inactive_image
|
||||
, a_ids_image -- a_ids_image
|
||||
, a_names_image -- a_names_image
|
||||
, a_get_all_user -- get_all_user
|
||||
, a_get_inactive_user -- get_inactive_user
|
||||
, a_ids_user -- ids_user
|
||||
, a_names_user -- a_names_user
|
||||
, a_emails_user -- a_emails_user
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -254,6 +269,11 @@ BEGIN
|
||||
, a_get_inactive_image -- a_get_inactive_image
|
||||
, a_ids_image -- a_ids_image
|
||||
, a_names_image -- a_names_image
|
||||
, a_get_all_user -- get_all_user
|
||||
, a_get_inactive_user -- get_inactive_user
|
||||
, a_ids_user -- ids_user
|
||||
, a_names_user -- a_names_user
|
||||
, a_emails_user -- a_emails_user
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -923,6 +943,11 @@ CALL fetchmetrics.p_dog_calc_button_icon (
|
||||
, 0 -- a_get_inactive_image
|
||||
, '' -- a_ids_image
|
||||
, '' -- a_names_image
|
||||
, 1 -- a_get_all_user
|
||||
, 0 -- a_get_inactive_user
|
||||
, '' -- a_ids_user
|
||||
, '' -- a_names_user
|
||||
, '' -- a_emails_user
|
||||
, 1 -- a_get_all_button_icon
|
||||
, 0 -- a_get_inactive_button_icon
|
||||
, '' -- a_ids_button_icon
|
||||
@@ -947,6 +972,11 @@ CALL fetchmetrics.p_dog_calc_button_icon (
|
||||
, 0 -- a_get_inactive_image
|
||||
, '' -- a_ids_image
|
||||
, 'pat,point' -- a_names_image
|
||||
, 1 -- a_get_all_user
|
||||
, 0 -- a_get_inactive_user
|
||||
, '' -- a_ids_user
|
||||
, 'pat,point' -- a_names_user
|
||||
, 'pat,point' -- a_emails_user
|
||||
, 1 -- a_get_all_button_icon
|
||||
, 0 -- a_get_inactive_button_icon
|
||||
, '' -- a_ids_button_icon
|
||||
|
||||
@@ -14,6 +14,11 @@ CREATE PROCEDURE fetchmetrics.p_dog_get_many_button_icon (
|
||||
, IN a_get_inactive_image BIT
|
||||
, IN a_ids_image TEXT
|
||||
, IN a_names_image TEXT
|
||||
, IN a_get_all_user BIT
|
||||
, IN a_get_inactive_user BIT
|
||||
, IN a_ids_user TEXT
|
||||
, IN a_names_user TEXT
|
||||
, IN a_emails_user TEXT
|
||||
, IN a_get_all_button_icon BIT
|
||||
, IN a_get_inactive_button_icon BIT
|
||||
, IN a_ids_button_icon TEXT
|
||||
@@ -94,25 +99,6 @@ BEGIN
|
||||
SET v_id_access_level_view := (SELECT ACCESS_LEVEL.id_access_level FROM fetchmetrics.DOG_Access_Level ACCESS_LEVEL WHERE ACCESS_LEVEL.code = 'VIEW' LIMIT 1);
|
||||
|
||||
SET a_id_user := IFNULL(a_id_user, 0);
|
||||
/*
|
||||
SET a_get_all_file_type := IFNULL(a_get_all_file_type, 0);
|
||||
SET a_get_inactive_file_type := IFNULL(a_get_inactive_file_type, 0);
|
||||
SET a_ids_file_type := TRIM(IFNULL(a_ids_file_type, ''));
|
||||
SET a_names_file_type := TRIM(IFNULL(a_names_file_type, ''));
|
||||
SET a_get_all_image := IFNULL(a_get_all_image, 0);
|
||||
SET a_get_inactive_image := IFNULL(a_get_inactive_image, 0);
|
||||
SET a_ids_image := TRIM(IFNULL(a_ids_image, ''));
|
||||
SET a_names_image := TRIM(IFNULL(a_names_image, ''));
|
||||
SET a_get_all_button_icon := IFNULL(a_get_all_button_icon, 0);
|
||||
SET a_get_inactive_button_icon := IFNULL(a_get_inactive_button_icon, 0);
|
||||
SET a_ids_button_icon := TRIM(IFNULL(a_ids_button_icon, ''));
|
||||
SET a_names_button_icon := TRIM(IFNULL(a_names_button_icon, ''));
|
||||
SET a_notes_button_icon := TRIM(IFNULL(a_notes_button_icon, ''));
|
||||
SET a_require_all_id_search_filters_met := IFNULL(a_require_all_id_search_filters_met, 1);
|
||||
SET a_require_any_id_search_filters_met := IFNULL(a_require_any_id_search_filters_met, 1);
|
||||
SET a_require_all_non_id_search_filters_met := IFNULL(a_require_all_non_id_search_filters_met, 0);
|
||||
SET a_require_any_non_id_search_filters_met := IFNULL(a_require_any_non_id_search_filters_met, 1);
|
||||
*/
|
||||
SET a_debug := IFNULL(a_debug, 0);
|
||||
|
||||
IF a_debug = 1 THEN
|
||||
@@ -126,6 +112,11 @@ BEGIN
|
||||
, a_get_inactive_image
|
||||
, a_ids_image
|
||||
, a_names_image
|
||||
, a_get_all_user
|
||||
, a_get_inactive_user
|
||||
, a_ids_user
|
||||
, a_names_user
|
||||
, a_emails_user
|
||||
, a_get_all_button_icon
|
||||
, a_get_inactive_button_icon
|
||||
, a_ids_button_icon
|
||||
@@ -168,83 +159,6 @@ BEGIN
|
||||
, code VARCHAR(250) NOT NULL
|
||||
, msg TEXT NOT NULL
|
||||
);
|
||||
|
||||
-- Permissions
|
||||
IF a_debug = 1 THEN
|
||||
SELECT
|
||||
v_guid
|
||||
, 0 -- get_all_user
|
||||
, 0 -- get_inactive_user
|
||||
, a_id_user -- ids_user
|
||||
, '' -- a_auth0_ids_user
|
||||
, '' -- a_names_user
|
||||
, '' -- a_emails_user
|
||||
, 1 -- a_require_all_id_search_filters_met
|
||||
, 1 -- a_require_any_id_search_filters_met
|
||||
, 0 -- a_require_all_non_id_search_filters_met
|
||||
, 0 -- a_require_any_non_id_search_filters_met
|
||||
, v_id_permission_dog_view -- ids_permission
|
||||
, v_id_access_level_view -- ids_access_level
|
||||
, 0 -- a_show_errors
|
||||
, 0 -- a_debug
|
||||
;
|
||||
END IF;
|
||||
|
||||
CALL fetchmetrics.p_dog_calc_user_access(
|
||||
v_guid
|
||||
, 0 -- get_all_user
|
||||
, 0 -- get_inactive_user
|
||||
, a_id_user -- ids_user
|
||||
, '' -- a_auth0_ids_user
|
||||
, '' -- a_names_user
|
||||
, '' -- a_emails_user
|
||||
, 1 -- a_require_all_id_search_filters_met
|
||||
, 1 -- a_require_any_id_search_filters_met
|
||||
, 0 -- a_require_all_non_id_search_filters_met
|
||||
, 0 -- a_require_any_non_id_search_filters_met
|
||||
, v_id_permission_dog_view -- ids_permission
|
||||
, v_id_access_level_view -- ids_access_level
|
||||
, 0 -- a_show_errors
|
||||
, 0 -- a_debug
|
||||
);
|
||||
|
||||
SELECT
|
||||
IFNULL(CALC_USER_T.has_access, 0)
|
||||
INTO
|
||||
v_can_view
|
||||
FROM fetchmetrics.DOG_Calc_User_Access_Temp CALC_USER_T
|
||||
WHERE CALC_USER_T.GUID = v_guid
|
||||
LIMIT 1
|
||||
;
|
||||
|
||||
IF a_debug = 1 THEN
|
||||
SELECT v_can_view;
|
||||
SELECT COUNT(*) AS Count_Errors FROM tmp_Msg_Error t_ERROR;
|
||||
SELECT * FROM tmp_Msg_Error t_ERROR;
|
||||
END IF;
|
||||
|
||||
IF (v_can_view = 0) THEN
|
||||
DELETE t_ME
|
||||
FROM tmp_Msg_Error t_ME
|
||||
WHERE t_ME.id_type <> v_id_type_error_no_permission
|
||||
;
|
||||
INSERT INTO tmp_Msg_Error (
|
||||
id_type
|
||||
, code
|
||||
, msg
|
||||
)
|
||||
VALUES (
|
||||
v_id_type_error_no_permission
|
||||
, v_code_type_error_no_permission
|
||||
, 'You do not have permission to view Button_Icons.'
|
||||
)
|
||||
;
|
||||
END IF;
|
||||
|
||||
CALL fetchmetrics.p_dog_clear_calc_user_access(
|
||||
v_guid
|
||||
, 0 -- a_debug
|
||||
);
|
||||
|
||||
|
||||
-- Call Button_Icon Calc
|
||||
@@ -261,6 +175,11 @@ BEGIN
|
||||
, a_get_inactive_image -- a_get_inactive_image
|
||||
, a_ids_image -- a_ids_image
|
||||
, a_names_image -- a_names_image
|
||||
, a_get_all_user
|
||||
, a_get_inactive_user
|
||||
, a_ids_user
|
||||
, a_names_user
|
||||
, a_emails_user
|
||||
, a_get_all_button_icon -- a_get_all_button_icon
|
||||
, a_get_inactive_button_icon -- a_get_inactive_button_icon
|
||||
, a_ids_button_icon -- a_ids_button_icon
|
||||
@@ -286,6 +205,11 @@ BEGIN
|
||||
, a_get_inactive_image -- a_get_inactive_image
|
||||
, a_ids_image -- a_ids_image
|
||||
, a_names_image -- a_names_image
|
||||
, a_get_all_user
|
||||
, a_get_inactive_user
|
||||
, a_ids_user
|
||||
, a_names_user
|
||||
, a_emails_user
|
||||
, a_get_all_button_icon -- a_get_all_button_icon
|
||||
, a_get_inactive_button_icon -- a_get_inactive_button_icon
|
||||
, a_ids_button_icon -- a_ids_button_icon
|
||||
@@ -410,6 +334,11 @@ CALL fetchmetrics.p_dog_get_many_button_icon (
|
||||
, 0 -- a_get_inactive_image
|
||||
, '' -- a_ids_image
|
||||
, '' -- a_names_image
|
||||
, 1 -- a_get_all_user
|
||||
, 0 -- a_get_inactive_user
|
||||
, '' -- a_ids_user
|
||||
, '' -- a_names_user
|
||||
, '' -- a_emails_user
|
||||
, 1 -- a_get_all_button_icon
|
||||
, 0 -- a_get_inactive_button_icon
|
||||
, '' -- a_ids_button_icon
|
||||
@@ -433,6 +362,11 @@ CALL fetchmetrics.p_dog_get_many_button_icon (
|
||||
, 0 -- a_get_inactive_image
|
||||
, '' -- a_ids_image
|
||||
, 'pat,point' -- a_names_image
|
||||
, 1 -- a_get_all_user
|
||||
, 0 -- a_get_inactive_user
|
||||
, '' -- a_ids_user
|
||||
, 'pat,point' -- a_names_user
|
||||
, 'pat,point' -- a_emails_user
|
||||
, 1 -- a_get_all_button_icon
|
||||
, 0 -- a_get_inactive_button_icon
|
||||
, '' -- a_ids_button_icon
|
||||
|
||||
@@ -45,6 +45,11 @@ CREATE PROCEDURE fetchmetrics.p_dog_get_many_command_button_link (
|
||||
, IN a_get_inactive_location BIT
|
||||
, IN a_ids_location TEXT
|
||||
, IN a_names_location TEXT
|
||||
, IN a_get_all_user BIT
|
||||
, IN a_get_inactive_user BIT
|
||||
, IN a_ids_user TEXT
|
||||
, IN a_names_user TEXT
|
||||
, IN a_emails_user TEXT
|
||||
, IN a_require_all_id_search_filters_met BIT
|
||||
, IN a_require_any_id_search_filters_met BIT
|
||||
, IN a_require_all_non_id_search_filters_met BIT
|
||||
@@ -55,29 +60,7 @@ BEGIN
|
||||
DECLARE v_code_type_error_bad_data VARCHAR(100);
|
||||
DECLARE v_code_type_error_no_permission VARCHAR(100);
|
||||
DECLARE v_code_type_error_warning VARCHAR(100);
|
||||
/*
|
||||
DECLARE v_has_filter_button_icon_id BIT;
|
||||
DECLARE v_has_filter_button_icon_name BIT;
|
||||
DECLARE v_has_filter_button_icon_notes BIT;
|
||||
DECLARE v_has_filter_button_shape_id BIT;
|
||||
DECLARE v_has_filter_button_shape_name BIT;
|
||||
DECLARE v_has_filter_button_shape_notes BIT;
|
||||
DECLARE v_has_filter_colour_id BIT;
|
||||
DECLARE v_has_filter_colour_name BIT;
|
||||
DECLARE v_has_filter_command_category_id BIT;
|
||||
DECLARE v_has_filter_command_category_name BIT;
|
||||
DECLARE v_has_filter_command_id BIT;
|
||||
DECLARE v_has_filter_command_name BIT;
|
||||
DECLARE v_has_filter_command_hand_signal_default_description BIT;
|
||||
DECLARE v_has_filter_command_notes BIT;
|
||||
DECLARE v_has_filter_file_type_id BIT;
|
||||
DECLARE v_has_filter_file_type_name BIT;
|
||||
DECLARE v_has_filter_image_id BIT;
|
||||
DECLARE v_has_filter_image_name BIT;
|
||||
*/
|
||||
DECLARE v_has_filter_link_id BIT;
|
||||
-- DECLARE v_has_filter_location_id BIT;
|
||||
-- DECLARE v_has_filter_location_name BIT;
|
||||
DECLARE v_id_access_level_view INT;
|
||||
DECLARE v_id_type_error_bad_data INT;
|
||||
DECLARE v_id_type_error_no_permission INT;
|
||||
@@ -158,26 +141,6 @@ BEGIN
|
||||
SET a_require_any_non_id_search_filters_met := IFNULL(a_require_any_non_id_search_filters_met, 1);
|
||||
SET a_debug := IFNULL(a_debug, 0);
|
||||
|
||||
/*
|
||||
SET v_has_filter_command_category_id = CASE WHEN a_ids_command_category <> '' THEN 1 ELSE 0 END;
|
||||
SET v_has_filter_command_category_name = CASE WHEN a_names_command_category <> '' THEN 1 ELSE 0 END;
|
||||
SET v_has_filter_command_id = CASE WHEN a_ids_command <> '' THEN 1 ELSE 0 END;
|
||||
SET v_has_filter_command_name = CASE WHEN a_names_command <> '' THEN 1 ELSE 0 END;
|
||||
SET v_has_filter_command_hand_signal_default_description = CASE WHEN a_hand_signal_default_descriptions_command <> '' THEN 1 ELSE 0 END;
|
||||
SET v_has_filter_command_notes = CASE WHEN a_notes_command <> '' THEN 1 ELSE 0 END;
|
||||
SET v_has_filter_button_shape_id = CASE WHEN a_ids_button_shape <> '' THEN 1 ELSE 0 END;
|
||||
SET v_has_filter_button_shape_name = CASE WHEN a_names_button_shape <> '' THEN 1 ELSE 0 END;
|
||||
SET v_has_filter_button_shape_notes = CASE WHEN a_notes_button_shape <> '' THEN 1 ELSE 0 END;
|
||||
SET v_has_filter_colour_id = CASE WHEN a_ids_colour <> '' THEN 1 ELSE 0 END;
|
||||
SET v_has_filter_colour_name = CASE WHEN a_names_colour <> '' THEN 1 ELSE 0 END;
|
||||
SET v_has_filter_file_type_id = CASE WHEN a_ids_file_type <> '' THEN 1 ELSE 0 END;
|
||||
SET v_has_filter_file_type_name = CASE WHEN a_names_file_type <> '' THEN 1 ELSE 0 END;
|
||||
SET v_has_filter_image_id = CASE WHEN a_ids_image <> '' THEN 1 ELSE 0 END;
|
||||
SET v_has_filter_image_name = CASE WHEN a_names_image <> '' THEN 1 ELSE 0 END;
|
||||
SET v_has_filter_button_icon_id = CASE WHEN a_ids_button_icon <> '' THEN 1 ELSE 0 END;
|
||||
SET v_has_filter_button_icon_name = CASE WHEN a_names_button_icon <> '' THEN 1 ELSE 0 END;
|
||||
SET v_has_filter_button_icon_notes = CASE WHEN a_notes_button_icon <> '' THEN 1 ELSE 0 END;
|
||||
*/
|
||||
SET v_has_filter_link_id = CASE WHEN a_ids_link <> '' THEN 1 ELSE 0 END;
|
||||
|
||||
IF a_debug = 1 THEN
|
||||
@@ -238,26 +201,6 @@ BEGIN
|
||||
|
||||
SELECT
|
||||
v_has_filter_link_id
|
||||
/*
|
||||
, v_has_filter_command_category_id
|
||||
, v_has_filter_command_category_name
|
||||
, v_has_filter_command_id
|
||||
, v_has_filter_command_name
|
||||
, v_has_filter_command_hand_signal_default_description
|
||||
, v_has_filter_command_notes
|
||||
, v_has_filter_button_shape_id
|
||||
, v_has_filter_button_shape_name
|
||||
, v_has_filter_button_shape_notes
|
||||
, v_has_filter_colour_id
|
||||
, v_has_filter_colour_name
|
||||
, v_has_filter_file_type_id
|
||||
, v_has_filter_file_type_name
|
||||
, v_has_filter_image_id
|
||||
, v_has_filter_image_name
|
||||
, v_has_filter_button_icon_id
|
||||
, v_has_filter_button_icon_name
|
||||
, v_has_filter_button_icon_notes
|
||||
*/
|
||||
;
|
||||
END IF;
|
||||
|
||||
@@ -460,6 +403,11 @@ BEGIN
|
||||
, a_names_command -- a_names_command
|
||||
, '' -- a_hand_signal_descriptions_link
|
||||
, a_notes_command -- a_notes_command
|
||||
, a_get_all_user
|
||||
, a_get_inactive_user
|
||||
, a_ids_user
|
||||
, a_names_user
|
||||
, a_emails_user
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -482,6 +430,11 @@ BEGIN
|
||||
, a_names_command -- a_names_command
|
||||
, '' -- a_hand_signal_descriptions_link
|
||||
, a_notes_command -- a_notes_command
|
||||
, a_get_all_user
|
||||
, a_get_inactive_user
|
||||
, a_ids_user
|
||||
, a_names_user
|
||||
, a_emails_user
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -555,6 +508,11 @@ BEGIN
|
||||
, a_ids_button_shape -- a_ids_button_shape
|
||||
, a_names_button_shape -- a_names_button_shape
|
||||
, a_notes_button_shape -- a_notes_button_shape
|
||||
, a_get_all_user
|
||||
, a_get_inactive_user
|
||||
, a_ids_user
|
||||
, a_names_user
|
||||
, a_emails_user
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -572,6 +530,11 @@ BEGIN
|
||||
, a_ids_button_shape -- a_ids_button_shape
|
||||
, a_names_button_shape -- a_names_button_shape
|
||||
, a_notes_button_shape -- a_notes_button_shape
|
||||
, a_get_all_user
|
||||
, a_get_inactive_user
|
||||
, a_ids_user
|
||||
, a_names_user
|
||||
, a_emails_user
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -682,6 +645,11 @@ BEGIN
|
||||
, a_get_inactive_image
|
||||
, a_ids_image
|
||||
, a_names_image
|
||||
, a_get_all_user
|
||||
, a_get_inactive_user
|
||||
, a_ids_user
|
||||
, a_names_user
|
||||
, a_emails_user
|
||||
, a_get_all_button_icon -- a_get_all_button_icon
|
||||
, a_get_inactive_button_icon -- a_get_inactive_button_icon
|
||||
, a_ids_button_icon -- a_ids_button_icon
|
||||
@@ -707,6 +675,11 @@ BEGIN
|
||||
, a_get_inactive_image
|
||||
, a_ids_image
|
||||
, a_names_image
|
||||
, a_get_all_user
|
||||
, a_get_inactive_user
|
||||
, a_ids_user
|
||||
, a_names_user
|
||||
, a_emails_user
|
||||
, a_get_all_button_icon -- a_get_all_button_icon
|
||||
, a_get_inactive_button_icon -- a_get_inactive_button_icon
|
||||
, a_ids_button_icon -- a_ids_button_icon
|
||||
@@ -765,6 +738,11 @@ BEGIN
|
||||
, a_get_inactive_location -- a_get_inactive_location
|
||||
, a_ids_location -- a_ids_location
|
||||
, a_names_location -- a_names_location
|
||||
, a_get_all_user
|
||||
, a_get_inactive_user
|
||||
, a_ids_user
|
||||
, a_names_user
|
||||
, a_emails_user
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, a_require_any_id_search_filters_met -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -781,6 +759,11 @@ BEGIN
|
||||
, a_get_inactive_location -- a_get_inactive_location
|
||||
, a_ids_location -- a_ids_location
|
||||
, a_names_location -- a_names_location
|
||||
, a_get_all_user
|
||||
, a_get_inactive_user
|
||||
, a_ids_user
|
||||
, a_names_user
|
||||
, a_emails_user
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -1150,6 +1133,11 @@ CALL fetchmetrics.p_dog_get_many_command_button_link (
|
||||
, 0 -- a_get_inactive_location
|
||||
, '' -- a_ids_location
|
||||
, '' -- a_names_location
|
||||
, 1 -- a_get_all_user
|
||||
, 0 -- a_get_inactive_user
|
||||
, '' -- a_ids_user
|
||||
, '' -- a_names_user
|
||||
, '' -- a_emails_user
|
||||
, 1 -- a_require_all_id_search_filters_met
|
||||
, 1 -- a_require_any_id_search_filters_met
|
||||
, 0 -- a_require_all_non_id_search_filters_met
|
||||
@@ -1198,6 +1186,11 @@ CALL fetchmetrics.p_dog_get_many_command_button_link (
|
||||
, 0 -- a_get_inactive_location
|
||||
, '' -- a_ids_location
|
||||
, 'pat,point' -- a_names_location
|
||||
, 1 -- a_get_all_user
|
||||
, 0 -- a_get_inactive_user
|
||||
, '' -- a_ids_user
|
||||
, 'pat,point' -- a_names_user
|
||||
, 'pat,point' -- a_emails_user
|
||||
, 1 -- a_require_all_id_search_filters_met
|
||||
, 1 -- a_require_any_id_search_filters_met
|
||||
, 0 -- a_require_all_non_id_search_filters_met
|
||||
|
||||
@@ -389,6 +389,11 @@ BEGIN
|
||||
, a_get_inactive_location -- a_get_inactive_location
|
||||
, a_ids_location -- a_ids_location
|
||||
, a_names_location -- a_names_location
|
||||
, a_get_all_user_handler
|
||||
, a_get_inactive_user_handler
|
||||
, a_ids_user_handler
|
||||
, a_names_user_handler
|
||||
, a_emails_user_handler
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -405,6 +410,11 @@ BEGIN
|
||||
, a_get_inactive_location -- a_get_inactive_location
|
||||
, a_ids_location -- a_ids_location
|
||||
, a_names_location -- a_names_location
|
||||
, a_get_all_user_handler
|
||||
, a_get_inactive_user_handler
|
||||
, a_ids_user_handler
|
||||
, a_names_user_handler
|
||||
, a_emails_user_handler
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
|
||||
@@ -480,6 +480,11 @@ BEGIN
|
||||
, a_get_inactive_distraction_type -- a_get_inactive_distraction_type
|
||||
, a_ids_distraction_type -- a_ids_distraction_type
|
||||
, a_names_distraction_type -- a_names_distraction_type
|
||||
, a_get_all_user_handler
|
||||
, a_get_inactive_user_handler
|
||||
, a_ids_user_handler
|
||||
, a_names_user_handler
|
||||
, a_emails_user_handler
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -496,6 +501,11 @@ BEGIN
|
||||
, a_get_inactive_distraction_type -- a_get_inactive_distraction_type
|
||||
, a_ids_distraction_type -- a_ids_distraction_type
|
||||
, a_names_distraction_type -- a_names_distraction_type
|
||||
, a_get_all_user_handler
|
||||
, a_get_inactive_user_handler
|
||||
, a_ids_user_handler
|
||||
, a_names_user_handler
|
||||
, a_emails_user_handler
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -540,6 +550,11 @@ BEGIN
|
||||
, a_get_inactive_intensity_level_emotional -- a_get_inactive_intensity_level_emotional
|
||||
, a_ids_intensity_level_emotional -- a_ids_intensity_level_emotional
|
||||
, a_names_intensity_level_emotional -- a_names_intensity_level_emotional
|
||||
, a_get_all_user_handler
|
||||
, a_get_inactive_user_handler
|
||||
, a_ids_user_handler
|
||||
, a_names_user_handler
|
||||
, a_emails_user_handler
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -556,6 +571,11 @@ BEGIN
|
||||
, a_get_inactive_intensity_level_emotional -- a_get_inactive_intensity_level_emotional
|
||||
, a_ids_intensity_level_emotional -- a_ids_intensity_level_emotional
|
||||
, a_names_intensity_level_emotional -- a_names_intensity_level_emotional
|
||||
, a_get_all_user_handler
|
||||
, a_get_inactive_user_handler
|
||||
, a_ids_user_handler
|
||||
, a_names_user_handler
|
||||
, a_emails_user_handler
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -605,6 +625,11 @@ BEGIN
|
||||
, a_get_inactive_intensity_level_scent -- a_get_inactive_intensity_level_scent
|
||||
, a_ids_intensity_level_scent -- a_ids_intensity_level_scent
|
||||
, a_names_intensity_level_scent -- a_names_intensity_level_scent
|
||||
, a_get_all_user_handler
|
||||
, a_get_inactive_user_handler
|
||||
, a_ids_user_handler
|
||||
, a_names_user_handler
|
||||
, a_emails_user_handler
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -621,6 +646,11 @@ BEGIN
|
||||
, a_get_inactive_intensity_level_scent -- a_get_inactive_intensity_level_scent
|
||||
, a_ids_intensity_level_scent -- a_ids_intensity_level_scent
|
||||
, a_names_intensity_level_scent -- a_names_intensity_level_scent
|
||||
, a_get_all_user_handler
|
||||
, a_get_inactive_user_handler
|
||||
, a_ids_user_handler
|
||||
, a_names_user_handler
|
||||
, a_emails_user_handler
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -670,6 +700,11 @@ BEGIN
|
||||
, a_get_inactive_intensity_level_sight -- a_get_inactive_intensity_level_sight
|
||||
, a_ids_intensity_level_sight -- a_ids_intensity_level_sight
|
||||
, a_names_intensity_level_sight -- a_names_intensity_level_sight
|
||||
, a_get_all_user_handler
|
||||
, a_get_inactive_user_handler
|
||||
, a_ids_user_handler
|
||||
, a_names_user_handler
|
||||
, a_emails_user_handler
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -686,6 +721,11 @@ BEGIN
|
||||
, a_get_inactive_intensity_level_sight -- a_get_inactive_intensity_level_sight
|
||||
, a_ids_intensity_level_sight -- a_ids_intensity_level_sight
|
||||
, a_names_intensity_level_sight -- a_names_intensity_level_sight
|
||||
, a_get_all_user_handler
|
||||
, a_get_inactive_user_handler
|
||||
, a_ids_user_handler
|
||||
, a_names_user_handler
|
||||
, a_emails_user_handler
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -735,6 +775,11 @@ BEGIN
|
||||
, a_get_inactive_intensity_level_sound -- a_get_inactive_intensity_level_sound
|
||||
, a_ids_intensity_level_sound -- a_ids_intensity_level_sound
|
||||
, a_names_intensity_level_sound -- a_names_intensity_level_sound
|
||||
, a_get_all_user_handler
|
||||
, a_get_inactive_user_handler
|
||||
, a_ids_user_handler
|
||||
, a_names_user_handler
|
||||
, a_emails_user_handler
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -751,6 +796,11 @@ BEGIN
|
||||
, a_get_inactive_intensity_level_sound -- a_get_inactive_intensity_level_sound
|
||||
, a_ids_intensity_level_sound -- a_ids_intensity_level_sound
|
||||
, a_names_intensity_level_sound -- a_names_intensity_level_sound
|
||||
, a_get_all_user_handler
|
||||
, a_get_inactive_user_handler
|
||||
, a_ids_user_handler
|
||||
, a_names_user_handler
|
||||
, a_emails_user_handler
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -800,6 +850,11 @@ BEGIN
|
||||
, a_get_inactive_intensity_level_touch -- a_get_inactive_intensity_level_touch
|
||||
, a_ids_intensity_level_touch -- a_ids_intensity_level_touch
|
||||
, a_names_intensity_level_touch -- a_names_intensity_level_touch
|
||||
, a_get_all_user_handler
|
||||
, a_get_inactive_user_handler
|
||||
, a_ids_user_handler
|
||||
, a_names_user_handler
|
||||
, a_emails_user_handler
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -816,6 +871,11 @@ BEGIN
|
||||
, a_get_inactive_intensity_level_touch -- a_get_inactive_intensity_level_touch
|
||||
, a_ids_intensity_level_touch -- a_ids_intensity_level_touch
|
||||
, a_names_intensity_level_touch -- a_names_intensity_level_touch
|
||||
, a_get_all_user_handler
|
||||
, a_get_inactive_user_handler
|
||||
, a_ids_user_handler
|
||||
, a_names_user_handler
|
||||
, a_emails_user_handler
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -1502,7 +1562,7 @@ DELIMITER ;
|
||||
/*
|
||||
|
||||
CALL fetchmetrics.p_dog_calc_distraction (
|
||||
'slippery ' -- a_guid
|
||||
'slobbery ' -- a_guid
|
||||
, 1 -- 'auth0|6582b95c895d09a70ba10fef', -- a_id_user
|
||||
, 1 -- a_get_all_distraction
|
||||
, 0 -- a_get_inactive_distraction
|
||||
@@ -1580,7 +1640,7 @@ FROM fetchmetrics.DOG_Distraction_Temp
|
||||
;
|
||||
|
||||
CALL fetchmetrics.p_dog_clear_calc_distraction (
|
||||
'slippery ' -- a_guid
|
||||
'slobbery ' -- a_guid
|
||||
, 1 -- debug
|
||||
);
|
||||
|
||||
|
||||
@@ -11,6 +11,11 @@ CREATE PROCEDURE fetchmetrics.p_dog_calc_bribe (
|
||||
, IN a_get_inactive_bribe BIT
|
||||
, IN a_ids_bribe TEXT
|
||||
, IN a_names_bribe TEXT
|
||||
, IN a_get_all_user BIT
|
||||
, IN a_get_inactive_user BIT
|
||||
, IN a_ids_user TEXT
|
||||
, IN a_names_user TEXT
|
||||
, IN a_emails_user TEXT
|
||||
, IN a_require_all_id_search_filters_met BIT
|
||||
, IN a_require_any_id_search_filters_met BIT
|
||||
, IN a_require_all_non_id_search_filters_met BIT
|
||||
@@ -26,9 +31,12 @@ BEGIN
|
||||
DECLARE v_has_filter_bribe_name BIT;
|
||||
DECLARE v_id_access_level_view INT;
|
||||
DECLARE v_id_minimum INT;
|
||||
DECLARE v_id_permission_dog_view INT;
|
||||
DECLARE v_id_permission_command_view INT;
|
||||
DECLARE v_id_type_error_bad_data INT;
|
||||
DECLARE v_id_type_error_no_permission INT;
|
||||
DECLARE v_is_super_user BIT;
|
||||
DECLARE v_priority_access_level_none INT;
|
||||
DECLARE v_priority_access_level_view INT;
|
||||
DECLARE v_time_start TIMESTAMP(6);
|
||||
|
||||
DECLARE exit handler for SQLEXCEPTION
|
||||
@@ -83,9 +91,11 @@ BEGIN
|
||||
SET v_code_type_error_no_permission := 'NO_PERMISSION';
|
||||
SET v_id_type_error_bad_data := (SELECT ERROR_TYPE.id_type FROM fetchmetrics.CORE_Msg_Error_Type ERROR_TYPE WHERE ERROR_TYPE.code = v_code_type_error_bad_data LIMIT 1);
|
||||
SET v_id_type_error_no_permission := (SELECT ERROR_TYPE.id_type FROM fetchmetrics.CORE_Msg_Error_Type ERROR_TYPE WHERE ERROR_TYPE.code = v_code_type_error_no_permission LIMIT 1);
|
||||
SET v_id_permission_dog_view := (SELECT PERMISSION.id_permission FROM fetchmetrics.DOG_Permission PERMISSION WHERE PERMISSION.code = 'DOG_VIEW' LIMIT 1);
|
||||
SET v_id_permission_command_view := (SELECT PERMISSION.id_permission FROM fetchmetrics.DOG_Permission PERMISSION WHERE PERMISSION.code = 'COMMAND_VIEW' LIMIT 1);
|
||||
SET v_id_access_level_view := (SELECT ACCESS_LEVEL.id_access_level FROM fetchmetrics.DOG_Access_Level ACCESS_LEVEL WHERE ACCESS_LEVEL.code = 'VIEW' LIMIT 1);
|
||||
|
||||
SET v_priority_access_level_none := (SELECT ACCESS_LEVEL.priority FROM fetchmetrics.DOG_Access_Level ACCESS_LEVEL WHERE ACCESS_LEVEL.code = 'NONE' LIMIT 1);
|
||||
SET v_priority_access_level_view := (SELECT ACCESS_LEVEL.priority FROM fetchmetrics.DOG_Access_Level ACCESS_LEVEL WHERE ACCESS_LEVEL.id_access_level = v_id_access_level_view);
|
||||
|
||||
|
||||
CALL fetchmetrics.p_core_validate_guid ( a_guid );
|
||||
|
||||
@@ -109,6 +119,11 @@ BEGIN
|
||||
, a_get_inactive_bribe
|
||||
, a_ids_bribe
|
||||
, a_names_bribe
|
||||
, a_get_all_user
|
||||
, a_get_inactive_user
|
||||
, a_ids_user
|
||||
, a_names_user
|
||||
, a_emails_user
|
||||
, a_require_all_id_search_filters_met
|
||||
, a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met
|
||||
@@ -120,7 +135,7 @@ BEGIN
|
||||
SELECT
|
||||
v_id_type_error_bad_data
|
||||
, v_id_type_error_no_permission
|
||||
, v_id_permission_dog_view
|
||||
, v_id_permission_command_view
|
||||
, v_time_start
|
||||
;
|
||||
END IF;
|
||||
@@ -129,9 +144,30 @@ BEGIN
|
||||
DROP TEMPORARY TABLE IF EXISTS tmp_Split_Id_Calc_Bribe;
|
||||
DROP TEMPORARY TABLE IF EXISTS tmp_Msg_Error_Calc_Bribe;
|
||||
DROP TEMPORARY TABLE IF EXISTS tmp_Bribe_Calc_Bribe;
|
||||
DROP TEMPORARY TABLE IF EXISTS tmp_Calc_User_Access_Calc_Bribe;
|
||||
|
||||
CREATE TEMPORARY TABLE tmp_Calc_User_Access_Calc_Bribe (
|
||||
id_temp INT PRIMARY KEY AUTO_INCREMENT NOT NULL
|
||||
, id_user INT
|
||||
, id_role INT
|
||||
, id_permission_required INT NOT NULL
|
||||
, priority_access_level_required INT NOT NULL
|
||||
, is_super_user BIT
|
||||
, priority_access_level_user INT
|
||||
, has_access BIT
|
||||
, can_view BIT
|
||||
, can_edit BIT
|
||||
, can_admin BIT
|
||||
, active BIT
|
||||
|
||||
, does_meet_id_filters BIT
|
||||
, does_meet_non_id_filters BIT
|
||||
);
|
||||
|
||||
CREATE TEMPORARY TABLE tmp_Bribe_Calc_Bribe (
|
||||
id_bribe INT NOT NULL
|
||||
, exists_valid_link BIT NOT NULL
|
||||
, id_user INT
|
||||
, does_meet_id_filters BIT NOT NULL
|
||||
, does_meet_non_id_filters BIT NOT NULL
|
||||
);
|
||||
@@ -158,6 +194,171 @@ BEGIN
|
||||
SET v_has_filter_bribe_id = CASE WHEN a_ids_bribe <> '' THEN 1 ELSE 0 END;
|
||||
SET v_has_filter_bribe_name = CASE WHEN a_names_bribe <> '' THEN 1 ELSE 0 END;
|
||||
|
||||
-- Permissions
|
||||
IF a_debug = 1 THEN
|
||||
SELECT
|
||||
a_guid -- a_guid
|
||||
, 0 -- get_all_user
|
||||
, 0 -- get_inactive_user
|
||||
, a_id_user -- ids_user
|
||||
, '' -- a_auth0_ids_user
|
||||
, '' -- a_names_user
|
||||
, '' -- a_emails_user
|
||||
, 1 -- a_require_all_id_search_filters_met
|
||||
, 1 -- a_require_any_id_search_filters_met
|
||||
, 0 -- a_require_all_non_id_search_filters_met
|
||||
, 0 -- a_require_any_non_id_search_filters_met
|
||||
, v_id_permission_command_view -- ids_permission
|
||||
, v_id_access_level_view -- ids_access_level
|
||||
, 0 -- a_show_errors
|
||||
, 0 -- a_debug
|
||||
;
|
||||
END IF;
|
||||
|
||||
CALL fetchmetrics.p_dog_calc_user_access(
|
||||
a_guid -- a_guid
|
||||
, 0 -- get_all_user
|
||||
, 0 -- get_inactive_user
|
||||
, a_id_user -- ids_user
|
||||
, '' -- a_auth0_ids_user
|
||||
, '' -- a_names_user
|
||||
, '' -- a_emails_user
|
||||
, 1 -- a_require_all_id_search_filters_met
|
||||
, 1 -- a_require_any_id_search_filters_met
|
||||
, 0 -- a_require_all_non_id_search_filters_met
|
||||
, 0 -- a_require_any_non_id_search_filters_met
|
||||
, v_id_permission_command_view -- ids_permission
|
||||
, v_id_access_level_view -- ids_access_level
|
||||
, 0 -- a_show_errors
|
||||
, 0 -- a_debug
|
||||
);
|
||||
|
||||
SELECT
|
||||
IFNULL(CALC_USER_T.has_access, 0)
|
||||
, IFNULL(CALC_USER_T.is_super_user, 0)
|
||||
INTO
|
||||
v_can_view
|
||||
, v_is_super_user
|
||||
FROM fetchmetrics.DOG_Calc_User_Access_Temp CALC_USER_T
|
||||
WHERE CALC_USER_T.guid = a_guid
|
||||
LIMIT 1
|
||||
;
|
||||
|
||||
IF a_debug = 1 THEN
|
||||
SELECT
|
||||
v_can_view
|
||||
, v_is_super_user
|
||||
;
|
||||
END IF;
|
||||
|
||||
IF (v_can_view = 0) THEN
|
||||
DELETE t_ME
|
||||
FROM tmp_Msg_Error_Calc_Bribe t_ME
|
||||
WHERE t_ME.id_type <> v_id_type_error_no_permission
|
||||
;
|
||||
INSERT INTO tmp_Msg_Error_Calc_Bribe (
|
||||
id_type
|
||||
, code
|
||||
, msg
|
||||
)
|
||||
VALUES (
|
||||
v_id_type_error_no_permission
|
||||
, v_code_type_error_no_permission
|
||||
, 'You do not have permission to view Dogs and Bribes.'
|
||||
)
|
||||
;
|
||||
END IF;
|
||||
|
||||
CALL fetchmetrics.p_dog_clear_calc_user_access(
|
||||
a_guid
|
||||
, 0 -- a_debug
|
||||
);
|
||||
|
||||
-- Users
|
||||
IF a_debug = 1 THEN
|
||||
SELECT
|
||||
a_guid -- guid
|
||||
, a_get_all_user -- get_all_user
|
||||
, a_get_inactive_user -- get_inactive_user
|
||||
, a_ids_user -- ids_user
|
||||
, '' -- a_auth0_ids_user
|
||||
, a_names_user -- a_names_user
|
||||
, a_emails_user -- a_emails_user
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
, 0 -- a_require_any_non_id_search_filters_met
|
||||
, v_id_permission_command_view -- ids_permission
|
||||
, v_id_access_level_view -- ids_access_level
|
||||
, 0 -- a_show_errors
|
||||
, 0 -- a_debug
|
||||
;
|
||||
END IF;
|
||||
|
||||
CALL fetchmetrics.p_dog_calc_user_access(
|
||||
a_guid-- guid
|
||||
, a_get_all_user -- get_all_user
|
||||
, a_get_inactive_user -- get_inactive_user
|
||||
, a_ids_user -- ids_user
|
||||
, '' -- a_auth0_ids_user
|
||||
, a_names_user -- a_names_user
|
||||
, a_emails_user -- a_emails_user
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
, 0 -- a_require_any_non_id_search_filters_met
|
||||
, v_id_permission_command_view -- ids_permission
|
||||
, v_id_access_level_view -- ids_access_level
|
||||
, 0 -- a_show_errors
|
||||
, 0 -- a_debug
|
||||
);
|
||||
|
||||
INSERT INTO tmp_Calc_User_Access_Calc_Bribe (
|
||||
id_user
|
||||
, id_role
|
||||
, id_permission_required
|
||||
, priority_access_level_required
|
||||
, is_super_user
|
||||
, priority_access_level_user
|
||||
, has_access
|
||||
, can_view
|
||||
, can_edit
|
||||
, can_admin
|
||||
, active
|
||||
, does_meet_id_filters
|
||||
, does_meet_non_id_filters
|
||||
)
|
||||
SELECT
|
||||
CALC_USER_T.id_user
|
||||
, CALC_USER_T.id_role
|
||||
, CALC_USER_T.id_permission_required
|
||||
, CALC_USER_T.priority_access_level_required
|
||||
, CALC_USER_T.is_super_user
|
||||
, CALC_USER_T.priority_access_level_user
|
||||
, CALC_USER_T.has_access
|
||||
, CALC_USER_T.can_view
|
||||
, CALC_USER_T.can_edit
|
||||
, CALC_USER_T.can_admin
|
||||
, CALC_USER_T.active
|
||||
, CALC_USER_T.does_meet_id_filters
|
||||
, CALC_USER_T.does_meet_non_id_filters
|
||||
FROM fetchmetrics.DOG_Calc_User_Access_Temp CALC_USER_T
|
||||
WHERE CALC_USER_T.GUID = a_guid
|
||||
;
|
||||
|
||||
IF a_debug = 1 THEN
|
||||
SELECT 'After get many user';
|
||||
SELECT * FROM tmp_Calc_User_Access_Calc_Bribe;
|
||||
SELECT COUNT(*) AS Count_Errors FROM tmp_Msg_Error_Calc_Bribe t_ERROR;
|
||||
SELECT * FROM tmp_Msg_Error_Calc_Bribe t_ERROR;
|
||||
END IF;
|
||||
|
||||
CALL fetchmetrics.p_dog_clear_calc_user_access(
|
||||
a_guid
|
||||
, 0 -- a_debug
|
||||
);
|
||||
|
||||
|
||||
-- Bribes
|
||||
IF v_has_filter_bribe_id = 1 THEN
|
||||
CALL fetchmetrics.p_core_split(a_guid, a_ids_bribe, ',', a_debug);
|
||||
@@ -205,12 +406,12 @@ BEGIN
|
||||
IF EXISTS (
|
||||
SELECT *
|
||||
FROM tmp_Split_Id_Calc_Bribe t_SPLIT_ID
|
||||
LEFT JOIN fetchmetrics.DOG_Bribe BRIBES ON t_SPLIT_ID.as_int = BRIBES.id_bribe
|
||||
LEFT JOIN fetchmetrics.DOG_Bribe BRIBE ON t_SPLIT_ID.as_int = BRIBE.id_bribe
|
||||
WHERE
|
||||
ISNULL(t_SPLIT_ID.as_int)
|
||||
OR ISNULL(BRIBES.id_bribe)
|
||||
OR ISNULL(BRIBE.id_bribe)
|
||||
OR (
|
||||
BRIBES.active = 0
|
||||
BRIBE.active = 0
|
||||
AND a_get_inactive_bribe = 0
|
||||
)
|
||||
) THEN
|
||||
@@ -224,12 +425,12 @@ BEGIN
|
||||
, v_code_type_error_bad_data
|
||||
, CONCAT('Invalid or inactive Bribe IDs: ', IFNULL(GROUP_CONCAT(t_SPLIT_ID.substring SEPARATOR ', '), 'NULL'))
|
||||
FROM tmp_Split_Id_Calc_Bribe t_SPLIT_ID
|
||||
LEFT JOIN fetchmetrics.DOG_Bribe BRIBES ON t_SPLIT_ID.as_int = BRIBES.id_bribe
|
||||
LEFT JOIN fetchmetrics.DOG_Bribe BRIBE ON t_SPLIT_ID.as_int = BRIBE.id_bribe
|
||||
WHERE
|
||||
ISNULL(t_SPLIT_ID.as_int)
|
||||
OR ISNULL(BRIBES.id_bribe)
|
||||
OR ISNULL(BRIBE.id_bribe)
|
||||
OR (
|
||||
BRIBES.active = 0
|
||||
BRIBE.active = 0
|
||||
AND a_get_inactive_bribe = 0
|
||||
)
|
||||
;
|
||||
@@ -239,70 +440,122 @@ BEGIN
|
||||
ELSE
|
||||
INSERT INTO tmp_Bribe_Calc_Bribe (
|
||||
id_bribe
|
||||
, exists_valid_link
|
||||
, id_user
|
||||
, does_meet_id_filters
|
||||
, does_meet_non_id_filters
|
||||
)
|
||||
WITH
|
||||
Bribe_Id_Filter AS (
|
||||
SELECT BRIBES.id_bribe
|
||||
SELECT BRIBE.id_bribe
|
||||
FROM tmp_Split_Id_Calc_Bribe t_SPLIT_ID
|
||||
INNER JOIN fetchmetrics.DOG_Bribe BRIBES ON t_SPLIT_ID.as_int = BRIBES.id_bribe
|
||||
INNER JOIN fetchmetrics.DOG_Bribe BRIBE ON t_SPLIT_ID.as_int = BRIBE.id_bribe
|
||||
)
|
||||
, Bribe_Name_Filter AS (
|
||||
SELECT BRIBES.id_bribe
|
||||
SELECT BRIBE.id_bribe
|
||||
FROM tmp_Split_Name_Calc_Bribe t_SPLIT_NAME
|
||||
INNER JOIN fetchmetrics.DOG_Bribe BRIBES ON BRIBES.name LIKE CONCAT('%', t_SPLIT_NAME.substring, '%')
|
||||
INNER JOIN fetchmetrics.DOG_Bribe BRIBE ON BRIBE.name LIKE CONCAT('%', t_SPLIT_NAME.substring, '%')
|
||||
WHERE NULLIF(t_SPLIT_NAME.substring, '') IS NOT NULL
|
||||
)
|
||||
, Bribe_Filters AS (
|
||||
SELECT
|
||||
BRIBES_COMBINED.id_bribe
|
||||
, MAX(BRIBES_COMBINED.does_meet_id_filter) AS does_meet_id_filter
|
||||
, MAX(BRIBES_COMBINED.does_meet_name_filter) AS does_meet_name_filter
|
||||
BRIBE_COMBINED.id_bribe
|
||||
, MAX(BRIBE_COMBINED.does_meet_id_filter) AS does_meet_id_filter
|
||||
, MAX(BRIBE_COMBINED.does_meet_name_filter) AS does_meet_name_filter
|
||||
FROM (
|
||||
SELECT
|
||||
BRIBES_ID_FILTER.id_bribe
|
||||
BRIBE_ID_FILTER.id_bribe
|
||||
, 1 AS does_meet_id_filter
|
||||
, 0 AS does_meet_name_filter
|
||||
FROM Bribe_Id_Filter BRIBES_ID_FILTER
|
||||
FROM Bribe_Id_Filter BRIBE_ID_FILTER
|
||||
UNION
|
||||
SELECT
|
||||
BRIBES_NAME_FILTER.id_bribe
|
||||
BRIBE_NAME_FILTER.id_bribe
|
||||
, 0 AS does_meet_id_filter
|
||||
, 1 AS does_meet_name_filter
|
||||
FROM Bribe_Name_Filter BRIBES_NAME_FILTER
|
||||
) BRIBES_COMBINED
|
||||
GROUP BY BRIBES_COMBINED.id_bribe
|
||||
FROM Bribe_Name_Filter BRIBE_NAME_FILTER
|
||||
) BRIBE_COMBINED
|
||||
GROUP BY BRIBE_COMBINED.id_bribe
|
||||
)
|
||||
, Bribe_Access AS (
|
||||
SELECT
|
||||
BRIBE.id_bribe
|
||||
, CASE WHEN
|
||||
v_is_super_user = 1
|
||||
OR (
|
||||
t_USER.id_user IS NOT NULL
|
||||
AND IFNULL(ACCESS_LEVEL.priority, v_priority_access_level_none) <= v_priority_access_level_view
|
||||
)
|
||||
THEN 1 ELSE 0 END AS exists_valid_link
|
||||
, ROW_NUMBER() OVER (
|
||||
PARTITION BY BRIBE.id_bribe
|
||||
ORDER BY
|
||||
CASE WHEN
|
||||
v_is_super_user = 1
|
||||
OR (
|
||||
t_USER.id_user IS NOT NULL
|
||||
AND IFNULL(ACCESS_LEVEL.priority, v_priority_access_level_none) <= v_priority_access_level_view
|
||||
)
|
||||
THEN 1 ELSE 0 END DESC
|
||||
, t_USER.does_meet_id_filters DESC
|
||||
, t_USER.does_meet_non_id_filters DESC
|
||||
) AS index_link_in_bribe
|
||||
, t_USER.id_user
|
||||
FROM fetchmetrics.DOG_Bribe BRIBE
|
||||
LEFT JOIN fetchmetrics.DOG_Bribe_User_Link BRIBE_USER_LINK
|
||||
ON BRIBE.id_bribe = BRIBE_USER_LINK.id_bribe
|
||||
AND (
|
||||
(
|
||||
a_get_inactive_bribe = 1
|
||||
AND a_get_inactive_user = 1
|
||||
)
|
||||
OR BRIBE_USER_LINK.active = 1
|
||||
)
|
||||
LEFT JOIN tmp_Calc_User_Access_Calc_Bribe t_USER
|
||||
ON BRIBE_USER_LINK.id_user = t_USER.id_user
|
||||
AND (
|
||||
a_get_inactive_user = 1
|
||||
OR t_USER.active = 1
|
||||
)
|
||||
LEFT JOIN fetchmetrics.DOG_Access_Level ACCESS_LEVEL
|
||||
ON BRIBE_USER_LINK.id_access_level = ACCESS_LEVEL.id_access_level
|
||||
AND ACCESS_LEVEL.active = 1
|
||||
)
|
||||
SELECT
|
||||
BRIBES.id_bribe
|
||||
BRIBE.id_bribe
|
||||
, IFNULL(BRIBE_ACCESS.exists_valid_link, 0) AS exists_valid_link
|
||||
, BRIBE_ACCESS.id_user
|
||||
, CASE WHEN
|
||||
v_has_filter_bribe_id = 0
|
||||
OR IFNULL(BRIBES_FILTERS.does_meet_id_filter, 0) = 1
|
||||
OR IFNULL(BRIBE_FILTERS.does_meet_id_filter, 0) = 1
|
||||
THEN 1 ELSE 0 END AS does_meet_id_filters
|
||||
, CASE WHEN
|
||||
(
|
||||
v_has_filter_bribe_name = 0
|
||||
)
|
||||
OR IFNULL(BRIBES_FILTERS.does_meet_name_filter, 0) = 1
|
||||
OR IFNULL(BRIBE_FILTERS.does_meet_name_filter, 0) = 1
|
||||
THEN 1 ELSE 0 END AS does_meet_non_id_filters
|
||||
FROM fetchmetrics.DOG_Bribe BRIBES
|
||||
LEFT JOIN Bribe_Filters BRIBES_FILTERS ON BRIBES.id_bribe = BRIBES_FILTERS.id_bribe
|
||||
FROM fetchmetrics.DOG_Bribe BRIBE
|
||||
LEFT JOIN Bribe_Filters BRIBE_FILTERS ON BRIBE.id_bribe = BRIBE_FILTERS.id_bribe
|
||||
LEFT JOIN Bribe_Access BRIBE_ACCESS
|
||||
ON BRIBE.id_bribe = BRIBE_ACCESS.id_bribe
|
||||
AND BRIBE_ACCESS.index_link_in_bribe = 1
|
||||
WHERE
|
||||
(
|
||||
a_get_all_bribe = 1
|
||||
OR (
|
||||
v_has_filter_bribe_id = 1
|
||||
AND BRIBES_FILTERS.does_meet_id_filter = 1
|
||||
AND BRIBE_FILTERS.does_meet_id_filter = 1
|
||||
)
|
||||
OR (
|
||||
v_has_filter_bribe_name = 1
|
||||
AND BRIBES_FILTERS.does_meet_name_filter = 1
|
||||
AND BRIBE_FILTERS.does_meet_name_filter = 1
|
||||
)
|
||||
)
|
||||
AND IFNULL(BRIBE_ACCESS.exists_valid_link, 0) = 1
|
||||
AND (
|
||||
a_get_inactive_bribe = 1
|
||||
OR BRIBES.active = 1
|
||||
OR BRIBE.active = 1
|
||||
)
|
||||
;
|
||||
END IF;
|
||||
@@ -318,28 +571,45 @@ BEGIN
|
||||
|
||||
-- Filter records
|
||||
IF NOT EXISTS (SELECT * FROM tmp_Msg_Error_Calc_Bribe t_ERROR INNER JOIN fetchmetrics.CORE_Msg_Error_Type ERROR_TYPE ON t_ERROR.id_type = ERROR_TYPE.id_type WHERE ERROR_TYPE.is_breaking_error = 1 LIMIT 1) THEN
|
||||
DELETE t_BRIBES
|
||||
FROM tmp_Bribe_Calc_Bribe t_BRIBES
|
||||
DELETE t_BRIBE
|
||||
FROM tmp_Bribe_Calc_Bribe t_BRIBE
|
||||
LEFT JOIN tmp_Calc_User_Access_Calc_Bribe t_USER ON t_BRIBE.id_user = t_USER.id_user
|
||||
WHERE
|
||||
(
|
||||
a_require_all_id_search_filters_met = 1
|
||||
AND (
|
||||
t_BRIBES.does_meet_id_filters = 0
|
||||
t_BRIBE.does_meet_id_filters = 0
|
||||
OR (
|
||||
t_BRIBE.exists_valid_link = 0
|
||||
AND IFNULL(t_USER.does_meet_id_filters, 0) = 0
|
||||
)
|
||||
)
|
||||
)
|
||||
OR (
|
||||
a_require_all_non_id_search_filters_met = 1
|
||||
AND (
|
||||
t_BRIBES.does_meet_non_id_filters = 0
|
||||
t_BRIBE.does_meet_non_id_filters = 0
|
||||
OR (
|
||||
t_BRIBE.exists_valid_link = 0
|
||||
AND IFNULL(t_USER.does_meet_non_id_filters, 0) = 0
|
||||
)
|
||||
)
|
||||
)
|
||||
OR (
|
||||
a_require_any_id_search_filters_met = 1
|
||||
AND t_BRIBES.does_meet_id_filters = 0
|
||||
AND t_BRIBE.does_meet_id_filters = 0
|
||||
AND (
|
||||
t_BRIBE.exists_valid_link = 0
|
||||
AND IFNULL(t_USER.does_meet_id_filters, 0) = 0
|
||||
)
|
||||
)
|
||||
OR (
|
||||
a_require_any_non_id_search_filters_met = 1
|
||||
AND t_BRIBES.does_meet_non_id_filters = 0
|
||||
AND t_BRIBE.does_meet_non_id_filters = 0
|
||||
AND (
|
||||
t_BRIBE.exists_valid_link = 0
|
||||
AND IFNULL(t_USER.does_meet_non_id_filters, 0) = 0
|
||||
)
|
||||
)
|
||||
;
|
||||
END IF;
|
||||
@@ -351,80 +621,6 @@ BEGIN
|
||||
|
||||
-- Calculated fields
|
||||
|
||||
-- Permissions
|
||||
IF a_debug = 1 THEN
|
||||
SELECT
|
||||
a_guid -- a_guid
|
||||
, 0 -- get_all_user
|
||||
, 0 -- get_inactive_user
|
||||
, a_id_user -- ids_user
|
||||
, '' -- a_auth0_ids_user
|
||||
, '' -- a_names_user
|
||||
, '' -- a_emails_user
|
||||
, 1 -- a_require_all_id_search_filters_met
|
||||
, 1 -- a_require_any_id_search_filters_met
|
||||
, 0 -- a_require_all_non_id_search_filters_met
|
||||
, 0 -- a_require_any_non_id_search_filters_met
|
||||
, v_id_permission_dog_view -- ids_permission
|
||||
, v_id_access_level_view -- ids_access_level
|
||||
, 0 -- a_show_errors
|
||||
, 0 -- a_debug
|
||||
;
|
||||
END IF;
|
||||
|
||||
CALL fetchmetrics.p_dog_calc_user_access(
|
||||
a_guid -- a_guid
|
||||
, 0 -- get_all_user
|
||||
, 0 -- get_inactive_user
|
||||
, a_id_user -- ids_user
|
||||
, '' -- a_auth0_ids_user
|
||||
, '' -- a_names_user
|
||||
, '' -- a_emails_user
|
||||
, 1 -- a_require_all_id_search_filters_met
|
||||
, 1 -- a_require_any_id_search_filters_met
|
||||
, 0 -- a_require_all_non_id_search_filters_met
|
||||
, 0 -- a_require_any_non_id_search_filters_met
|
||||
, v_id_permission_dog_view -- ids_permission
|
||||
, v_id_access_level_view -- ids_access_level
|
||||
, 0 -- a_show_errors
|
||||
, 0 -- a_debug
|
||||
);
|
||||
|
||||
SELECT
|
||||
IFNULL(CALC_USER_T.has_access, 0)
|
||||
INTO
|
||||
v_can_view
|
||||
FROM fetchmetrics.DOG_Calc_User_Access_Temp CALC_USER_T
|
||||
WHERE CALC_USER_T.GUID = a_guid
|
||||
LIMIT 1
|
||||
;
|
||||
|
||||
IF a_debug = 1 THEN
|
||||
SELECT v_can_view;
|
||||
END IF;
|
||||
|
||||
IF (v_can_view = 0) THEN
|
||||
DELETE t_ME
|
||||
FROM tmp_Msg_Error_Calc_Bribe t_ME
|
||||
WHERE t_ME.id_type <> v_id_type_error_no_permission
|
||||
;
|
||||
INSERT INTO tmp_Msg_Error_Calc_Bribe (
|
||||
id_type
|
||||
, code
|
||||
, msg
|
||||
)
|
||||
VALUES (
|
||||
v_id_type_error_no_permission
|
||||
, v_code_type_error_no_permission
|
||||
, 'You do not have permission to view Dogs and Bribes.'
|
||||
)
|
||||
;
|
||||
END IF;
|
||||
|
||||
CALL fetchmetrics.p_dog_clear_calc_user_access(
|
||||
a_guid
|
||||
, 0 -- a_debug
|
||||
);
|
||||
|
||||
IF a_debug = 1 THEN
|
||||
SELECT 'Before non-permitted data deletion';
|
||||
@@ -459,16 +655,16 @@ BEGIN
|
||||
)
|
||||
SELECT
|
||||
a_guid
|
||||
, t_BRIBES.id_bribe
|
||||
, BRIBES.code
|
||||
, BRIBES.name
|
||||
, BRIBES.active
|
||||
, t_BRIBE.id_bribe
|
||||
, BRIBE.code
|
||||
, BRIBE.name
|
||||
, BRIBE.active
|
||||
|
||||
, t_BRIBES.does_meet_id_filters
|
||||
, t_BRIBES.does_meet_non_id_filters
|
||||
FROM fetchmetrics.DOG_Bribe BRIBES
|
||||
INNER JOIN tmp_Bribe_Calc_Bribe t_BRIBES ON BRIBES.id_bribe = t_BRIBES.id_bribe
|
||||
ORDER BY BRIBES.name
|
||||
, t_BRIBE.does_meet_id_filters
|
||||
, t_BRIBE.does_meet_non_id_filters
|
||||
FROM fetchmetrics.DOG_Bribe BRIBE
|
||||
INNER JOIN tmp_Bribe_Calc_Bribe t_BRIBE ON BRIBE.id_bribe = t_BRIBE.id_bribe
|
||||
ORDER BY BRIBE.name
|
||||
;
|
||||
COMMIT;
|
||||
|
||||
@@ -492,13 +688,12 @@ BEGIN
|
||||
IF a_debug = 1 AND v_can_view = 1 THEN
|
||||
SELECT * FROM tmp_Bribe_Calc_Bribe;
|
||||
END IF;
|
||||
|
||||
CALL fetchmetrics.p_dog_clear_calc_dog ( a_guid, 0 );
|
||||
|
||||
DROP TEMPORARY TABLE IF EXISTS tmp_Split_Name_Calc_Bribe;
|
||||
DROP TEMPORARY TABLE IF EXISTS tmp_Split_Id_Calc_Bribe;
|
||||
DROP TEMPORARY TABLE IF EXISTS tmp_Msg_Error_Calc_Bribe;
|
||||
DROP TEMPORARY TABLE IF EXISTS tmp_Bribe_Calc_Bribe;
|
||||
DROP TEMPORARY TABLE IF EXISTS tmp_Calc_User_Access_Calc_Bribe;
|
||||
|
||||
IF a_debug = 1 THEN
|
||||
CALL fetchmetrics.p_core_debug_timing_reporting ( v_time_start );
|
||||
@@ -517,6 +712,11 @@ CALL fetchmetrics.p_dog_calc_bribe (
|
||||
, 0 -- a_get_inactive_bribe
|
||||
, '' -- a_ids_bribe
|
||||
, '' -- a_names_bribe
|
||||
, 1 -- a_get_all_user
|
||||
, 0 -- a_get_inactive_user
|
||||
, '' -- a_ids_user
|
||||
, '' -- a_names_user
|
||||
, '' -- a_emails_user
|
||||
, 0 -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met
|
||||
, 0 -- a_require_all_non_id_search_filters_met
|
||||
|
||||
@@ -10,6 +10,11 @@ CREATE PROCEDURE fetchmetrics.p_dog_get_many_bribe (
|
||||
, IN a_get_inactive_bribe BIT
|
||||
, IN a_ids_bribe TEXT
|
||||
, IN a_names_bribe TEXT
|
||||
, IN a_get_all_user BIT
|
||||
, IN a_get_inactive_user BIT
|
||||
, IN a_ids_user TEXT
|
||||
, IN a_names_user TEXT
|
||||
, IN a_emails_user TEXT
|
||||
, IN a_require_all_id_search_filters_met BIT
|
||||
, IN a_require_any_id_search_filters_met BIT
|
||||
, IN a_require_all_non_id_search_filters_met BIT
|
||||
@@ -23,7 +28,6 @@ BEGIN
|
||||
DECLARE v_guid BINARY(36);
|
||||
DECLARE v_id_access_level_view INT;
|
||||
DECLARE v_id_minimum INT;
|
||||
DECLARE v_id_permission_dog_view INT;
|
||||
DECLARE v_id_type_error_bad_data INT;
|
||||
DECLARE v_id_type_error_no_permission INT;
|
||||
DECLARE v_time_start TIMESTAMP(6);
|
||||
@@ -81,20 +85,9 @@ BEGIN
|
||||
SET v_code_type_error_no_permission := 'NO_PERMISSION';
|
||||
SET v_id_type_error_bad_data := (SELECT ERROR_TYPE.id_type FROM fetchmetrics.CORE_Msg_Error_Type ERROR_TYPE WHERE ERROR_TYPE.code = v_code_type_error_bad_data LIMIT 1);
|
||||
SET v_id_type_error_no_permission := (SELECT ERROR_TYPE.id_type FROM fetchmetrics.CORE_Msg_Error_Type ERROR_TYPE WHERE ERROR_TYPE.code = v_code_type_error_no_permission LIMIT 1);
|
||||
SET v_id_permission_dog_view := (SELECT PERMISSION.id_permission FROM fetchmetrics.DOG_Permission PERMISSION WHERE PERMISSION.code = 'DOG_VIEW' LIMIT 1);
|
||||
SET v_id_access_level_view := (SELECT ACCESS_LEVEL.id_access_level FROM fetchmetrics.DOG_Access_Level ACCESS_LEVEL WHERE ACCESS_LEVEL.code = 'VIEW' LIMIT 1);
|
||||
|
||||
SET a_id_user := IFNULL(a_id_user, 0);
|
||||
/*
|
||||
SET a_get_all_bribe := IFNULL(a_get_all_bribe, 0);
|
||||
SET a_get_inactive_bribe := IFNULL(a_get_inactive_bribe, 0);
|
||||
SET a_ids_bribe := TRIM(IFNULL(a_ids_bribe, ''));
|
||||
SET a_names_bribe := TRIM(IFNULL(a_names_bribe, ''));
|
||||
SET a_require_all_id_search_filters_met := IFNULL(a_require_all_id_search_filters_met, 1);
|
||||
SET a_require_any_id_search_filters_met := IFNULL(a_require_any_id_search_filters_met, 1);
|
||||
SET a_require_all_non_id_search_filters_met := IFNULL(a_require_all_non_id_search_filters_met, 0);
|
||||
SET a_require_any_non_id_search_filters_met := IFNULL(a_require_any_non_id_search_filters_met, 1);
|
||||
*/
|
||||
SET a_debug := IFNULL(a_debug, 0);
|
||||
|
||||
IF a_debug = 1 THEN
|
||||
@@ -104,6 +97,11 @@ BEGIN
|
||||
, a_get_inactive_bribe
|
||||
, a_ids_bribe
|
||||
, a_names_bribe
|
||||
, a_get_all_user
|
||||
, a_get_inactive_user
|
||||
, a_ids_user
|
||||
, a_names_user
|
||||
, a_emails_user
|
||||
, a_require_all_id_search_filters_met
|
||||
, a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met
|
||||
@@ -115,7 +113,6 @@ BEGIN
|
||||
v_id_type_error_bad_data
|
||||
, v_id_type_error_no_permission
|
||||
, v_guid
|
||||
, v_id_permission_dog_view
|
||||
, v_time_start
|
||||
;
|
||||
END IF;
|
||||
@@ -140,83 +137,6 @@ BEGIN
|
||||
, msg TEXT NOT NULL
|
||||
);
|
||||
|
||||
-- Permissions
|
||||
IF a_debug = 1 THEN
|
||||
SELECT
|
||||
v_guid
|
||||
, 0 -- get_all_user
|
||||
, 0 -- get_inactive_user
|
||||
, a_id_user -- ids_user
|
||||
, '' -- a_auth0_ids_user
|
||||
, '' -- a_names_user
|
||||
, '' -- a_emails_user
|
||||
, 1 -- a_require_all_id_search_filters_met
|
||||
, 1 -- a_require_any_id_search_filters_met
|
||||
, 0 -- a_require_all_non_id_search_filters_met
|
||||
, 0 -- a_require_any_non_id_search_filters_met
|
||||
, v_id_permission_dog_view -- ids_permission
|
||||
, v_id_access_level_view -- ids_access_level
|
||||
, 0 -- a_show_errors
|
||||
, 0 -- a_debug
|
||||
;
|
||||
END IF;
|
||||
|
||||
CALL fetchmetrics.p_dog_calc_user_access(
|
||||
v_guid
|
||||
, 0 -- get_all_user
|
||||
, 0 -- get_inactive_user
|
||||
, a_id_user -- ids_user
|
||||
, '' -- a_auth0_ids_user
|
||||
, '' -- a_names_user
|
||||
, '' -- a_emails_user
|
||||
, 1 -- a_require_all_id_search_filters_met
|
||||
, 1 -- a_require_any_id_search_filters_met
|
||||
, 0 -- a_require_all_non_id_search_filters_met
|
||||
, 0 -- a_require_any_non_id_search_filters_met
|
||||
, v_id_permission_dog_view -- ids_permission
|
||||
, v_id_access_level_view -- ids_access_level
|
||||
, 0 -- a_show_errors
|
||||
, 0 -- a_debug
|
||||
);
|
||||
|
||||
SELECT
|
||||
IFNULL(CALC_USER_T.has_access, 0)
|
||||
INTO
|
||||
v_can_view
|
||||
FROM fetchmetrics.DOG_Calc_User_Access_Temp CALC_USER_T
|
||||
WHERE CALC_USER_T.GUID = v_guid
|
||||
LIMIT 1
|
||||
;
|
||||
|
||||
IF a_debug = 1 THEN
|
||||
SELECT v_can_view;
|
||||
SELECT COUNT(*) AS Count_Errors FROM tmp_Msg_Error t_ERROR;
|
||||
SELECT * FROM tmp_Msg_Error t_ERROR;
|
||||
END IF;
|
||||
|
||||
IF (v_can_view = 0) THEN
|
||||
DELETE t_ME
|
||||
FROM tmp_Msg_Error t_ME
|
||||
WHERE t_ME.id_type <> v_id_type_error_no_permission
|
||||
;
|
||||
INSERT INTO tmp_Msg_Error (
|
||||
id_type
|
||||
, code
|
||||
, msg
|
||||
)
|
||||
VALUES (
|
||||
v_id_type_error_no_permission
|
||||
, v_code_type_error_no_permission
|
||||
, 'You do not have permission to view Bribes.'
|
||||
)
|
||||
;
|
||||
END IF;
|
||||
|
||||
CALL fetchmetrics.p_dog_clear_calc_user_access(
|
||||
v_guid
|
||||
, 0 -- a_debug
|
||||
);
|
||||
|
||||
|
||||
-- Call Bribe Calc
|
||||
IF NOT EXISTS(SELECT * FROM tmp_Msg_Error t_ERROR INNER JOIN fetchmetrics.CORE_Msg_Error_Type ERROR_TYPE ON t_ERROR.id_type = ERROR_TYPE.id_type WHERE ERROR_TYPE.is_breaking_error = 1 LIMIT 1) THEN
|
||||
@@ -228,6 +148,11 @@ BEGIN
|
||||
, a_get_inactive_bribe -- a_get_inactive_bribe
|
||||
, a_ids_bribe -- a_ids_bribe
|
||||
, a_names_bribe -- a_names_bribe
|
||||
, a_get_all_user
|
||||
, a_get_inactive_user
|
||||
, a_ids_user
|
||||
, a_names_user
|
||||
, a_emails_user
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, a_require_any_id_search_filters_met -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -244,6 +169,11 @@ BEGIN
|
||||
, a_get_inactive_bribe -- a_get_inactive_bribe
|
||||
, a_ids_bribe -- a_ids_bribe
|
||||
, a_names_bribe -- a_names_bribe
|
||||
, a_get_all_user
|
||||
, a_get_inactive_user
|
||||
, a_ids_user
|
||||
, a_names_user
|
||||
, a_emails_user
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, a_require_any_id_search_filters_met -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -283,15 +213,6 @@ BEGIN
|
||||
SELECT * FROM tmp_Bribe;
|
||||
END IF;
|
||||
END IF;
|
||||
|
||||
-- Filter outputs
|
||||
IF EXISTS(SELECT * FROM tmp_Msg_Error t_ERROR INNER JOIN fetchmetrics.CORE_Msg_Error_Type ERROR_TYPE ON t_ERROR.id_type = ERROR_TYPE.id_type WHERE ERROR_TYPE.is_breaking_error = 1 LIMIT 1) THEN
|
||||
IF a_debug = 1 THEN
|
||||
SELECT * FROM tmp_Bribe;
|
||||
END IF;
|
||||
|
||||
DELETE FROM tmp_Bribe;
|
||||
END IF;
|
||||
|
||||
|
||||
-- Outputs
|
||||
@@ -351,6 +272,11 @@ CALL fetchmetrics.p_dog_get_many_bribe (
|
||||
, 0 -- a_get_inactive_bribe
|
||||
, '' -- a_ids_bribe
|
||||
, '' -- a_names_bribe
|
||||
, 1 -- a_get_all_user
|
||||
, 0 -- a_get_inactive_user
|
||||
, '' -- a_ids_user
|
||||
, '' -- a_names_user
|
||||
, '' -- a_emails_user
|
||||
, 1 -- a_require_all_id_search_filters_met
|
||||
, 1 -- a_require_any_id_search_filters_met
|
||||
, 0 -- a_require_all_non_id_search_filters_met
|
||||
@@ -365,6 +291,11 @@ CALL fetchmetrics.p_dog_get_many_bribe (
|
||||
, 0 -- a_get_inactive_bribe
|
||||
, '' -- a_ids_bribe
|
||||
, 'pat,point' -- a_names_bribe
|
||||
, 1 -- a_get_all_user
|
||||
, 0 -- a_get_inactive_user
|
||||
, '' -- a_ids_user
|
||||
, 'pat,point' -- a_names_user
|
||||
, 'pat,point' -- a_emails_user
|
||||
, 1 -- a_require_all_id_search_filters_met
|
||||
, 1 -- a_require_any_id_search_filters_met
|
||||
, 0 -- a_require_all_non_id_search_filters_met
|
||||
|
||||
@@ -476,6 +476,11 @@ BEGIN
|
||||
, a_names_command -- a_names_command
|
||||
, '' -- a_hand_signal_descriptions_link
|
||||
, a_notes_command -- a_notes_command
|
||||
, a_get_all_user_handler
|
||||
, a_get_inactive_user_handler
|
||||
, a_ids_user_handler
|
||||
, a_names_user_handler
|
||||
, a_emails_user_handler
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -498,6 +503,11 @@ BEGIN
|
||||
, a_names_command -- a_names_command
|
||||
, '' -- a_hand_signal_descriptions_link
|
||||
, a_notes_command -- a_notes_command
|
||||
, a_get_all_user_handler
|
||||
, a_get_inactive_user_handler
|
||||
, a_ids_user_handler
|
||||
, a_names_user_handler
|
||||
, a_emails_user_handler
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -630,6 +640,11 @@ BEGIN
|
||||
, a_get_inactive_bribe -- a_get_inactive_bribe
|
||||
, a_ids_bribe -- a_ids_bribe
|
||||
, a_names_bribe -- a_names_bribe
|
||||
, a_get_all_user_handler
|
||||
, a_get_inactive_user_handler
|
||||
, a_ids_user_handler
|
||||
, a_names_user_handler
|
||||
, a_emails_user_handler
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -646,6 +661,11 @@ BEGIN
|
||||
, a_get_inactive_bribe -- a_get_inactive_bribe
|
||||
, a_ids_bribe -- a_ids_bribe
|
||||
, a_names_bribe -- a_names_bribe
|
||||
, a_get_all_user_handler
|
||||
, a_get_inactive_user_handler
|
||||
, a_ids_user_handler
|
||||
, a_names_user_handler
|
||||
, a_emails_user_handler
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
|
||||
@@ -541,6 +541,11 @@ BEGIN
|
||||
, a_get_inactive_response_quality_metric -- a_get_inactive_response_quality_metric
|
||||
, a_ids_response_quality_metric -- a_ids_response_quality_metric
|
||||
, a_names_response_quality_metric -- a_names_response_quality_metric
|
||||
, a_get_all_user_handler
|
||||
, a_get_inactive_user_handler
|
||||
, a_ids_user_handler
|
||||
, a_names_user_handler
|
||||
, a_emails_user_handler
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -557,6 +562,11 @@ BEGIN
|
||||
, a_get_inactive_response_quality_metric -- a_get_inactive_response_quality_metric
|
||||
, a_ids_response_quality_metric -- a_ids_response_quality_metric
|
||||
, a_names_response_quality_metric -- a_names_response_quality_metric
|
||||
, a_get_all_user_handler
|
||||
, a_get_inactive_user_handler
|
||||
, a_ids_user_handler
|
||||
, a_names_user_handler
|
||||
, a_emails_user_handler
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -606,6 +616,11 @@ BEGIN
|
||||
, a_get_inactive_obedience_level -- a_get_inactive_obedience_level
|
||||
, a_ids_obedience_level -- a_ids_obedience_level
|
||||
, a_names_obedience_level -- a_names_obedience_level
|
||||
, a_get_all_user_handler
|
||||
, a_get_inactive_user_handler
|
||||
, a_ids_user_handler
|
||||
, a_names_user_handler
|
||||
, a_emails_user_handler
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -622,6 +637,11 @@ BEGIN
|
||||
, a_get_inactive_obedience_level -- a_get_inactive_obedience_level
|
||||
, a_ids_obedience_level -- a_ids_obedience_level
|
||||
, a_names_obedience_level -- a_names_obedience_level
|
||||
, a_get_all_user_handler
|
||||
, a_get_inactive_user_handler
|
||||
, a_ids_user_handler
|
||||
, a_names_user_handler
|
||||
, a_emails_user_handler
|
||||
, a_require_all_id_search_filters_met -- a_require_all_id_search_filters_met
|
||||
, 0 -- a_require_any_id_search_filters_met -- a_require_any_id_search_filters_met
|
||||
, a_require_all_non_id_search_filters_met -- a_require_all_non_id_search_filters_met
|
||||
@@ -1189,7 +1209,7 @@ DELIMITER ;
|
||||
/*
|
||||
|
||||
CALL fetchmetrics.p_dog_calc_assessment_response (
|
||||
'slippery ' -- a_guid
|
||||
'slibbery ' -- a_guid
|
||||
, 1 -- 'auth0|6582b95c895d09a70ba10fef', -- a_id_user
|
||||
, 1 -- a_get_all_assessment_response
|
||||
, 0 -- a_get_inactive_assessment_response
|
||||
@@ -1275,7 +1295,7 @@ FROM fetchmetrics.DOG_Assessment_Response_Temp
|
||||
;
|
||||
|
||||
CALL fetchmetrics.p_dog_clear_calc_assessment_response (
|
||||
'slippery ' -- a_guid
|
||||
'slibbery ' -- a_guid
|
||||
, 1 -- debug
|
||||
);
|
||||
|
||||
|
||||
@@ -1550,6 +1550,25 @@ VALUES
|
||||
;
|
||||
|
||||
/*
|
||||
INSERT INTO fetchmetrics.DOG_Bribe_User_Link (
|
||||
id_bribe
|
||||
, id_user
|
||||
, id_access_level
|
||||
)
|
||||
SELECT
|
||||
B.id_bribe
|
||||
, 1
|
||||
, 3
|
||||
FROM fetchmetrics.DOG_Bribe B
|
||||
UNION
|
||||
SELECT
|
||||
B.id_bribe
|
||||
, 2
|
||||
, 3
|
||||
FROM fetchmetrics.DOG_Bribe B
|
||||
;
|
||||
|
||||
|
||||
INSERT INTO fetchmetrics.DOG_Assessment_Command_Modality_Link (
|
||||
id_assessment
|
||||
, id_command
|
||||
|
||||
53
static/dist/js/main.bundle.js
vendored
53
static/dist/js/main.bundle.js
vendored
@@ -5033,6 +5033,50 @@ var PageBlogHome = /*#__PURE__*/function (_BasePage) {
|
||||
}(BasePage);
|
||||
blog_home_defineProperty(PageBlogHome, "hash", hashPageBlogHome);
|
||||
|
||||
;// ./static/js/pages/blog/article_5_ways_to_increase_client_retention_in_your_dog_training_business.js
|
||||
function article_5_ways_to_increase_client_retention_in_your_dog_training_business_typeof(o) { "@babel/helpers - typeof"; return article_5_ways_to_increase_client_retention_in_your_dog_training_business_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, article_5_ways_to_increase_client_retention_in_your_dog_training_business_typeof(o); }
|
||||
function article_5_ways_to_increase_client_retention_in_your_dog_training_business_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
||||
function article_5_ways_to_increase_client_retention_in_your_dog_training_business_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, article_5_ways_to_increase_client_retention_in_your_dog_training_business_toPropertyKey(o.key), o); } }
|
||||
function article_5_ways_to_increase_client_retention_in_your_dog_training_business_createClass(e, r, t) { return r && article_5_ways_to_increase_client_retention_in_your_dog_training_business_defineProperties(e.prototype, r), t && article_5_ways_to_increase_client_retention_in_your_dog_training_business_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
||||
function article_5_ways_to_increase_client_retention_in_your_dog_training_business_callSuper(t, o, e) { return o = article_5_ways_to_increase_client_retention_in_your_dog_training_business_getPrototypeOf(o), article_5_ways_to_increase_client_retention_in_your_dog_training_business_possibleConstructorReturn(t, article_5_ways_to_increase_client_retention_in_your_dog_training_business_isNativeReflectConstruct() ? Reflect.construct(o, e || [], article_5_ways_to_increase_client_retention_in_your_dog_training_business_getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
||||
function article_5_ways_to_increase_client_retention_in_your_dog_training_business_possibleConstructorReturn(t, e) { if (e && ("object" == article_5_ways_to_increase_client_retention_in_your_dog_training_business_typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return article_5_ways_to_increase_client_retention_in_your_dog_training_business_assertThisInitialized(t); }
|
||||
function article_5_ways_to_increase_client_retention_in_your_dog_training_business_assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
||||
function article_5_ways_to_increase_client_retention_in_your_dog_training_business_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (article_5_ways_to_increase_client_retention_in_your_dog_training_business_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
||||
function article_5_ways_to_increase_client_retention_in_your_dog_training_business_superPropGet(t, o, e, r) { var p = article_5_ways_to_increase_client_retention_in_your_dog_training_business_get(article_5_ways_to_increase_client_retention_in_your_dog_training_business_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
||||
function article_5_ways_to_increase_client_retention_in_your_dog_training_business_get() { return article_5_ways_to_increase_client_retention_in_your_dog_training_business_get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = article_5_ways_to_increase_client_retention_in_your_dog_training_business_superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, article_5_ways_to_increase_client_retention_in_your_dog_training_business_get.apply(null, arguments); }
|
||||
function article_5_ways_to_increase_client_retention_in_your_dog_training_business_superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = article_5_ways_to_increase_client_retention_in_your_dog_training_business_getPrototypeOf(t));); return t; }
|
||||
function article_5_ways_to_increase_client_retention_in_your_dog_training_business_getPrototypeOf(t) { return article_5_ways_to_increase_client_retention_in_your_dog_training_business_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, article_5_ways_to_increase_client_retention_in_your_dog_training_business_getPrototypeOf(t); }
|
||||
function article_5_ways_to_increase_client_retention_in_your_dog_training_business_inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && article_5_ways_to_increase_client_retention_in_your_dog_training_business_setPrototypeOf(t, e); }
|
||||
function article_5_ways_to_increase_client_retention_in_your_dog_training_business_setPrototypeOf(t, e) { return article_5_ways_to_increase_client_retention_in_your_dog_training_business_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, article_5_ways_to_increase_client_retention_in_your_dog_training_business_setPrototypeOf(t, e); }
|
||||
function article_5_ways_to_increase_client_retention_in_your_dog_training_business_defineProperty(e, r, t) { return (r = article_5_ways_to_increase_client_retention_in_your_dog_training_business_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
||||
function article_5_ways_to_increase_client_retention_in_your_dog_training_business_toPropertyKey(t) { var i = article_5_ways_to_increase_client_retention_in_your_dog_training_business_toPrimitive(t, "string"); return "symbol" == article_5_ways_to_increase_client_retention_in_your_dog_training_business_typeof(i) ? i : i + ""; }
|
||||
function article_5_ways_to_increase_client_retention_in_your_dog_training_business_toPrimitive(t, r) { if ("object" != article_5_ways_to_increase_client_retention_in_your_dog_training_business_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != article_5_ways_to_increase_client_retention_in_your_dog_training_business_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
||||
// internal
|
||||
// import BasePage from "../base.js";
|
||||
|
||||
// external
|
||||
var PageBlogArticle5WaysToIncreaseClientRetentionInYourDogTrainingBusiness = /*#__PURE__*/function (_PageBlogHome) {
|
||||
function PageBlogArticle5WaysToIncreaseClientRetentionInYourDogTrainingBusiness(router) {
|
||||
article_5_ways_to_increase_client_retention_in_your_dog_training_business_classCallCheck(this, PageBlogArticle5WaysToIncreaseClientRetentionInYourDogTrainingBusiness);
|
||||
return article_5_ways_to_increase_client_retention_in_your_dog_training_business_callSuper(this, PageBlogArticle5WaysToIncreaseClientRetentionInYourDogTrainingBusiness, [router]);
|
||||
}
|
||||
article_5_ways_to_increase_client_retention_in_your_dog_training_business_inherits(PageBlogArticle5WaysToIncreaseClientRetentionInYourDogTrainingBusiness, _PageBlogHome);
|
||||
return article_5_ways_to_increase_client_retention_in_your_dog_training_business_createClass(PageBlogArticle5WaysToIncreaseClientRetentionInYourDogTrainingBusiness, [{
|
||||
key: "initialize",
|
||||
value: function initialize() {
|
||||
this.sharedInitialize();
|
||||
this.hookupFormNewsletter();
|
||||
this.hookupButtonSubmitFormContactUs();
|
||||
}
|
||||
}, {
|
||||
key: "leave",
|
||||
value: function leave() {
|
||||
article_5_ways_to_increase_client_retention_in_your_dog_training_business_superPropGet(PageBlogArticle5WaysToIncreaseClientRetentionInYourDogTrainingBusiness, "leave", this, 3)([]);
|
||||
}
|
||||
}]);
|
||||
}(PageBlogHome);
|
||||
article_5_ways_to_increase_client_retention_in_your_dog_training_business_defineProperty(PageBlogArticle5WaysToIncreaseClientRetentionInYourDogTrainingBusiness, "hash", hashPageBlogArticle5WaysToIncreaseClientRetentionInYourDogTrainingBusiness);
|
||||
|
||||
;// ./static/js/pages/blog/article_how_to_scale_your_dog_training_business_from_25_to_100_plus_clients.js
|
||||
function article_how_to_scale_your_dog_training_business_from_25_to_100_plus_clients_typeof(o) { "@babel/helpers - typeof"; return article_how_to_scale_your_dog_training_business_from_25_to_100_plus_clients_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, article_how_to_scale_your_dog_training_business_from_25_to_100_plus_clients_typeof(o); }
|
||||
function article_how_to_scale_your_dog_training_business_from_25_to_100_plus_clients_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
||||
@@ -8990,6 +9034,7 @@ function router_toPrimitive(t, r) { if ("object" != router_typeof(t) || !t) retu
|
||||
|
||||
|
||||
|
||||
|
||||
// Dog
|
||||
|
||||
|
||||
@@ -9049,6 +9094,10 @@ var Router = /*#__PURE__*/function () {
|
||||
name: 'PageBlogHome',
|
||||
module: PageBlogHome
|
||||
};
|
||||
this.pages[hashPageBlogArticle5WaysToIncreaseClientRetentionInYourDogTrainingBusiness] = {
|
||||
name: 'PageBlogArticle5WaysToIncreaseClientRetentionInYourDogTrainingBusiness',
|
||||
module: PageBlogArticle5WaysToIncreaseClientRetentionInYourDogTrainingBusiness
|
||||
};
|
||||
this.pages[hashPageBlogArticleHowToScaleYourDogTrainingBusinessFrom25To100PlusClients] = {
|
||||
name: 'PageBlogArticleHowToScaleYourDogTrainingBusinessFrom25To100PlusClients',
|
||||
module: PageBlogBlogArticleHowToScaleYourDogTrainingBusinessFrom25To100PlusClients
|
||||
@@ -9174,6 +9223,10 @@ var Router = /*#__PURE__*/function () {
|
||||
var isPopState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
||||
return _this.navigateToHash(hashPageBlogHome, isPopState);
|
||||
};
|
||||
this.routes[hashPageBlogArticle5WaysToIncreaseClientRetentionInYourDogTrainingBusiness] = function () {
|
||||
var isPopState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
||||
return _this.navigateToHash(hashPageBlogArticle5WaysToIncreaseClientRetentionInYourDogTrainingBusiness, isPopState);
|
||||
};
|
||||
this.routes[hashPageBlogArticleHowToScaleYourDogTrainingBusinessFrom25To100PlusClients] = function () {
|
||||
var isPopState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
||||
return _this.navigateToHash(hashPageBlogArticleHowToScaleYourDogTrainingBusinessFrom25To100PlusClients, isPopState);
|
||||
|
||||
2
static/dist/js/main.bundle.js.map
vendored
2
static/dist/js/main.bundle.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -0,0 +1,25 @@
|
||||
|
||||
// internal
|
||||
// import BasePage from "../base.js";
|
||||
import PageBlogHome from "./home.js";
|
||||
// external
|
||||
|
||||
|
||||
export default class PageBlogArticle5WaysToIncreaseClientRetentionInYourDogTrainingBusiness extends PageBlogHome {
|
||||
static hash = hashPageBlogArticle5WaysToIncreaseClientRetentionInYourDogTrainingBusiness;
|
||||
|
||||
constructor(router) {
|
||||
super(router);
|
||||
}
|
||||
|
||||
initialize() {
|
||||
this.sharedInitialize();
|
||||
this.hookupFormNewsletter();
|
||||
this.hookupButtonSubmitFormContactUs();
|
||||
}
|
||||
|
||||
leave() {
|
||||
super.leave();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import PageApplyFoundingPartner from './pages/core/apply-founding-partner.js';
|
||||
import PageApplyFoundingPartnerSuccess from './pages/core/apply-founding-partner-success.js';
|
||||
// Blog
|
||||
import PageBlogHome from './pages/blog/home.js';
|
||||
import PageBlogArticle5WaysToIncreaseClientRetentionInYourDogTrainingBusiness from './pages/blog/article_5_ways_to_increase_client_retention_in_your_dog_training_business.js';
|
||||
import PageBlogArticleHowToScaleYourDogTrainingBusinessFrom25To100PlusClients from './pages/blog/article_how_to_scale_your_dog_training_business_from_25_to_100_plus_clients.js';
|
||||
import PageBlogArticleHowToScaleYourDogTrainingBusinessFromSoloToMultiTrainerSuccess from './pages/blog/article_how_to_scale_your_dog_training_business_from_25_to_100_plus_clients.js';
|
||||
import PageBlogArticleTheScienceBehindDogTrainingAssessmentsHowToTrackRealProgress from './pages/blog/article_the_science_behind_dog_training_assessments_how_to_track_real_progress.js';
|
||||
@@ -55,6 +56,7 @@ export default class Router {
|
||||
this.pages[hashPageApplyFoundingPartnerSuccess] = { name: 'PageApplyFoundingPartnerSuccess', module: PageApplyFoundingPartnerSuccess };
|
||||
// Blog
|
||||
this.pages[hashPageBlogHome] = { name: 'PageBlogHome', module: PageBlogHome };
|
||||
this.pages[hashPageBlogArticle5WaysToIncreaseClientRetentionInYourDogTrainingBusiness] = { name: 'PageBlogArticle5WaysToIncreaseClientRetentionInYourDogTrainingBusiness', module: PageBlogArticle5WaysToIncreaseClientRetentionInYourDogTrainingBusiness };
|
||||
this.pages[hashPageBlogArticleHowToScaleYourDogTrainingBusinessFrom25To100PlusClients] = { name: 'PageBlogArticleHowToScaleYourDogTrainingBusinessFrom25To100PlusClients', module: PageBlogArticleHowToScaleYourDogTrainingBusinessFrom25To100PlusClients };
|
||||
this.pages[hashPageBlogArticleHowToScaleYourDogTrainingBusinessFromSoloToMultiTrainerSuccess] = { name: 'PageBlogArticleHowToScaleYourDogTrainingBusinessFromSoloToMultiTrainerSuccess', module: PageBlogArticleHowToScaleYourDogTrainingBusinessFromSoloToMultiTrainerSuccess };
|
||||
this.pages[hashPageBlogArticleTheScienceBehindDogTrainingAssessmentsHowToTrackRealProgress] = { name: 'PageBlogArticleTheScienceBehindDogTrainingAssessmentsHowToTrackRealProgress', module: PageBlogArticleTheScienceBehindDogTrainingAssessmentsHowToTrackRealProgress };
|
||||
@@ -93,6 +95,7 @@ export default class Router {
|
||||
this.routes[hashPageApplyFoundingPartnerSuccess] = (isPopState = false) => this.navigateToHash(hashPageApplyFoundingPartnerSuccess, isPopState);
|
||||
// Blog
|
||||
this.routes[hashPageBlogHome] = (isPopState = false) => this.navigateToHash(hashPageBlogHome, isPopState);
|
||||
this.routes[hashPageBlogArticle5WaysToIncreaseClientRetentionInYourDogTrainingBusiness] = (isPopState = false) => this.navigateToHash(hashPageBlogArticle5WaysToIncreaseClientRetentionInYourDogTrainingBusiness, isPopState);
|
||||
this.routes[hashPageBlogArticleHowToScaleYourDogTrainingBusinessFrom25To100PlusClients] = (isPopState = false) => this.navigateToHash(hashPageBlogArticleHowToScaleYourDogTrainingBusinessFrom25To100PlusClients, isPopState);
|
||||
this.routes[hashPageBlogArticleHowToScaleYourDogTrainingBusinessFromSoloToMultiTrainerSuccess] = (isPopState = false) => this.navigateToHash(hashPageBlogArticleHowToScaleYourDogTrainingBusinessFromSoloToMultiTrainerSuccess, isPopState);
|
||||
this.routes[hashPageBlogArticleTheScienceBehindDogTrainingAssessmentsHowToTrackRealProgress] = (isPopState = false) => this.navigateToHash(hashPageBlogArticleTheScienceBehindDogTrainingAssessmentsHowToTrackRealProgress, isPopState);
|
||||
|
||||
@@ -131,6 +131,7 @@
|
||||
var hashPageAdminHome = "{{ model.HASH_PAGE_ADMIN_HOME }}";
|
||||
var hashPageApplyFoundingPartner = "{{ model.HASH_PAGE_APPLY_FOUNDING_PARTNER }}";
|
||||
var hashPageApplyFoundingPartnerSuccess = "{{ model.HASH_PAGE_APPLY_FOUNDING_PARTNER_SUCCESS }}";
|
||||
var hashPageBlogArticle5WaysToIncreaseClientRetentionInYourDogTrainingBusiness = "{{ model.HASH_PAGE_BLOG_ARTICLE_5_WAYS_TO_INCREASE_CLIENT_RETENTION_IN_YOUR_DOG_TRAINING_BUSINESS }}";
|
||||
var hashPageBlogArticleHowToScaleYourDogTrainingBusinessFrom25To100PlusClients = "{{ model.HASH_PAGE_BLOG_ARTICLE_HOW_TO_SCALE_YOUR_DOG_TRAINING_BUSINESS_FROM_25_TO_100_PLUS_CLIENTS }}";
|
||||
var hashPageBlogArticleHowToScaleYourDogTrainingBusinessFromSoloToMultiTrainerSuccess = "{{ model.HASH_PAGE_BLOG_ARTICLE_HOW_TO_SCALE_YOUR_DOG_TRAINING_BUSINESS_FROM_SOLO_TO_MULTI_TRAINER_SUCCESS }}";
|
||||
var hashPageBlogArticleTheHiddenCostsOfSpreadsheetDogTrainingWhyUkTrainersAreLosing2000PlusPoundsPerYear = "{{ model.HASH_PAGE_BLOG_ARTICLE_THE_HIDDEN_COSTS_OF_SPREADSHEET_DOG_TRAINING_WHY_UK_TRAINERS_ARE_LOSING_2000_PLUS_POUNDS_PER_YEAR }}";
|
||||
|
||||
@@ -0,0 +1,229 @@
|
||||
|
||||
|
||||
{% extends 'layouts/layout_blog_article.html' %}
|
||||
|
||||
{% block page_head %}
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='dist/css/blog_article.bundle.css') }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block page_nav_links %}
|
||||
{% endblock %}
|
||||
|
||||
{% block article_header %}
|
||||
<span class="article-category">Client Success</span>
|
||||
<h1 class="article-title">5 Ways to Increase Client Retention in Your Dog Training Business</h1>
|
||||
|
||||
<div class="author-info">
|
||||
<div class="author-avatar">T</div>
|
||||
<div class="author-details">
|
||||
<h4>Teddy Middleton-Smith</h4>
|
||||
<p>Professional Dog Trainer & Software Engineer</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="meta-item">
|
||||
<span>📅</span>
|
||||
<span>18th August 2025</span>
|
||||
</div>
|
||||
<div class="meta-item">
|
||||
<span>⏱️</span>
|
||||
<span>6 min read</span>
|
||||
</div>
|
||||
<!--
|
||||
<div class="meta-item">
|
||||
<span>👀</span>
|
||||
<span>987 views</span>
|
||||
</div>
|
||||
-->
|
||||
{% endblock %}
|
||||
|
||||
{% block article_image_featured %}
|
||||
{% endblock %}
|
||||
|
||||
{% block article_body %}
|
||||
|
||||
<style>
|
||||
.retention-stat {
|
||||
background: #f8f9fa;
|
||||
border-left: 4px solid #007bff;
|
||||
padding: 15px 20px;
|
||||
margin: 20px 0;
|
||||
font-size: 1.1em;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.strategy-number {
|
||||
background: #007bff;
|
||||
color: white;
|
||||
border-radius: 50%;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: bold;
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>Acquiring new clients costs 5-7 times more than retaining existing ones, yet many dog trainers focus heavily on attracting new business while their current clients quietly slip away. The most successful training businesses I've worked with maintain retention rates above 85%—here's how they do it.</p>
|
||||
|
||||
<div class="retention-stat">
|
||||
📊 Industry Reality: The average dog trainer loses 40% of their clients within the first year, but top-performing trainers retain over 85% of their clients long-term.
|
||||
</div>
|
||||
|
||||
<p>Client retention isn't just about keeping customers happy—it's about building a sustainable business that grows through repeat bookings, referrals, and expanded services. Let's explore five proven strategies that will transform one-time clients into lifelong advocates for your business.</p>
|
||||
|
||||
<h2><span class="strategy-number">1</span>Master the Art of Progress Communication</h2>
|
||||
|
||||
<p>The biggest reason clients leave dog training programs isn't poor results—it's poor communication about the results being achieved. Dogs don't improve in straight lines, and clients often can't see the subtle progress happening week by week.</p>
|
||||
|
||||
<h3>What Top Trainers Do:</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>Weekly progress summaries:</strong> Send detailed reports showing specific improvements, even small ones</li>
|
||||
<li><strong>Visual progress tracking:</strong> Use charts and graphs to demonstrate progress over time</li>
|
||||
<li><strong>Video comparisons:</strong> Show "before and after" clips from training sessions</li>
|
||||
<li><strong>Celebrate micro-wins:</strong> Acknowledge every small breakthrough</li>
|
||||
</ul>
|
||||
|
||||
<div class="quote-box">
|
||||
"I started sending weekly progress reports with charts showing response time improvements. Client complaints dropped by 70%, and my retention rate jumped from 60% to 87%." - Professional Dog Trainer, Manchester
|
||||
</div>
|
||||
|
||||
<p>The key is making progress tangible and visible. When clients can see concrete evidence of improvement, they're far more likely to continue and recommend your services to others.</p>
|
||||
|
||||
<h2><span class="strategy-number">2</span>Implement Strategic Follow-Up Systems</h2>
|
||||
|
||||
<p>Many trainers think their job ends when the formal training program finishes. The most successful trainers know that post-program follow-up is where loyalty is truly built.</p>
|
||||
|
||||
<h3>Effective Follow-Up Framework:</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>48-hour check-in:</strong> Phone call or text to address immediate concerns</li>
|
||||
<li><strong>One-week follow-up:</strong> Email with additional resources and tips</li>
|
||||
<li><strong>Monthly maintenance calls:</strong> Quick progress check and problem-solving</li>
|
||||
<li><strong>Quarterly assessments:</strong> Formal evaluation and refresher session offers</li>
|
||||
</ul>
|
||||
|
||||
<div class="callout-box">
|
||||
<h4>💡 Pro Tip</h4>
|
||||
<p>Use automated follow-up sequences to ensure no client falls through the cracks. A simple system can transform your retention rates without adding hours to your workday.</p>
|
||||
</div>
|
||||
|
||||
<h2><span class="strategy-number">3</span>Create Compelling Homework Systems</h2>
|
||||
|
||||
<p>Clients who actively practice between sessions see better results, feel more engaged, and stay longer in your programs. The challenge is making homework assignments that clients actually complete.</p>
|
||||
|
||||
<h3>High-Completion Homework Strategies:</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>Micro-sessions:</strong> 5-minute exercises instead of 30-minute practices</li>
|
||||
<li><strong>Video demonstrations:</strong> Show exactly how to perform each exercise</li>
|
||||
<li><strong>Progress tracking sheets:</strong> Simple checkboxes and rating scales</li>
|
||||
<li><strong>Gamification elements:</strong> Achievements and milestone celebrations</li>
|
||||
</ul>
|
||||
|
||||
<p>When clients practice regularly, they see faster results, which increases their confidence in your methods and their likelihood of continuing with advanced programs.</p>
|
||||
|
||||
<h2><span class="strategy-number">4</span>Build Community and Connection</h2>
|
||||
|
||||
<p>Training is often seen as a transactional service, but the most retained clients view their trainers as ongoing partners in their dog's development. Building community transforms business relationships into personal connections.</p>
|
||||
|
||||
<h3>Community-Building Tactics:</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>Client Facebook groups:</strong> Peer support and success story sharing</li>
|
||||
<li><strong>Graduate meetups:</strong> Monthly social walks for program alumni</li>
|
||||
<li><strong>Success celebrations:</strong> Feature client achievements on social media</li>
|
||||
<li><strong>Educational workshops:</strong> Ongoing learning opportunities beyond basic training</li>
|
||||
</ul>
|
||||
|
||||
<div class="callout-box">
|
||||
<h4>⚠️ Common Mistake</h4>
|
||||
<p>Don't treat clients as just another booking. Remember personal details, ask about their dog's personality quirks, and show genuine interest in their long-term success.</p>
|
||||
</div>
|
||||
|
||||
<h2><span class="strategy-number">5</span>Offer Clear Progression Pathways</h2>
|
||||
|
||||
<p>Many clients leave because they don't know what comes next after basic training. Creating obvious next steps keeps clients engaged and provides natural upselling opportunities.</p>
|
||||
|
||||
<h3>Successful Progression Models:</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>Tiered training levels:</strong> Basic → Intermediate → Advanced programs</li>
|
||||
<li><strong>Specialized skills training:</strong> Agility, therapy work, or sport-specific programs</li>
|
||||
<li><strong>Maintenance packages:</strong> Monthly check-ins and skill refreshers</li>
|
||||
<li><strong>Behavior modification programs:</strong> Addressing specific issues as they arise</li>
|
||||
</ul>
|
||||
|
||||
<p>Present these options before clients complete their current program. When they can see the next step clearly, they're much more likely to continue their journey with you.</p>
|
||||
|
||||
<div class="quote-box">
|
||||
"I redesigned my programs to have clear levels and always discuss 'what's next' in the final session. My average client lifetime value increased by 180%." - Professional Dog Trainer, Bristol
|
||||
</div>
|
||||
|
||||
<h2>The Technology Advantage</h2>
|
||||
|
||||
<p>While these strategies can be implemented manually, the most successful trainers use technology to automate and systematize their retention efforts:</p>
|
||||
|
||||
<ul>
|
||||
<li>Automated progress reports with visual charts</li>
|
||||
<li>Follow-up email sequences</li>
|
||||
<li>Digital homework tracking systems</li>
|
||||
<li>Client portal access for ongoing engagement</li>
|
||||
</ul>
|
||||
|
||||
<p>The right business management software can handle the administrative side of retention, freeing you to focus on the personal connections that truly build loyalty.</p>
|
||||
|
||||
<h2>Measuring Your Retention Success</h2>
|
||||
|
||||
<p>Track these key metrics to monitor your retention improvement:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>Client Lifetime Value:</strong> Average revenue per client over their entire relationship</li>
|
||||
<li><strong>Program Completion Rate:</strong> Percentage of clients who finish their initial program</li>
|
||||
<li><strong>Repeat Booking Rate:</strong> Clients who book additional services within 12 months</li>
|
||||
<li><strong>Referral Rate:</strong> New clients acquired through existing client recommendations</li>
|
||||
</ul>
|
||||
|
||||
<div class="callout-box">
|
||||
<h4>🎯 Retention Goal</h4>
|
||||
<p>Aim for 85%+ retention rate within your first year. This benchmark separates thriving training businesses from those that struggle to grow sustainably.</p>
|
||||
</div>
|
||||
|
||||
<h2>Your 30-Day Retention Action Plan</h2>
|
||||
|
||||
<p>Ready to transform your client retention? Here's your step-by-step implementation plan:</p>
|
||||
|
||||
<ol>
|
||||
<li><strong>Week 1:</strong> Set up progress tracking and weekly communication systems</li>
|
||||
<li><strong>Week 2:</strong> Create follow-up email templates and automation sequences</li>
|
||||
<li><strong>Week 3:</strong> Design homework systems with clear tracking methods</li>
|
||||
<li><strong>Week 4:</strong> Plan community-building activities and progression pathways</li>
|
||||
</ol>
|
||||
|
||||
<p>Remember, retention improvements compound over time. Small changes implemented consistently will dramatically impact your business's long-term success and profitability.</p>
|
||||
|
||||
<div class="callout-box">
|
||||
<h4>🚀 Take Action Today</h4>
|
||||
<p>Start with just one strategy—improved progress communication. Send a detailed progress update to five current clients this week and watch how they respond. You'll be amazed at the difference it makes.</p>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block article_tags %}
|
||||
<a href="#" class="tag">client retention</a>
|
||||
<a href="#" class="tag">dog training business</a>
|
||||
<a href="#" class="tag">client communication</a>
|
||||
<a href="#" class="tag">business growth</a>
|
||||
<a href="#" class="tag">customer success</a>
|
||||
<a href="#" class="tag">professional development</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block author_bio %}
|
||||
<div class="author-bio-avatar">T</div>
|
||||
<h4>Teddy Middleton-Smith</h4>
|
||||
<p>Edward (Teddy) Middleton-Smith is the founder of Fetch Metrics and a software engineer who discovered his passion for dog training through his own rescue dogs. With over 8 years of hands-on training experience and 6+ years in professional software development, Teddy combines technical expertise with real-world training knowledge to solve the everyday challenges facing professional dog trainers.</p>
|
||||
<p>After witnessing firsthand how outdated systems were holding back talented trainers, Teddy set out to build purpose-designed software that actually understands the unique needs of the dog training industry. When he's not coding or writing about business growth strategies, you'll find him working with local rescue organisations or perfecting recall training with his own pack.</p>
|
||||
<p>Teddy holds a First Class Masters degree in Mechanical Engineering and believes that the best technology solutions come from deeply understanding the problems they're meant to solve.</p>
|
||||
{% endblock %}
|
||||
@@ -55,14 +55,6 @@
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.article-title {
|
||||
color: #2c5aa0;
|
||||
font-size: 2.5em;
|
||||
margin: 0 0 30px 0;
|
||||
line-height: 1.2;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.author-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -105,12 +105,10 @@
|
||||
<a href="{{ model.HASH_PAGE_BLOG_CATEGORY_TRAINING_TECHNIQUES }}" class="{{ model.FLAG_NAV_BLOG_CATEGORY_TRAINING_TECHNIQUES }}">Training Techniques</a>
|
||||
<span class="post-count">2</span>
|
||||
</li>
|
||||
<!--
|
||||
<li>
|
||||
<a href="#">Client Relations</a>
|
||||
<span class="post-count">15</span>
|
||||
<a href="{{ model.HASH_PAGE_BLOG_CATEGORY_CLIENT_RELATIONS }}">Client Relations</a>
|
||||
<span class="post-count">1</span>
|
||||
</li>
|
||||
-->
|
||||
<li>
|
||||
<a href="{{ model.HASH_PAGE_BLOG_CATEGORY_MARKETING_AND_GROWTH }}" class="{{ model.FLAG_NAV_BLOG_CATEGORY_MARKETING_AND_GROWTH }}">Marketing & Growth</a>
|
||||
<span class="post-count">1</span>
|
||||
@@ -132,6 +130,12 @@
|
||||
<div class="sidebar-widget">
|
||||
<h3 class="widget-title">Recent Posts</h3>
|
||||
<ul class="recent-posts">
|
||||
<li class="recent-post-item">
|
||||
<a href="{{ model.HASH_PAGE_BLOG_ARTICLE_5_WAYS_TO_INCREASE_CLIENT_RETENTION_IN_YOUR_DOG_TRAINING_BUSINESS }}"
|
||||
class="recent-post-title"
|
||||
>5 Ways to Increase Client Retention in Your Dog Training Business</a>
|
||||
<div class="recent-post-date">18th August 2025</div>
|
||||
</li>
|
||||
<li class="recent-post-item">
|
||||
<a href="{{ model.HASH_PAGE_BLOG_ARTICLE_THE_HIDDEN_COSTS_OF_SPREADSHEET_DOG_TRAINING_WHY_UK_TRAINERS_ARE_LOSING_2000_PLUS_POUNDS_PER_YEAR }}"
|
||||
class="recent-post-title"
|
||||
@@ -171,6 +175,22 @@
|
||||
|
||||
<!-- More Blog Posts -->
|
||||
<section class="blog-posts-grid">
|
||||
<article class="blog-post-card">
|
||||
<div class="post-image">📊</div>
|
||||
<div class="post-content">
|
||||
<span class="post-category">Client Relations</span>
|
||||
<h3>5 Ways to Increase Client Retention in Your Dog Training Business</h3>
|
||||
<div class="post-meta">
|
||||
<span>📅 18th August 2025</span>
|
||||
<span>⏱️ 6 min read</span>
|
||||
</div>
|
||||
<p class="post-excerpt">
|
||||
The biggest reason clients leave dog training programs isn't poor results — it's poor communication.
|
||||
</p>
|
||||
<a href="{{ model.HASH_PAGE_BLOG_ARTICLE_5_WAYS_TO_INCREASE_CLIENT_RETENTION_IN_YOUR_DOG_TRAINING_BUSINESS }}" class="read-more">Read More</a>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<article class="blog-post-card">
|
||||
<div class="post-image">📊</div>
|
||||
<div class="post-content">
|
||||
|
||||
Reference in New Issue
Block a user