Feat: Apply for Founding Partner Program page hookup fixed and hooked up to rest of app through Home page.
This commit is contained in:
@@ -10,6 +10,7 @@ Feature: Apply_Founding_Partner_Form Business Object
|
||||
# internal
|
||||
from business_objects.base import Base
|
||||
from business_objects.db_base import SQLAlchemy_ABC
|
||||
from business_objects.project_hub.contact_form import Contact_Form
|
||||
import lib.argument_validation as av
|
||||
from extensions import db
|
||||
from helpers.helper_app import Helper_App
|
||||
@@ -23,10 +24,12 @@ class Apply_Founding_Partner_Form(SQLAlchemy_ABC, Base):
|
||||
FLAG_COMMITMENT_FREQUENCY: ClassVar[str] = 'id_commitment_frequency'
|
||||
FLAG_DOG_COUNT: ClassVar[str] = 'dog-count'
|
||||
FLAG_EXISTING_CHALLENGES: ClassVar[str] = 'existing_challenges'
|
||||
FLAG_EXISTING_SYSTEM: ClassVar[str] = 'id_existing_system'
|
||||
FLAG_EXISTING_SYSTEM: ClassVar[str] = 'ids_existing_system'
|
||||
FLAG_EXISTING_TIME_SINK_WEEKLY: ClassVar[str] = 'id_existing_time_sink_weekly'
|
||||
# FLAG_MOST_VALUABLE_FEATURE: ClassVar[str] = 'most_valuable_feature'
|
||||
FLAG_SPECIALITY: ClassVar[str] = 'id_speciality'
|
||||
FLAG_NAME_COMPANY: ClassVar[str] = Contact_Form.FLAG_NAME_COMPANY
|
||||
FLAG_NAME_CONTACT: ClassVar[str] = Contact_Form.FLAG_NAME_CONTACT
|
||||
FLAG_SPECIALITY: ClassVar[str] = 'ids_speciality'
|
||||
FLAG_YEARS_OF_EXPERIENCE: ClassVar[str] = 'id_years_of_experience'
|
||||
NAME_ATTR_OPTION_VALUE: ClassVar[str] = FLAG_APPLY_FOUNDING_PARTNER_FORM
|
||||
NAME_ATTR_OPTION_TEXT: ClassVar[str] = Base.FLAG_EMAIL
|
||||
@@ -44,7 +47,7 @@ class Apply_Founding_Partner_Form(SQLAlchemy_ABC, Base):
|
||||
id_years_of_experience = db.Column(db.Integer)
|
||||
ids_speciality = db.Column(db.String(255))
|
||||
ids_existing_system = db.Column(db.String(255))
|
||||
id_existing_challenges = db.Column(db.Integer)
|
||||
existing_challenges = db.Column(db.Integer)
|
||||
id_existing_time_sink_weekly = db.Column(db.Integer)
|
||||
id_commitment_frequency = db.Column(db.Integer)
|
||||
# most_valuable_feature = db.Column(db.Integer)
|
||||
@@ -71,7 +74,7 @@ class Apply_Founding_Partner_Form(SQLAlchemy_ABC, Base):
|
||||
form.id_years_of_experience = query_row[4]
|
||||
form.ids_speciality = query_row[2]
|
||||
form.ids_existing_system = query_row[3]
|
||||
form.id_existing_challenges = query_row[4]
|
||||
form.existing_challenges = query_row[4]
|
||||
form.id_existing_time_sink_weekly = query_row[2]
|
||||
form.id_commitment_frequency = query_row[3]
|
||||
# form.most_valuable_feature = query_row[4]
|
||||
@@ -92,12 +95,12 @@ class Apply_Founding_Partner_Form(SQLAlchemy_ABC, Base):
|
||||
form.name_contact = json[cls.FLAG_NAME_CONTACT]
|
||||
form.website = json[cls.FLAG_WEBSITE]
|
||||
form.dog_count = json[cls.FLAG_DOG_COUNT]
|
||||
form.years_of_experience = json[cls.FLAG_YEARS_OF_EXPERIENCE]
|
||||
form.speciality = json[cls.FLAG_SPECIALITY]
|
||||
form.existing_system = json[cls.FLAG_EXISTING_SYSTEM]
|
||||
form.id_years_of_experience = json[cls.FLAG_YEARS_OF_EXPERIENCE]
|
||||
form.ids_speciality = json[cls.FLAG_SPECIALITY]
|
||||
form.ids_existing_system = json[cls.FLAG_EXISTING_SYSTEM]
|
||||
form.existing_challenges = json[cls.FLAG_EXISTING_CHALLENGES]
|
||||
form.existing_time_sink_weekly = json[cls.FLAG_EXISTING_TIME_SINK_WEEKLY]
|
||||
form.commitment_frequency = json[cls.FLAG_COMMITMENT_FREQUENCY]
|
||||
form.id_existing_time_sink_weekly = json[cls.FLAG_EXISTING_TIME_SINK_WEEKLY]
|
||||
form.id_commitment_frequency = json[cls.FLAG_COMMITMENT_FREQUENCY]
|
||||
# form.most_valuable_feature = json[cls.FLAG_MOST_VALUABLE_FEATURE]
|
||||
form.notes = json[cls.FLAG_NOTES]
|
||||
form.active = av.input_bool(json[cls.FLAG_ACTIVE], cls.FLAG_ACTIVE, _m)
|
||||
@@ -107,18 +110,18 @@ class Apply_Founding_Partner_Form(SQLAlchemy_ABC, Base):
|
||||
|
||||
def to_json(self):
|
||||
return {
|
||||
Contact_Form.FLAG_NAME_CONTACT: self.contact_name
|
||||
Contact_Form.FLAG_NAME_CONTACT: self.name_contact
|
||||
, Base.FLAG_EMAIL: self.email
|
||||
, Base.FLAG_PHONE_NUMBER: self.phone_number
|
||||
, Contact_Form.FLAG_NAME_COMPANY: self.company_name
|
||||
, Contact_Form.FLAG_NAME_COMPANY: self.name_company
|
||||
, Base.FLAG_WEBSITE: self.website
|
||||
, Apply_Founding_Partner_Form.FLAG_DOG_COUNT: self.dog_count
|
||||
, Apply_Founding_Partner_Form.FLAG_YEARS_OF_EXPERIENCE: self.years_of_experience
|
||||
, Apply_Founding_Partner_Form.FLAG_SPECIALITY: self.speciality
|
||||
, Apply_Founding_Partner_Form.FLAG_EXISTING_SYSTEM: self.existing_system
|
||||
, Apply_Founding_Partner_Form.FLAG_YEARS_OF_EXPERIENCE: self.id_years_of_experience
|
||||
, Apply_Founding_Partner_Form.FLAG_SPECIALITY: self.ids_speciality
|
||||
, Apply_Founding_Partner_Form.FLAG_EXISTING_SYSTEM: self.ids_existing_system
|
||||
, Apply_Founding_Partner_Form.FLAG_EXISTING_CHALLENGES: self.existing_challenges
|
||||
, Apply_Founding_Partner_Form.FLAG_EXISTING_TIME_SINK_WEEKLY: self.existing_time_sink_weekly
|
||||
, Apply_Founding_Partner_Form.FLAG_COMMITMENT_FREQUENCY: self.commitment_frequency
|
||||
, Apply_Founding_Partner_Form.FLAG_EXISTING_TIME_SINK_WEEKLY: self.id_existing_time_sink_weekly
|
||||
, Apply_Founding_Partner_Form.FLAG_COMMITMENT_FREQUENCY: self.id_commitment_frequency
|
||||
# , Apply_Founding_Partner_Form.FLAG_IMPLEMENTATION_TIMELINE: self.implementation_timeline
|
||||
# , Apply_Founding_Partner_Form.FLAG_MOST_VALUABLE_FEATURE: self.most_valuable_feature
|
||||
, Apply_Founding_Partner_Form.FLAG_NOTES: self.notes
|
||||
@@ -130,19 +133,19 @@ class Apply_Founding_Partner_Form(SQLAlchemy_ABC, Base):
|
||||
def __repr__(self):
|
||||
return f'''
|
||||
{self.__class__.__name__}(
|
||||
{self.FLAG_CONTACT_FORM}: {self.id_apply_founding_partner_form}
|
||||
{Contact_Form.FLAG_NAME_CONTACT}: {self.contact_name}
|
||||
{self.FLAG_APPLY_FOUNDING_PARTNER_FORM}: {self.id_apply_founding_partner_form}
|
||||
{Contact_Form.FLAG_NAME_CONTACT}: {self.name_contact}
|
||||
{Base.FLAG_EMAIL}: {self.email}
|
||||
{Base.FLAG_PHONE_NUMBER}: {self.phone_number}
|
||||
{Contact_Form.FLAG_NAME_COMPANY}: {self.company_name}
|
||||
{Contact_Form.FLAG_NAME_COMPANY}: {self.name_company}
|
||||
{Base.FLAG_WEBSITE}: {self.website}
|
||||
{Apply_Founding_Partner_Form.FLAG_DOG_COUNT}: {self.dog_count}
|
||||
{Apply_Founding_Partner_Form.FLAG_YEARS_OF_EXPERIENCE}: {self.years_of_experience}
|
||||
{Apply_Founding_Partner_Form.FLAG_SPECIALITY}: {self.speciality}
|
||||
{Apply_Founding_Partner_Form.FLAG_EXISTING_SYSTEM}: {self.existing_system}
|
||||
{Apply_Founding_Partner_Form.FLAG_YEARS_OF_EXPERIENCE}: {self.id_years_of_experience}
|
||||
{Apply_Founding_Partner_Form.FLAG_SPECIALITY}: {self.ids_speciality}
|
||||
{Apply_Founding_Partner_Form.FLAG_EXISTING_SYSTEM}: {self.ids_existing_system}
|
||||
{Apply_Founding_Partner_Form.FLAG_EXISTING_CHALLENGES}: {self.existing_challenges}
|
||||
{Apply_Founding_Partner_Form.FLAG_EXISTING_TIME_SINK_WEEKLY}: {self.existing_time_sink_weekly}
|
||||
{Apply_Founding_Partner_Form.FLAG_COMMITMENT_FREQUENCY}: {self.commitment_frequency}
|
||||
{Apply_Founding_Partner_Form.FLAG_EXISTING_TIME_SINK_WEEKLY}: {self.id_existing_time_sink_weekly}
|
||||
{Apply_Founding_Partner_Form.FLAG_COMMITMENT_FREQUENCY}: {self.id_commitment_frequency}
|
||||
{Apply_Founding_Partner_Form.FLAG_NOTES}: {self.notes}
|
||||
{Base.FLAG_ACTIVE}: {self.active}
|
||||
{Base.FLAG_CREATED_ON}: {self.created_on}
|
||||
@@ -163,7 +166,7 @@ class Apply_Founding_Partner_Form_Temp(db.Model, Base):
|
||||
id_years_of_experience = db.Column(db.Integer)
|
||||
ids_speciality = db.Column(db.String(255))
|
||||
ids_existing_system = db.Column(db.String(255))
|
||||
id_existing_challenges = db.Column(db.Integer)
|
||||
existing_challenges = db.Column(db.Integer)
|
||||
id_existing_time_sink_weekly = db.Column(db.Integer)
|
||||
id_commitment_frequency = db.Column(db.Integer)
|
||||
# most_valuable_feature = db.Column(db.Integer)
|
||||
@@ -176,23 +179,23 @@ class Apply_Founding_Partner_Form_Temp(db.Model, Base):
|
||||
super().__init__()
|
||||
|
||||
@classmethod
|
||||
def from_contact_form(cls, contact_form):
|
||||
_m = f'{cls.__qualname__}.from_contact_form'
|
||||
def from_apply_founding_partner_form(cls, contact_form):
|
||||
_m = f'{cls.__qualname__}.from_apply_founding_partner_form'
|
||||
temp = cls()
|
||||
temp.id_apply_founding_partner_form = contact_form.id_apply_founding_partner_form.data
|
||||
temp.name_contact = contact_form.name_contact.data
|
||||
temp.email = contact_form.email.data
|
||||
temp.phone_number = contact_form.phone_number.data
|
||||
temp.name_company = contact_form.name_company.data
|
||||
temp.website = contact_form.website.data
|
||||
temp.dog_count = contact_form.dog_count.data
|
||||
temp.id_years_of_experience = contact_form.id_years_of_experience.data
|
||||
temp.ids_speciality = contact_form.ids_speciality.data
|
||||
temp.ids_existing_system = contact_form.ids_existing_system.data
|
||||
temp.id_existing_challenges = contact_form.id_existing_challenges.data
|
||||
temp.id_existing_time_sink_weekly = contact_form.id_existing_time_sink_weekly.data
|
||||
temp.id_commitment_frequency = contact_form.id_commitment_frequency.data
|
||||
# temp.most_valuable_feature = contact_form.most_valuable_feature.data
|
||||
temp.notes = contact_form.notes.data
|
||||
temp.id_apply_founding_partner_form = contact_form.id_apply_founding_partner_form
|
||||
temp.name_contact = contact_form.name_contact
|
||||
temp.email = contact_form.email
|
||||
temp.phone_number = contact_form.phone_number
|
||||
temp.name_company = contact_form.name_company
|
||||
temp.website = contact_form.website
|
||||
temp.dog_count = contact_form.dog_count
|
||||
temp.id_years_of_experience = contact_form.id_years_of_experience
|
||||
temp.ids_speciality = contact_form.ids_speciality
|
||||
temp.ids_existing_system = contact_form.ids_existing_system
|
||||
temp.existing_challenges = contact_form.existing_challenges
|
||||
temp.id_existing_time_sink_weekly = contact_form.id_existing_time_sink_weekly
|
||||
temp.id_commitment_frequency = contact_form.id_commitment_frequency
|
||||
# temp.most_valuable_feature = contact_form.most_valuable_feature
|
||||
temp.notes = contact_form.notes
|
||||
temp.active = True
|
||||
return temp
|
||||
@@ -63,24 +63,24 @@ def apply_founding_partner_post():
|
||||
form = Form_Apply_Founding_Partner()
|
||||
if form.validate_on_submit():
|
||||
try:
|
||||
id_apply_founding_partner_form = form.id_apply_founding_partner_form.data
|
||||
# id_apply_founding_partner_form = form.id_apply_founding_partner_form.data
|
||||
contact_name = form.contact_name.data
|
||||
email = form.email.data
|
||||
phone_number = form.phone_number.data
|
||||
name_company = form.name_company.data
|
||||
company_name = form.company_name.data
|
||||
website = form.website.data
|
||||
# most_valuable_feature = form.most_valuable_feature.data
|
||||
notes = form.notes.data
|
||||
active = True
|
||||
|
||||
receive_marketing_text = "I would like to receive marketing emails.\n" if receive_marketing else ""
|
||||
# receive_marketing_text = "I would like to receive marketing emails.\n" if receive_marketing else ""
|
||||
# send email
|
||||
mailItem = Message("Fetch Metrics Website Founding Partner Application", recipients=[current_app.config['MAIL_APPLY_FOUNDING_PARTNER_PUBLIC']])
|
||||
mailItem = Message("Fetch Metrics Website Founding Partner Application", recipients=[current_app.config['MAIL_CONTACT_PUBLIC']])
|
||||
mailItem.body = '\n'.join([
|
||||
"Dear Lord Edward Middleton-Smith"
|
||||
, ""
|
||||
, "I would like to be part of your Founding Partner Program."
|
||||
, f"I currently work with {dog_count} dogs"
|
||||
# , f"I currently work with {dog_count} dogs"
|
||||
# , f"I most desire the feature: {most_valuable_feature}"
|
||||
, f"Notes: {notes}"
|
||||
, ""
|
||||
@@ -97,7 +97,7 @@ def apply_founding_partner_post():
|
||||
datastore = DataStore_Project_Hub_Contact_Form()
|
||||
apply_founding_partner_form = Apply_Founding_Partner_Form.from_json(form.to_json())
|
||||
datastore.save_apply_founding_partner_forms(
|
||||
comment = apply_founding_partner_form.message
|
||||
comment = notes
|
||||
, apply_founding_partner_forms = [apply_founding_partner_form]
|
||||
)
|
||||
return redirect(url_for(Model_View_Apply_Founding_Partner.ENDPOINT_PAGE_APPLY_FOUNDING_PARTNER_SUCCESS))
|
||||
|
||||
@@ -32,6 +32,10 @@ import json
|
||||
from altcha import verify_solution
|
||||
import base64
|
||||
|
||||
def at_least_one_required(form, field):
|
||||
"""Validator that requires at least one checkbox to be selected"""
|
||||
if not field.data or len(field.data) == 0:
|
||||
raise ValidationError('Please select at least one option.')
|
||||
|
||||
class MultiCheckboxField(SelectMultipleField):
|
||||
widget = ListWidget(prefix_label=False)
|
||||
@@ -73,7 +77,7 @@ class Form_Apply_Founding_Partner(FlaskForm):
|
||||
]
|
||||
, validators = [DataRequired()]
|
||||
)
|
||||
id_speciality = MultiCheckboxField( # SelectMultipleField(
|
||||
ids_speciality = MultiCheckboxField( # SelectMultipleField(
|
||||
'What type(s) of training do you specialise in?'
|
||||
, choices = [
|
||||
( '1', 'Basic obedience' )
|
||||
@@ -85,9 +89,9 @@ class Form_Apply_Founding_Partner(FlaskForm):
|
||||
, ( '7', 'One-on-one sessions' )
|
||||
, ( '8', 'Other (specify below)' )
|
||||
]
|
||||
, validators = [DataRequired()]
|
||||
, validators = [at_least_one_required]
|
||||
)
|
||||
id_existing_system = MultiCheckboxField( # SelectMultipleField(
|
||||
ids_existing_system = MultiCheckboxField( # SelectMultipleField(
|
||||
'How do you currently manage client information and training records?'
|
||||
, choices = [
|
||||
( '1', 'Spreadsheets (Excel/Google Sheets)' )
|
||||
@@ -97,7 +101,7 @@ class Form_Apply_Founding_Partner(FlaskForm):
|
||||
, ( '5', 'Mostly in my head/memory' )
|
||||
, ( '6', 'Other (specify below)' )
|
||||
]
|
||||
, validators = [DataRequired()]
|
||||
, validators = [at_least_one_required]
|
||||
)
|
||||
existing_challenges = TextAreaField(
|
||||
"What's your biggest frustration with your current system?"
|
||||
@@ -157,8 +161,8 @@ class Form_Apply_Founding_Partner(FlaskForm):
|
||||
, Base.FLAG_WEBSITE: self.website.data
|
||||
, Apply_Founding_Partner_Form.FLAG_DOG_COUNT: self.dog_count.data
|
||||
, Apply_Founding_Partner_Form.FLAG_YEARS_OF_EXPERIENCE: self.id_years_of_experience.data
|
||||
, Apply_Founding_Partner_Form.FLAG_SPECIALITY: self.id_speciality.data
|
||||
, Apply_Founding_Partner_Form.FLAG_EXISTING_SYSTEM: self.id_existing_system.data
|
||||
, Apply_Founding_Partner_Form.FLAG_SPECIALITY: ','.join(self.ids_speciality.data)
|
||||
, Apply_Founding_Partner_Form.FLAG_EXISTING_SYSTEM: ','.join(self.ids_existing_system.data)
|
||||
, Apply_Founding_Partner_Form.FLAG_EXISTING_CHALLENGES: self.existing_challenges.data
|
||||
, Apply_Founding_Partner_Form.FLAG_EXISTING_TIME_SINK_WEEKLY: self.id_existing_time_sink_weekly.data
|
||||
, Apply_Founding_Partner_Form.FLAG_COMMITMENT_FREQUENCY: self.id_commitment_frequency.data
|
||||
|
||||
@@ -36,8 +36,6 @@ class AltchaValidator:
|
||||
def __call__(self, form, field):
|
||||
altcha_data = field.data
|
||||
|
||||
return True
|
||||
|
||||
if not altcha_data:
|
||||
raise ValidationError(self.message)
|
||||
|
||||
|
||||
@@ -103,7 +103,8 @@ class Model_View_Base(BaseModel, ABC):
|
||||
ENDPOINT_GET_ALTCHA_CHALLENGE: ClassVar[str] = 'routes_core_contact.create_altcha_challenge'
|
||||
ENDPOINT_PAGE_ACCESSIBILITY_REPORT: ClassVar[str] = 'routes_legal.accessibility_report'
|
||||
ENDPOINT_PAGE_ACCESSIBILITY_STATEMENT: ClassVar[str] = 'routes_legal.accessibility_statement'
|
||||
ENDPOINT_PAGE_APPLY_FOUNDING_PARTNER_SUCCESS: ClassVar[str] = 'routes_core_apply_founding_partner.apply_founding_partner'
|
||||
ENDPOINT_PAGE_APPLY_FOUNDING_PARTNER: ClassVar[str] = 'routes_core_apply_founding_partner.apply_founding_partner'
|
||||
ENDPOINT_PAGE_APPLY_FOUNDING_PARTNER_SUCCESS: ClassVar[str] = 'routes_core_apply_founding_partner.apply_founding_partner_success'
|
||||
ENDPOINT_PAGE_CONTACT: ClassVar[str] = 'routes_core_contact.contact'
|
||||
ENDPOINT_PAGE_CONTACT_SUCCESS: ClassVar[str] = 'routes_core_contact.contact_success'
|
||||
ENDPOINT_PAGE_DATA_RETENTION_SCHEDULE: ClassVar[str] = 'routes_legal.retention_schedule'
|
||||
|
||||
@@ -1,194 +1,6 @@
|
||||
|
||||
USE demo;
|
||||
|
||||
SELECT CONCAT('WARNING: Table ', TABLE_SCHEMA, '.', TABLE_NAME, ' already exists.') AS msg_warning
|
||||
FROM INFORMATION_SCHEMA.TABLES
|
||||
WHERE
|
||||
TABLE_SCHEMA = 'demo'
|
||||
AND TABLE_NAME = 'PH_Apply_Founding_Partner_Form'
|
||||
;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS demo.PH_Apply_Founding_Partner_Form (
|
||||
id_apply_founding_partner_form INT NOT NULL AUTO_INCREMENT PRIMARY KEY
|
||||
, name_contact VARCHAR(255) NOT NULL
|
||||
, email VARCHAR(255) NOT NULL
|
||||
, phone_number VARCHAR(255) NOT NULL
|
||||
, name_company VARCHAR(255) NOT NULL
|
||||
, website VARCHAR(1000) NOT NULL
|
||||
, dog_count INT NOT NULL
|
||||
, id_years_of_experience INT NOT NULL
|
||||
, ids_speciality VARCHAR(255) NOT NULL
|
||||
, ids_existing_system VARCHAR(255) NOT NULL
|
||||
, id_existing_challenges INT NOT NULL
|
||||
, id_existing_time_sink_weekly INT NOT NULL
|
||||
, id_commitment_frequency INT NOT NULL
|
||||
-- , most_valuable_features TEXT NOT NULL
|
||||
, notes TEXT
|
||||
, active BIT NOT NULL DEFAULT 1
|
||||
, created_on DATETIME
|
||||
, id_user_created_by INT
|
||||
, CONSTRAINT FK_PH_Apply_Founding_Partner_Form_id_user_created_by
|
||||
FOREIGN KEY (id_user_created_by)
|
||||
REFERENCES demo.DOG_User(id_user)
|
||||
, id_change_set INT
|
||||
, CONSTRAINT FK_PH_Apply_Founding_Partner_Form_id_change_set
|
||||
FOREIGN KEY (id_change_set)
|
||||
REFERENCES demo.PH_Contact_Form_Change_Set(id_change_set)
|
||||
);
|
||||
|
||||
|
||||
USE demo;
|
||||
|
||||
SELECT CONCAT('WARNING: Table ', TABLE_SCHEMA, '.', TABLE_NAME, ' already exists.') AS msg_warning
|
||||
FROM INFORMATION_SCHEMA.TABLES
|
||||
WHERE
|
||||
TABLE_SCHEMA = 'demo'
|
||||
AND TABLE_NAME = 'PH_Apply_Founding_Partner_Form_Audit'
|
||||
;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS demo.PH_Apply_Founding_Partner_Form_Audit (
|
||||
id_audit INT NOT NULL AUTO_INCREMENT PRIMARY KEY
|
||||
, id_apply_founding_partner_form INT NOT NULL
|
||||
, CONSTRAINT FK_PH_AFP_Form_Audit_id_apply_founding_partner_form
|
||||
FOREIGN KEY (id_apply_founding_partner_form)
|
||||
REFERENCES demo.PH_Apply_Founding_Partner_Form(id_apply_founding_partner_form)
|
||||
, name_field VARCHAR(50) NOT NULL
|
||||
, value_prev TEXT
|
||||
, value_new TEXT
|
||||
, id_change_set INT NOT NULL
|
||||
, CONSTRAINT FK_PH_AFP_Form_Audit_id_change_set
|
||||
FOREIGN KEY (id_change_set)
|
||||
REFERENCES demo.PH_Contact_Form_Change_Set(id_change_set)
|
||||
);
|
||||
|
||||
|
||||
|
||||
USE demo;
|
||||
|
||||
SELECT CONCAT('WARNING: Table ', TABLE_SCHEMA, '.', TABLE_NAME, ' already exists.') AS msg_warning
|
||||
FROM INFORMATION_SCHEMA.TABLES
|
||||
WHERE
|
||||
TABLE_SCHEMA = 'demo'
|
||||
AND TABLE_NAME = 'PH_Apply_Founding_Partner_Form_Temp'
|
||||
;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS demo.PH_Apply_Founding_Partner_Form_Temp (
|
||||
id_temp INT NOT NULL AUTO_INCREMENT PRIMARY KEY
|
||||
, id_apply_founding_partner_form INT NOT NULL
|
||||
, name_contact VARCHAR(255)
|
||||
, email VARCHAR(255)
|
||||
, phone_number VARCHAR(255)
|
||||
, name_company VARCHAR(255)
|
||||
, website VARCHAR(1000)
|
||||
, dog_count INT
|
||||
, id_years_of_experience INT
|
||||
, ids_speciality VARCHAR(255)
|
||||
, ids_existing_system VARCHAR(255)
|
||||
, id_existing_challenges INT
|
||||
, id_existing_time_sink_weekly INT
|
||||
, id_commitment_frequency INT
|
||||
, most_valuable_features TEXT
|
||||
, notes TEXT
|
||||
, active BIT
|
||||
, guid BINARY(36)
|
||||
);
|
||||
|
||||
USE demo;
|
||||
|
||||
DROP TRIGGER IF EXISTS demo.before_insert_PH_Apply_Founding_Partner_Form;
|
||||
DROP TRIGGER IF EXISTS demo.before_update_PH_Apply_Founding_Partner_Form;
|
||||
|
||||
DELIMITER //
|
||||
CREATE TRIGGER demo.before_insert_PH_Apply_Founding_Partner_Form
|
||||
BEFORE INSERT ON demo.PH_Apply_Founding_Partner_Form
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
SET NEW.created_on := IFNULL(NEW.created_on, NOW());
|
||||
END //
|
||||
DELIMITER ;
|
||||
|
||||
DELIMITER //
|
||||
CREATE TRIGGER demo.before_update_PH_Apply_Founding_Partner_Form
|
||||
BEFORE UPDATE ON demo.PH_Apply_Founding_Partner_Form
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
IF OLD.id_change_set <=> NEW.id_change_set THEN
|
||||
SIGNAL SQLSTATE '45000'
|
||||
SET MESSAGE_TEXT = 'New Change Set ID must be provided.';
|
||||
END IF;
|
||||
|
||||
INSERT INTO demo.PH_Apply_Founding_Partner_Form_Audit (
|
||||
id_Apply_Founding_Partner_Form,
|
||||
name_field,
|
||||
value_prev,
|
||||
value_new,
|
||||
id_change_set
|
||||
)
|
||||
-- Changed name_contact
|
||||
SELECT NEW.id_Apply_Founding_Partner_Form, 'name_contact', OLD.name_contact, NEW.name_contact, NEW.id_change_set
|
||||
WHERE NOT OLD.name_contact <=> NEW.name_contact
|
||||
UNION
|
||||
-- Changed email
|
||||
SELECT NEW.id_Apply_Founding_Partner_Form, 'email', OLD.email, NEW.email, NEW.id_change_set
|
||||
WHERE NOT OLD.email <=> NEW.email
|
||||
UNION
|
||||
-- Changed phone_number
|
||||
SELECT NEW.id_Apply_Founding_Partner_Form, 'phone_number', OLD.phone_number, NEW.phone_number, NEW.id_change_set
|
||||
WHERE NOT OLD.phone_number <=> NEW.phone_number
|
||||
UNION
|
||||
-- Changed name_company
|
||||
SELECT NEW.id_Apply_Founding_Partner_Form, 'name_company', OLD.name_company, NEW.name_company, NEW.id_change_set
|
||||
WHERE NOT OLD.name_company <=> NEW.name_company
|
||||
UNION
|
||||
-- Changed website
|
||||
SELECT NEW.id_Apply_Founding_Partner_Form, 'website', OLD.website, NEW.website, NEW.id_change_set
|
||||
WHERE NOT OLD.website <=> NEW.website
|
||||
UNION
|
||||
-- Changed dog_count
|
||||
SELECT NEW.id_Apply_Founding_Partner_Form, 'dog_count', CONVERT(OLD.dog_count, CHAR), CONVERT(NEW.dog_count, CHAR), NEW.id_change_set
|
||||
WHERE NOT (OLD.dog_count <=> NEW.dog_count)
|
||||
UNION
|
||||
-- Changed id_years_of_experience
|
||||
SELECT NEW.id_Apply_Founding_Partner_Form, 'id_years_of_experience', CONVERT(OLD.id_years_of_experience, CHAR), CONVERT(NEW.id_years_of_experience, CHAR), NEW.id_change_set
|
||||
WHERE NOT (OLD.id_years_of_experience <=> NEW.id_years_of_experience)
|
||||
UNION
|
||||
-- Changed ids_speciality
|
||||
SELECT NEW.id_Apply_Founding_Partner_Form, 'ids_speciality', OLD.ids_speciality, NEW.ids_speciality, NEW.id_change_set
|
||||
WHERE NOT OLD.ids_speciality <=> NEW.ids_speciality
|
||||
UNION
|
||||
-- Changed ids_existing_system
|
||||
SELECT NEW.id_Apply_Founding_Partner_Form, 'ids_existing_system', OLD.ids_existing_system, NEW.ids_existing_system, NEW.id_change_set
|
||||
WHERE NOT OLD.ids_existing_system <=> NEW.ids_existing_system
|
||||
UNION
|
||||
-- Changed id_existing_challenges
|
||||
SELECT NEW.id_Apply_Founding_Partner_Form, 'id_existing_challenges', CONVERT(OLD.id_existing_challenges, CHAR), CONVERT(NEW.id_existing_challenges, CHAR), NEW.id_change_set
|
||||
WHERE NOT (OLD.id_existing_challenges <=> NEW.id_existing_challenges)
|
||||
UNION
|
||||
-- Changed id_existing_time_sink_weekly
|
||||
SELECT NEW.id_Apply_Founding_Partner_Form, 'id_existing_time_sink_weekly', CONVERT(OLD.id_existing_time_sink_weekly, CHAR), CONVERT(NEW.id_existing_time_sink_weekly, CHAR), NEW.id_change_set
|
||||
WHERE NOT (OLD.id_existing_time_sink_weekly <=> NEW.id_existing_time_sink_weekly)
|
||||
UNION
|
||||
-- Changed id_commitment_frequency
|
||||
SELECT NEW.id_Apply_Founding_Partner_Form, 'id_commitment_frequency', CONVERT(OLD.id_commitment_frequency, CHAR), CONVERT(NEW.id_commitment_frequency, CHAR), NEW.id_change_set
|
||||
WHERE NOT (OLD.id_commitment_frequency <=> NEW.id_commitment_frequency)
|
||||
UNION
|
||||
-- Changed most_valuable_features
|
||||
SELECT NEW.id_Apply_Founding_Partner_Form, 'most_valuable_features', OLD.most_valuable_features, NEW.most_valuable_features, NEW.id_change_set
|
||||
WHERE NOT OLD.most_valuable_features <=> NEW.most_valuable_features
|
||||
UNION
|
||||
-- Changed notes
|
||||
SELECT NEW.id_Apply_Founding_Partner_Form, 'notes', OLD.notes, NEW.notes, NEW.id_change_set
|
||||
WHERE NOT OLD.notes <=> NEW.notes
|
||||
UNION
|
||||
-- Changed active
|
||||
SELECT NEW.id_Apply_Founding_Partner_Form, 'active', CONVERT(CONVERT(OLD.active, SIGNED), CHAR), CONVERT(CONVERT(NEW.active, SIGNED), CHAR), NEW.id_change_set
|
||||
WHERE NOT (OLD.active <=> NEW.active)
|
||||
;
|
||||
END //
|
||||
DELIMITER ;
|
||||
|
||||
USE demo;
|
||||
|
||||
DROP PROCEDURE IF EXISTS demo.p_ph_save_apply_founding_partner_form;
|
||||
|
||||
DELIMITER //
|
||||
@@ -267,10 +79,10 @@ BEGIN
|
||||
, id_years_of_experience INT
|
||||
, ids_speciality VARCHAR(255)
|
||||
, ids_existing_system VARCHAR(255)
|
||||
, id_existing_challenges INT
|
||||
, existing_challenges TEXT
|
||||
, id_existing_time_sink_weekly INT
|
||||
, id_commitment_frequency INT
|
||||
, most_valuable_features TEXT
|
||||
-- , most_valuable_features TEXT
|
||||
, notes TEXT
|
||||
, active BIT NOT NULL
|
||||
, name_error VARCHAR(255)
|
||||
@@ -297,10 +109,10 @@ BEGIN
|
||||
, id_years_of_experience
|
||||
, ids_speciality
|
||||
, ids_existing_system
|
||||
, id_existing_challenges
|
||||
, existing_challenges
|
||||
, id_existing_time_sink_weekly
|
||||
, id_commitment_frequency
|
||||
, most_valuable_features
|
||||
-- , most_valuable_features
|
||||
, notes
|
||||
, active
|
||||
, is_new
|
||||
@@ -316,10 +128,10 @@ BEGIN
|
||||
, IFNULL(AFPF_T.id_years_of_experience, AFPF.id_years_of_experience) AS id_years_of_experience
|
||||
, IFNULL(AFPF_T.ids_speciality, AFPF.ids_speciality) AS ids_speciality
|
||||
, IFNULL(AFPF_T.ids_existing_system, AFPF.ids_existing_system) AS ids_existing_system
|
||||
, IFNULL(AFPF_T.id_existing_challenges, AFPF.id_existing_challenges) AS id_existing_challenges
|
||||
, IFNULL(AFPF_T.existing_challenges, AFPF.existing_challenges) AS existing_challenges
|
||||
, IFNULL(AFPF_T.id_existing_time_sink_weekly, AFPF.id_existing_time_sink_weekly) AS id_existing_time_sink_weekly
|
||||
, IFNULL(AFPF_T.id_commitment_frequency, AFPF.id_commitment_frequency) AS id_commitment_frequency
|
||||
, IFNULL(AFPF_T.most_valuable_features, AFPF.most_valuable_features) AS most_valuable_features
|
||||
-- , IFNULL(AFPF_T.most_valuable_features, AFPF.most_valuable_features) AS most_valuable_features
|
||||
, IFNULL(AFPF_T.notes, AFPF.notes) AS notes
|
||||
, COALESCE(AFPF_T.active, AFPF.active, 1) AS active
|
||||
, CASE WHEN IFNULL(AFPF_T.id_apply_founding_partner_form, 0) < 1 THEN 1 ELSE 0 END AS is_new
|
||||
@@ -364,6 +176,7 @@ BEGIN
|
||||
WHERE ISNULL(t_AFPF.email)
|
||||
;
|
||||
END IF;
|
||||
/*
|
||||
-- phone_number
|
||||
IF EXISTS (SELECT * FROM tmp_Apply_Founding_Partner_Form t_AFPF WHERE ISNULL(t_AFPF.phone_number) LIMIT 1) THEN
|
||||
INSERT INTO tmp_Msg_Error (
|
||||
@@ -379,6 +192,7 @@ BEGIN
|
||||
WHERE ISNULL(t_AFPF.phone_number)
|
||||
;
|
||||
END IF;
|
||||
*/
|
||||
-- name_company
|
||||
IF EXISTS (SELECT * FROM tmp_Apply_Founding_Partner_Form t_AFPF WHERE ISNULL(t_AFPF.name_company) LIMIT 1) THEN
|
||||
INSERT INTO tmp_Msg_Error (
|
||||
@@ -394,6 +208,7 @@ BEGIN
|
||||
WHERE ISNULL(t_AFPF.name)
|
||||
;
|
||||
END IF;
|
||||
/*
|
||||
-- website
|
||||
IF EXISTS (SELECT * FROM tmp_Apply_Founding_Partner_Form t_AFPF WHERE ISNULL(t_AFPF.website) LIMIT 1) THEN
|
||||
INSERT INTO tmp_Msg_Error (
|
||||
@@ -409,6 +224,7 @@ BEGIN
|
||||
WHERE ISNULL(t_AFPF.website)
|
||||
;
|
||||
END IF;
|
||||
*/
|
||||
-- dog_count
|
||||
IF EXISTS (SELECT * FROM tmp_Apply_Founding_Partner_Form t_AFPF WHERE ISNULL(t_AFPF.dog_count) LIMIT 1) THEN
|
||||
INSERT INTO tmp_Msg_Error (
|
||||
@@ -469,8 +285,8 @@ BEGIN
|
||||
WHERE ISNULL(t_AFPF.ids_existing_system)
|
||||
;
|
||||
END IF;
|
||||
-- id_existing_challenges
|
||||
IF EXISTS (SELECT * FROM tmp_Apply_Founding_Partner_Form t_AFPF WHERE ISNULL(t_AFPF.id_existing_challenges) LIMIT 1) THEN
|
||||
-- existing_challenges
|
||||
IF EXISTS (SELECT * FROM tmp_Apply_Founding_Partner_Form t_AFPF WHERE ISNULL(t_AFPF.existing_challenges) LIMIT 1) THEN
|
||||
INSERT INTO tmp_Msg_Error (
|
||||
id_type
|
||||
, code
|
||||
@@ -479,9 +295,9 @@ BEGIN
|
||||
SELECT
|
||||
v_id_type_error_bad_data
|
||||
, v_code_type_error_bad_data
|
||||
, CONCAT('The following Apply Founding Partner Form(s) do not have a Id_existing_challenges: ', GROUP_CONCAT(t_AFPF.name_error SEPARATOR ', ')) AS msg
|
||||
, CONCAT('The following Apply Founding Partner Form(s) do not have a existing_challenges: ', GROUP_CONCAT(t_AFPF.name_error SEPARATOR ', ')) AS msg
|
||||
FROM tmp_Apply_Founding_Partner_Form t_AFPF
|
||||
WHERE ISNULL(t_AFPF.id_existing_challenges)
|
||||
WHERE ISNULL(t_AFPF.existing_challenges)
|
||||
;
|
||||
END IF;
|
||||
-- id_existing_time_sink_weekly
|
||||
@@ -514,6 +330,7 @@ BEGIN
|
||||
WHERE ISNULL(t_AFPF.id_commitment_frequency)
|
||||
;
|
||||
END IF;
|
||||
/*
|
||||
-- most_valuable_features
|
||||
IF EXISTS (SELECT * FROM tmp_Apply_Founding_Partner_Form t_AFPF WHERE ISNULL(t_AFPF.most_valuable_features) LIMIT 1) THEN
|
||||
INSERT INTO tmp_Msg_Error (
|
||||
@@ -529,6 +346,7 @@ BEGIN
|
||||
WHERE ISNULL(t_AFPF.most_valuable_features)
|
||||
;
|
||||
END IF;
|
||||
*/
|
||||
|
||||
-- Permissions
|
||||
IF a_debug = 1 THEN
|
||||
@@ -705,10 +523,10 @@ BEGIN
|
||||
, AFPF.id_years_of_experience = t_AFPF.id_years_of_experience
|
||||
, AFPF.ids_speciality = t_AFPF.ids_speciality
|
||||
, AFPF.ids_existing_system = t_AFPF.ids_existing_system
|
||||
, AFPF.id_existing_challenges = t_AFPF.id_existing_challenges
|
||||
, AFPF.existing_challenges = t_AFPF.existing_challenges
|
||||
, AFPF.id_existing_time_sink_weekly = t_AFPF.id_existing_time_sink_weekly
|
||||
, AFPF.id_commitment_frequency = t_AFPF.id_commitment_frequency
|
||||
, AFPF.most_valuable_features = t_AFPF.most_valuable_features
|
||||
-- , AFPF.most_valuable_features = t_AFPF.most_valuable_features
|
||||
, AFPF.notes = t_AFPF.notes
|
||||
, AFPF.active = t_AFPF.active
|
||||
, AFPF.id_change_set = v_id_change_set
|
||||
@@ -724,10 +542,10 @@ BEGIN
|
||||
, id_years_of_experience
|
||||
, ids_speciality
|
||||
, ids_existing_system
|
||||
, id_existing_challenges
|
||||
, existing_challenges
|
||||
, id_existing_time_sink_weekly
|
||||
, id_commitment_frequency
|
||||
, most_valuable_features
|
||||
-- , most_valuable_features
|
||||
, notes
|
||||
, active
|
||||
, id_user_created_by
|
||||
@@ -743,10 +561,10 @@ BEGIN
|
||||
, t_AFPF.id_years_of_experience
|
||||
, t_AFPF.ids_speciality
|
||||
, t_AFPF.ids_existing_system
|
||||
, t_AFPF.id_existing_challenges
|
||||
, t_AFPF.existing_challenges
|
||||
, t_AFPF.id_existing_time_sink_weekly
|
||||
, t_AFPF.id_commitment_frequency
|
||||
, t_AFPF.most_valuable_features
|
||||
-- , t_AFPF.most_valuable_features
|
||||
, t_AFPF.notes
|
||||
, t_AFPF.active
|
||||
, a_id_user
|
||||
@@ -788,12 +606,51 @@ END //
|
||||
DELIMITER ;
|
||||
|
||||
/*
|
||||
select
|
||||
*
|
||||
-- COUNT(*)
|
||||
-- delete
|
||||
from demo.PH_Apply_Founding_Partner_Form_Temp
|
||||
;
|
||||
|
||||
SELECT *
|
||||
FROM demo.PH_Apply_Founding_Partner_Form;
|
||||
SELECT *
|
||||
FROM demo.PH_Apply_Founding_Partner_Form_Temp;
|
||||
|
||||
|
||||
|
||||
INSERT INTO demo.PH_Apply_Founding_Partner_Form_Temp (
|
||||
id_apply_founding_partner_form
|
||||
,name_contact
|
||||
, email,
|
||||
phone_number
|
||||
,name_company
|
||||
,website
|
||||
,dog_count
|
||||
,id_years_of_experience
|
||||
,ids_speciality
|
||||
,ids_existing_system
|
||||
,existing_challenges
|
||||
,id_existing_time_sink_weekly
|
||||
,id_commitment_frequency
|
||||
,notes
|
||||
,active
|
||||
,guid
|
||||
)
|
||||
SELECT
|
||||
id_apply_founding_partner_form
|
||||
,name_contact
|
||||
, email,
|
||||
phone_number
|
||||
,name_company
|
||||
,website
|
||||
,dog_count
|
||||
,id_years_of_experience
|
||||
,ids_speciality
|
||||
,ids_existing_system
|
||||
,existing_challenges
|
||||
,id_existing_time_sink_weekly
|
||||
,id_commitment_frequency
|
||||
,notes
|
||||
,active
|
||||
, '782c29e0-72e6-41e2-b543-4b0454041a57'
|
||||
FROM demo.PH_Apply_Founding_Partner_Form_Temp
|
||||
WHERE guid = '782c29e0-72e6-41e2-b543-4b0454041a56';
|
||||
|
||||
|
||||
CALL demo.p_ph_save_apply_founding_partner_form (
|
||||
@@ -803,11 +660,70 @@ CALL demo.p_ph_save_apply_founding_partner_form (
|
||||
, 1
|
||||
);
|
||||
|
||||
select
|
||||
*
|
||||
-- COUNT(*)
|
||||
-- delete
|
||||
from demo.PH_Apply_Founding_Partner_Form_Temp
|
||||
;
|
||||
SELECT *
|
||||
FROM demo.PH_Apply_Founding_Partner_Form;
|
||||
SELECT *
|
||||
FROM demo.PH_Apply_Founding_Partner_Form_Temp;
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
SELECT *
|
||||
FROM demo.PH_Apply_Founding_Partner_Form;
|
||||
SELECT *
|
||||
FROM demo.PH_Apply_Founding_Partner_Form_Temp;
|
||||
|
||||
|
||||
|
||||
INSERT INTO demo.PH_Apply_Founding_Partner_Form_Temp (
|
||||
id_apply_founding_partner_form
|
||||
,name_contact
|
||||
, email,
|
||||
phone_number
|
||||
,name_company
|
||||
,website
|
||||
,dog_count
|
||||
,id_years_of_experience
|
||||
,ids_speciality
|
||||
,ids_existing_system
|
||||
,existing_challenges
|
||||
,id_existing_time_sink_weekly
|
||||
,id_commitment_frequency
|
||||
,notes
|
||||
,active
|
||||
,guid
|
||||
)
|
||||
SELECT
|
||||
id_apply_founding_partner_form
|
||||
,name_contact
|
||||
, email,
|
||||
phone_number
|
||||
,name_company
|
||||
,website
|
||||
,dog_count
|
||||
,id_years_of_experience
|
||||
,ids_speciality
|
||||
,ids_existing_system
|
||||
,existing_challenges
|
||||
,id_existing_time_sink_weekly
|
||||
,id_commitment_frequency
|
||||
,notes
|
||||
,active
|
||||
, '782c29e0-72e6-41e2-b543-4b0454041a57'
|
||||
FROM demo.PH_Apply_Founding_Partner_Form_Temp
|
||||
WHERE guid = '782c29e0-72e6-41e2-b543-4b0454041a56';
|
||||
|
||||
|
||||
CALL demo.p_ph_save_apply_founding_partner_form (
|
||||
'nipples'
|
||||
, (SELECT GUID FROM demo.PH_Apply_Founding_Partner_Form_Temp ORDER BY id_temp DESC LIMIT 1)
|
||||
, 1
|
||||
, 1
|
||||
);
|
||||
|
||||
SELECT *
|
||||
FROM demo.PH_Apply_Founding_Partner_Form;
|
||||
SELECT *
|
||||
FROM demo.PH_Apply_Founding_Partner_Form_Temp;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ CREATE TABLE IF NOT EXISTS fetchmetrics.PH_Apply_Founding_Partner_Form (
|
||||
, id_years_of_experience INT NOT NULL
|
||||
, ids_speciality VARCHAR(255) NOT NULL
|
||||
, ids_existing_system VARCHAR(255) NOT NULL
|
||||
, id_existing_challenges INT NOT NULL
|
||||
, existing_challenges TEXT NOT NULL
|
||||
, id_existing_time_sink_weekly INT NOT NULL
|
||||
, id_commitment_frequency INT NOT NULL
|
||||
-- , most_valuable_features TEXT NOT NULL
|
||||
|
||||
@@ -22,7 +22,7 @@ CREATE TABLE IF NOT EXISTS fetchmetrics.PH_Apply_Founding_Partner_Form_Temp (
|
||||
, id_years_of_experience INT
|
||||
, ids_speciality VARCHAR(255)
|
||||
, ids_existing_system VARCHAR(255)
|
||||
, id_existing_challenges INT
|
||||
, existing_challenges TEXT
|
||||
, id_existing_time_sink_weekly INT
|
||||
, id_commitment_frequency INT
|
||||
-- , most_valuable_features TEXT
|
||||
|
||||
@@ -66,9 +66,9 @@ BEGIN
|
||||
SELECT NEW.id_Apply_Founding_Partner_Form, 'ids_existing_system', OLD.ids_existing_system, NEW.ids_existing_system, NEW.id_change_set
|
||||
WHERE NOT OLD.ids_existing_system <=> NEW.ids_existing_system
|
||||
UNION
|
||||
-- Changed id_existing_challenges
|
||||
SELECT NEW.id_Apply_Founding_Partner_Form, 'id_existing_challenges', CONVERT(OLD.id_existing_challenges, CHAR), CONVERT(NEW.id_existing_challenges, CHAR), NEW.id_change_set
|
||||
WHERE NOT (OLD.id_existing_challenges <=> NEW.id_existing_challenges)
|
||||
-- Changed existing_challenges
|
||||
SELECT NEW.id_Apply_Founding_Partner_Form, 'existing_challenges', CONVERT(OLD.existing_challenges, CHAR), CONVERT(NEW.existing_challenges, CHAR), NEW.id_change_set
|
||||
WHERE NOT (OLD.existing_challenges <=> NEW.existing_challenges)
|
||||
UNION
|
||||
-- Changed id_existing_time_sink_weekly
|
||||
SELECT NEW.id_Apply_Founding_Partner_Form, 'id_existing_time_sink_weekly', CONVERT(OLD.id_existing_time_sink_weekly, CHAR), CONVERT(NEW.id_existing_time_sink_weekly, CHAR), NEW.id_change_set
|
||||
|
||||
@@ -79,7 +79,7 @@ BEGIN
|
||||
, id_years_of_experience INT
|
||||
, ids_speciality VARCHAR(255)
|
||||
, ids_existing_system VARCHAR(255)
|
||||
, id_existing_challenges INT
|
||||
, existing_challenges TEXT
|
||||
, id_existing_time_sink_weekly INT
|
||||
, id_commitment_frequency INT
|
||||
-- , most_valuable_features TEXT
|
||||
@@ -109,7 +109,7 @@ BEGIN
|
||||
, id_years_of_experience
|
||||
, ids_speciality
|
||||
, ids_existing_system
|
||||
, id_existing_challenges
|
||||
, existing_challenges
|
||||
, id_existing_time_sink_weekly
|
||||
, id_commitment_frequency
|
||||
-- , most_valuable_features
|
||||
@@ -128,7 +128,7 @@ BEGIN
|
||||
, IFNULL(AFPF_T.id_years_of_experience, AFPF.id_years_of_experience) AS id_years_of_experience
|
||||
, IFNULL(AFPF_T.ids_speciality, AFPF.ids_speciality) AS ids_speciality
|
||||
, IFNULL(AFPF_T.ids_existing_system, AFPF.ids_existing_system) AS ids_existing_system
|
||||
, IFNULL(AFPF_T.id_existing_challenges, AFPF.id_existing_challenges) AS id_existing_challenges
|
||||
, IFNULL(AFPF_T.existing_challenges, AFPF.existing_challenges) AS existing_challenges
|
||||
, IFNULL(AFPF_T.id_existing_time_sink_weekly, AFPF.id_existing_time_sink_weekly) AS id_existing_time_sink_weekly
|
||||
, IFNULL(AFPF_T.id_commitment_frequency, AFPF.id_commitment_frequency) AS id_commitment_frequency
|
||||
-- , IFNULL(AFPF_T.most_valuable_features, AFPF.most_valuable_features) AS most_valuable_features
|
||||
@@ -141,7 +141,7 @@ BEGIN
|
||||
;
|
||||
|
||||
UPDATE tmp_Apply_Founding_Partner_Form t_AFPF
|
||||
SET name_error = COALESCE(t_AFPF.email, t_AFPF.name_company, t_AFPF.name_contact, t_AFPF.message, '(No Apply Founding Partner Form)')
|
||||
SET name_error = COALESCE(t_AFPF.email, t_AFPF.name_company, t_AFPF.name_contact, t_AFPF.notes, '(No Apply Founding Partner Form)')
|
||||
;
|
||||
|
||||
-- Validation
|
||||
@@ -285,8 +285,8 @@ BEGIN
|
||||
WHERE ISNULL(t_AFPF.ids_existing_system)
|
||||
;
|
||||
END IF;
|
||||
-- id_existing_challenges
|
||||
IF EXISTS (SELECT * FROM tmp_Apply_Founding_Partner_Form t_AFPF WHERE ISNULL(t_AFPF.id_existing_challenges) LIMIT 1) THEN
|
||||
-- existing_challenges
|
||||
IF EXISTS (SELECT * FROM tmp_Apply_Founding_Partner_Form t_AFPF WHERE ISNULL(t_AFPF.existing_challenges) LIMIT 1) THEN
|
||||
INSERT INTO tmp_Msg_Error (
|
||||
id_type
|
||||
, code
|
||||
@@ -295,9 +295,9 @@ BEGIN
|
||||
SELECT
|
||||
v_id_type_error_bad_data
|
||||
, v_code_type_error_bad_data
|
||||
, CONCAT('The following Apply Founding Partner Form(s) do not have a Id_existing_challenges: ', GROUP_CONCAT(t_AFPF.name_error SEPARATOR ', ')) AS msg
|
||||
, CONCAT('The following Apply Founding Partner Form(s) do not have a existing_challenges: ', GROUP_CONCAT(t_AFPF.name_error SEPARATOR ', ')) AS msg
|
||||
FROM tmp_Apply_Founding_Partner_Form t_AFPF
|
||||
WHERE ISNULL(t_AFPF.id_existing_challenges)
|
||||
WHERE ISNULL(t_AFPF.existing_challenges)
|
||||
;
|
||||
END IF;
|
||||
-- id_existing_time_sink_weekly
|
||||
@@ -523,7 +523,7 @@ BEGIN
|
||||
, AFPF.id_years_of_experience = t_AFPF.id_years_of_experience
|
||||
, AFPF.ids_speciality = t_AFPF.ids_speciality
|
||||
, AFPF.ids_existing_system = t_AFPF.ids_existing_system
|
||||
, AFPF.id_existing_challenges = t_AFPF.id_existing_challenges
|
||||
, AFPF.existing_challenges = t_AFPF.existing_challenges
|
||||
, AFPF.id_existing_time_sink_weekly = t_AFPF.id_existing_time_sink_weekly
|
||||
, AFPF.id_commitment_frequency = t_AFPF.id_commitment_frequency
|
||||
-- , AFPF.most_valuable_features = t_AFPF.most_valuable_features
|
||||
@@ -542,7 +542,7 @@ BEGIN
|
||||
, id_years_of_experience
|
||||
, ids_speciality
|
||||
, ids_existing_system
|
||||
, id_existing_challenges
|
||||
, existing_challenges
|
||||
, id_existing_time_sink_weekly
|
||||
, id_commitment_frequency
|
||||
-- , most_valuable_features
|
||||
@@ -561,7 +561,7 @@ BEGIN
|
||||
, t_AFPF.id_years_of_experience
|
||||
, t_AFPF.ids_speciality
|
||||
, t_AFPF.ids_existing_system
|
||||
, t_AFPF.id_existing_challenges
|
||||
, t_AFPF.existing_challenges
|
||||
, t_AFPF.id_existing_time_sink_weekly
|
||||
, t_AFPF.id_commitment_frequency
|
||||
-- , t_AFPF.most_valuable_features
|
||||
@@ -606,12 +606,51 @@ END //
|
||||
DELIMITER ;
|
||||
|
||||
/*
|
||||
select
|
||||
*
|
||||
-- COUNT(*)
|
||||
-- delete
|
||||
from fetchmetrics.PH_Apply_Founding_Partner_Form_Temp
|
||||
;
|
||||
|
||||
SELECT *
|
||||
FROM demo.PH_Apply_Founding_Partner_Form;
|
||||
SELECT *
|
||||
FROM demo.PH_Apply_Founding_Partner_Form_Temp;
|
||||
|
||||
|
||||
|
||||
INSERT INTO fetchmetrics.PH_Apply_Founding_Partner_Form_Temp (
|
||||
id_apply_founding_partner_form
|
||||
,name_contact
|
||||
, email,
|
||||
phone_number
|
||||
,name_company
|
||||
,website
|
||||
,dog_count
|
||||
,id_years_of_experience
|
||||
,ids_speciality
|
||||
,ids_existing_system
|
||||
,existing_challenges
|
||||
,id_existing_time_sink_weekly
|
||||
,id_commitment_frequency
|
||||
,notes
|
||||
,active
|
||||
,guid
|
||||
)
|
||||
SELECT
|
||||
id_apply_founding_partner_form
|
||||
,name_contact
|
||||
, email,
|
||||
phone_number
|
||||
,name_company
|
||||
,website
|
||||
,dog_count
|
||||
,id_years_of_experience
|
||||
,ids_speciality
|
||||
,ids_existing_system
|
||||
,existing_challenges
|
||||
,id_existing_time_sink_weekly
|
||||
,id_commitment_frequency
|
||||
,notes
|
||||
,active
|
||||
, '782c29e0-72e6-41e2-b543-4b0454041a57'
|
||||
FROM fetchmetrics.PH_Apply_Founding_Partner_Form_Temp
|
||||
WHERE guid = '782c29e0-72e6-41e2-b543-4b0454041a56';
|
||||
|
||||
|
||||
CALL fetchmetrics.p_ph_save_apply_founding_partner_form (
|
||||
@@ -621,11 +660,11 @@ CALL fetchmetrics.p_ph_save_apply_founding_partner_form (
|
||||
, 1
|
||||
);
|
||||
|
||||
select
|
||||
*
|
||||
-- COUNT(*)
|
||||
-- delete
|
||||
from fetchmetrics.PH_Apply_Founding_Partner_Form_Temp
|
||||
;
|
||||
SELECT *
|
||||
FROM demo.PH_Apply_Founding_Partner_Form;
|
||||
SELECT *
|
||||
FROM demo.PH_Apply_Founding_Partner_Form_Temp;
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
max-width: 40vw;
|
||||
}
|
||||
|
||||
#id_speciality li,
|
||||
#id_existing_system li {
|
||||
#ids_speciality li,
|
||||
#ids_existing_system li {
|
||||
list-style: none;
|
||||
}
|
||||
/*
|
||||
@@ -27,12 +27,4 @@
|
||||
#id_existing_system li::marker {
|
||||
display: none;
|
||||
}
|
||||
*/
|
||||
|
||||
.container.row.captcha > div {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
input[type="submit"] {
|
||||
margin: 0 auto;
|
||||
}
|
||||
*/
|
||||
@@ -49,6 +49,10 @@ textarea.form-input {
|
||||
margin-bottom: 1.25rem;
|
||||
}
|
||||
|
||||
|
||||
.container.row.captcha > div {
|
||||
margin: 0 auto;
|
||||
}
|
||||
.container.captcha > div:first-child > label:first-child {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
@@ -81,8 +85,10 @@ altcha-widget > div:first-child,
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
|
||||
input[type="submit"] {
|
||||
margin-left: 40%;
|
||||
margin: 0 auto;
|
||||
padding: 0.75rem 1.5rem;
|
||||
background: #2563eb;
|
||||
color: white;
|
||||
|
||||
@@ -127,6 +127,10 @@ textarea.form-input {
|
||||
margin-bottom: 1.25rem;
|
||||
}
|
||||
|
||||
|
||||
.container.row.captcha > div {
|
||||
margin: 0 auto;
|
||||
}
|
||||
.container.captcha > div:first-child > label:first-child {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
@@ -159,8 +163,10 @@ altcha-widget > div:first-child,
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
|
||||
input[type="submit"] {
|
||||
margin-left: 40%;
|
||||
margin: 0 auto;
|
||||
padding: 0.75rem 1.5rem;
|
||||
background: #2563eb;
|
||||
color: white;
|
||||
@@ -235,8 +241,8 @@ input[type="submit"]:hover {
|
||||
max-width: 40vw;
|
||||
}
|
||||
|
||||
#id_speciality li,
|
||||
#id_existing_system li {
|
||||
#ids_speciality li,
|
||||
#ids_existing_system li {
|
||||
list-style: none;
|
||||
}
|
||||
/*
|
||||
@@ -246,12 +252,4 @@ input[type="submit"]:hover {
|
||||
}
|
||||
*/
|
||||
|
||||
.container.row.captcha > div {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
input[type="submit"] {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=core_apply_founding_partner.bundle.css.map*/
|
||||
File diff suppressed because one or more lines are too long
6
static/dist/css/core_contact.bundle.css
vendored
6
static/dist/css/core_contact.bundle.css
vendored
@@ -127,6 +127,10 @@ textarea.form-input {
|
||||
margin-bottom: 1.25rem;
|
||||
}
|
||||
|
||||
|
||||
.container.row.captcha > div {
|
||||
margin: 0 auto;
|
||||
}
|
||||
.container.captcha > div:first-child > label:first-child {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
@@ -159,8 +163,10 @@ altcha-widget > div:first-child,
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
|
||||
input[type="submit"] {
|
||||
margin-left: 40%;
|
||||
margin: 0 auto;
|
||||
padding: 0.75rem 1.5rem;
|
||||
background: #2563eb;
|
||||
color: white;
|
||||
|
||||
2
static/dist/css/core_contact.bundle.css.map
vendored
2
static/dist/css/core_contact.bundle.css.map
vendored
File diff suppressed because one or more lines are too long
@@ -74,16 +74,16 @@
|
||||
</div>
|
||||
|
||||
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
|
||||
<label class="{{ model.FLAG_LABEL_QUESTION }}" for="{{ form.id_speciality.id }}">{{ form.id_speciality.label.text }} *</label>
|
||||
<label class="{{ model.FLAG_LABEL_QUESTION }}" for="{{ form.ids_speciality.id }}">{{ form.ids_speciality.label.text }} *</label>
|
||||
<div class="{{ model.FLAG_CONTAINER_INPUT }}">
|
||||
{{ form.id_speciality(class="form-input", required=True) }}
|
||||
{{ form.ids_speciality(class="form-input", required=True) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
|
||||
<label class="{{ model.FLAG_LABEL_QUESTION }}" for="{{ form.id_existing_system.id }}">{{ form.id_existing_system.label.text }} *</label>
|
||||
<label class="{{ model.FLAG_LABEL_QUESTION }}" for="{{ form.ids_existing_system.id }}">{{ form.ids_existing_system.label.text }} *</label>
|
||||
<div class="{{ model.FLAG_CONTAINER_INPUT }}">
|
||||
{{ form.id_existing_system(class="form-input", required=True) }}
|
||||
{{ form.ids_existing_system(class="form-input", required=True) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -264,7 +264,7 @@
|
||||
<p><strong>Limited to 20 trainers</strong> - We want to provide excellent support and meaningful collaboration with each Founding Partner.</p>
|
||||
</div>
|
||||
|
||||
<a href="{{ model.HASH_PAGE_CONTACT }}" class="{{ model.FLAG_BUTTON }} {{ model.FLAG_BUTTON_LIGHT }}">Apply for Founding Partner Program</a>
|
||||
<a href="{{ model.HASH_PAGE_APPLY_FOUNDING_PARTNER }}" class="{{ model.FLAG_BUTTON }} {{ model.FLAG_BUTTON_LIGHT }}">Apply for Founding Partner Program</a>
|
||||
<a href="{{ model.HASH_PAGE_CONTACT }}" class="{{ model.FLAG_BUTTON }} {{ model.FLAG_BUTTON_LIGHT }}">Book a Demo Call</a>
|
||||
|
||||
<p>Questions? Email us at {{ model.get_mail_contact_public() }}</p>
|
||||
|
||||
Reference in New Issue
Block a user