Compare commits

..

5 Commits

Author SHA1 Message Date
modeht b228889285 Merge branch 'master' of http://104.225.217.239:3000/manaknight/node_task_2 2022-04-11 07:01:35 +02:00
modeht a167c51c71 removeing unnecessary comment 2022-04-11 07:01:28 +02:00
ryanwong c995670088 fixes 2022-04-11 00:53:39 -04:00
ryanwong 92f5ec0dbc commit 2022-04-11 00:45:11 -04:00
modeht cc32e7dca7 .env file 2022-04-11 06:38:35 +02:00
6 changed files with 144 additions and 93 deletions
+83
View File
@@ -0,0 +1,83 @@
VERSION=2.0.0
MODE=development
NODE_ENV=development
ENV=development
PLATFORM_NAME=Test
MAIL_FROM=
MAIL_DOMAIN=
MAILGUN_KEY=
TWILIO_PHONE_NUMBER=
TWILIO_SID=
TWILIO_TOKEN=
COPYRIGHT=Copyright © 2021 MKD. All rights reserved.
POWERED_BY=Powered By <a href="MDK.com" target="__blank">MKD.ca</a>
NODE_PORT=3001
GRAPHQL_PORT=9001
EMAIL_SMTP_PROTOCOL=smtp
EMAIL_SMTP_SMTP_HOST=smtp.mailtrap.io
EMAIL_SMTP_SMTP_PORT=2525
EMAIL_SMTP_SMTP_USER=7e8f296dd6a493
EMAIL_SMTP_SMTP_PASS=ac4e30d39321bc
EMAIL_SMTP_CRLF=\r\n
EMAIL_SMTP_NEWLINE=\r\n
EMAIL_SMTP_MAILTYPE=html
EMAIL_SMTP_CHARSET=utf-8
CSRF_EXCLUDE_URIS=["v1/api.*+","member/login","member/forgot","member/reset/.*","member/register","admin/login","admin/forgot","admin/reset/.*","admin/register","sale/login","sale/forgot","sale/reset/.*","sale/register"]
ENCRYPTION_KEY=1n4uUX6d1Us3quFXKA7ZmqFIaQVC5MtgXlV9ho8F
SUBCLASS_PREFIX=Manaknight_
MIGRATION_NUMBER=9377770345344
LANGUAGE=english
BASE_URL=http://localhost:3001
SITE_TITLE=Manaknight Saas
COMPANY=MKd
IMAGE_UPLOAD=local
FILE_UPLOAD=local
UPLOAD_BYTE_SIZE_LIMIT=1000000000
SESSION_SECRET=ACbe28dfeaeb2635aac92c05660664588b
SHOPIFY_SITE=skincare.myshopify.com
SHOPIFY_API_KEY=22a
SHOPIFY_API_PASSWORD=shppa
SHOPIFY_SECRET_KEY=shpss
SHOPIFY_SCOPES=write_script_tags,read_script_tags,read_content,write_content,read_products
API_URL=http://localhost:3001
DYNAMIC_CONFIG_JWT_KEY=544e
DYNAMIC_CONFIG_PERMISSION_ENCRYPT_KEY=vOV
DYNAMIC_CONFIG_JWT_EXPIRE_AT=3600
DYNAMIC_CONFIG_JWT_REFRESH_EXPIRE_AT=7200
DYNAMIC_CONFIG_GOOGLE_CLIENT_ID=466040660536-l5pq116jdp6cs3b58a7k4t52f5lpa5se.apps.googleusercontent.com
DYNAMIC_CONFIG_GOOGLE_CLIENT_SECRET=W_bYoRhly8pf0XJ1IUsk8wC_
DYNAMIC_CONFIG_GOOGLE_REDIRECT_URI=http://localhost:3001/google
DYNAMIC_CONFIG_APPLICATION_NAME=
DYNAMIC_CONFIG_FACEBOOK_CLIENT_ID=906124643482094
DYNAMIC_CONFIG_FACEBOOK_CLIENT_SECRET=ee289adf5399aaa48c2bbfd33b83c301
DYNAMIC_CONFIG_FACEBOOK_REDIRECT_URI=http://localhost:3001/facebook
DYNAMIC_CONFIG_FACEBOOK_OATH_URI=https://www.facebook.com/v3.0/dialog/oauth
DYNAMIC_CONFIG_AWS_VERSION=latest
DYNAMIC_CONFIG_AWS_REGION=us-east-2
DYNAMIC_CONFIG_AWS_KEY=AKIAJD27VH2ITMIWT4IQ
DYNAMIC_CONFIG_AWS_SECRET=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
DYNAMIC_CONFIG_AWS_BUCKET=com.konfor.images
DB_ADAPTER=mysql
DB_PORT=3306
DB_DSN=
DB_HOSTNAME=localhost
DB_USERNAME=root
DB_PASSWORD=
DB_DATABASE=mkd
DB_DBDRIVER=mysqli
DB_DBPREFIX=
DB_PCONNECT=false
DB_DB_DEBUG=false
DB_CACHE_ON=false
DB_CACHEDIR=
DB_CHAR_SET=utf8
DB_DBCOLLAT=utf8_general_ci
DB_SWAP_PRE=
DB_ENCRYPT=false
DB_COMPRESS=false
DB_STRICTON=false
DB_FAILOVER=
DB_SAVE_QUERIES=true
GEO_LOCATION_API_KEY=48727c73b1a849a982977b5e66da93ea
OPEN_WEATHER_API_KEY=8c31f77acf24b082c85de7d0d87e9149
GOOGLE_PLACES_API_KEY=AIzaSyCB1IqtqjrBdleDg4zQFBY1OBS7qzpJFt0
+1 -3
View File
@@ -13,7 +13,7 @@ lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
.DS_Store
# Runtime data
pids
*.pid
@@ -74,8 +74,6 @@ typings/
.yarn-integrity
# dotenv environment variables file
.env
#.env.test
# parcel-bundler cache (https://parceljs.org/)
.cache
+10 -2
View File
@@ -10,6 +10,14 @@
- /views/admin
- /views/partials/admin/nav.eta
Admin login
localhost:3001/admin/login
email: admin@manaknight.com
password: a123456
### Quiz 1
Response page of question What would you like to be called?.<br>
@@ -19,7 +27,7 @@ You can change the html or the css to do this task.<br>
### Quiz 2
Each respone page should be closed after a set amount of time<br>
Each response page should be closed after a set amount of time<br>
The setTimeout of the response page of previous quiz is not working<br>
Figure out where this is handled and make a setTimeout to close the response and move on to the next question using the time stored in variable called "closeResponseTimeoutCounter"<br>
@@ -33,7 +41,7 @@ Then add an option at the end of all options that says None of the above and onc
### Quiz 4
implement a function that is called checkAllergie()<br>
pseduo steps of the function
pseudo steps of the function
- find a way to read the dataset values on the html button element that generated the click
- each button should have data-val that contains the label of the option
@@ -13,12 +13,12 @@
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-- Dumping database structure for created_by
DROP DATABASE IF EXISTS `created_by`;
CREATE DATABASE IF NOT EXISTS `created_by` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE `created_by`;
-- Dumping database structure for mkd
DROP DATABASE IF EXISTS `mkd`;
CREATE DATABASE IF NOT EXISTS `mkd` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE `mkd`;
-- Dumping structure for table created_by.active
-- Dumping structure for table mkd.active
DROP TABLE IF EXISTS `active`;
CREATE TABLE IF NOT EXISTS `active` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -31,7 +31,7 @@ CREATE TABLE IF NOT EXISTS `active` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb4;
-- Dumping data for table created_by.active: ~26 rows (approximately)
-- Dumping data for table mkd.active: ~26 rows (approximately)
DELETE FROM `active`;
/*!40000 ALTER TABLE `active` DISABLE KEYS */;
INSERT INTO `active` (`id`, `name`, `handle`, `description`, `variables_scores`, `created_at`, `updated_at`) VALUES
@@ -63,7 +63,7 @@ INSERT INTO `active` (`id`, `name`, `handle`, `description`, `variables_scores`,
(26, 'Yeast Extract', NULL, NULL, NULL, '2022-04-10 11:07:44', '2022-04-10 11:07:44');
/*!40000 ALTER TABLE `active` ENABLE KEYS */;
-- Dumping structure for table created_by.activity_log
-- Dumping structure for table mkd.activity_log
DROP TABLE IF EXISTS `activity_log`;
CREATE TABLE IF NOT EXISTS `activity_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -75,12 +75,12 @@ CREATE TABLE IF NOT EXISTS `activity_log` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Dumping data for table created_by.activity_log: ~0 rows (approximately)
-- Dumping data for table mkd.activity_log: ~0 rows (approximately)
DELETE FROM `activity_log`;
/*!40000 ALTER TABLE `activity_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `activity_log` ENABLE KEYS */;
-- Dumping structure for table created_by.admin_operation
-- Dumping structure for table mkd.admin_operation
DROP TABLE IF EXISTS `admin_operation`;
CREATE TABLE IF NOT EXISTS `admin_operation` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -94,12 +94,12 @@ CREATE TABLE IF NOT EXISTS `admin_operation` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Dumping data for table created_by.admin_operation: ~0 rows (approximately)
-- Dumping data for table mkd.admin_operation: ~0 rows (approximately)
DELETE FROM `admin_operation`;
/*!40000 ALTER TABLE `admin_operation` DISABLE KEYS */;
/*!40000 ALTER TABLE `admin_operation` ENABLE KEYS */;
-- Dumping structure for table created_by.answer
-- Dumping structure for table mkd.answer
DROP TABLE IF EXISTS `answer`;
CREATE TABLE IF NOT EXISTS `answer` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -119,7 +119,7 @@ CREATE TABLE IF NOT EXISTS `answer` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=97 DEFAULT CHARSET=utf8mb4;
-- Dumping data for table created_by.answer: ~96 rows (approximately)
-- Dumping data for table mkd.answer: ~96 rows (approximately)
DELETE FROM `answer`;
/*!40000 ALTER TABLE `answer` DISABLE KEYS */;
INSERT INTO `answer` (`id`, `question_id`, `order`, `answer`, `answer_value`, `hide_answer`, `explaination`, `image_id`, `response_header`, `response_body`, `response_arguments`, `black_list_actives`, `created_at`, `updated_at`) VALUES
@@ -221,7 +221,7 @@ INSERT INTO `answer` (`id`, `question_id`, `order`, `answer`, `answer_value`, `h
(96, 30, 1, 'Yes', NULL, 0, NULL, NULL, NULL, 'We\'ll add some of our wonderful actives that will minimize the appearance of hypopigmentation over time', NULL, NULL, '2022-04-10 11:07:44', '2022-04-10 11:07:44');
/*!40000 ALTER TABLE `answer` ENABLE KEYS */;
-- Dumping structure for table created_by.configuration
-- Dumping structure for table mkd.configuration
DROP TABLE IF EXISTS `configuration`;
CREATE TABLE IF NOT EXISTS `configuration` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -231,14 +231,14 @@ CREATE TABLE IF NOT EXISTS `configuration` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;
-- Dumping data for table created_by.configuration: ~1 rows (approximately)
-- Dumping data for table mkd.configuration: ~1 rows (approximately)
DELETE FROM `configuration`;
/*!40000 ALTER TABLE `configuration` DISABLE KEYS */;
INSERT INTO `configuration` (`id`, `image_id`, `created_at`, `updated_at`) VALUES
(1, 35, '2022-04-10 11:07:43', '2022-04-10 11:07:43');
/*!40000 ALTER TABLE `configuration` ENABLE KEYS */;
-- Dumping structure for table created_by.credential
-- Dumping structure for table mkd.credential
DROP TABLE IF EXISTS `credential`;
CREATE TABLE IF NOT EXISTS `credential` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -256,7 +256,7 @@ CREATE TABLE IF NOT EXISTS `credential` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;
-- Dumping data for table created_by.credential: ~2 rows (approximately)
-- Dumping data for table mkd.credential: ~2 rows (approximately)
DELETE FROM `credential`;
/*!40000 ALTER TABLE `credential` DISABLE KEYS */;
INSERT INTO `credential` (`id`, `oauth`, `email`, `password`, `user_id`, `type`, `verify`, `status`, `two_factor_authentication`, `force_password_change`, `created_at`, `updated_at`) VALUES
@@ -264,7 +264,7 @@ INSERT INTO `credential` (`id`, `oauth`, `email`, `password`, `user_id`, `type`,
(2, NULL, 'member@manaknight.com', '$2a$04$A7JX0xG2Gwt06UKpxq/Yd.oJARP6.BpzkzjOhc67.2dkfqjJPJ0pe', 2, 0, 1, 1, 0, NULL, '2022-04-10 11:07:43', '2022-04-10 11:07:43');
/*!40000 ALTER TABLE `credential` ENABLE KEYS */;
-- Dumping structure for table created_by.email
-- Dumping structure for table mkd.email
DROP TABLE IF EXISTS `email`;
CREATE TABLE IF NOT EXISTS `email` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -277,7 +277,7 @@ CREATE TABLE IF NOT EXISTS `email` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4;
-- Dumping data for table created_by.email: ~4 rows (approximately)
-- Dumping data for table mkd.email: ~4 rows (approximately)
DELETE FROM `email`;
/*!40000 ALTER TABLE `email` DISABLE KEYS */;
INSERT INTO `email` (`id`, `slug`, `subject`, `tag`, `html`, `created_at`, `updated_at`) VALUES
@@ -287,7 +287,7 @@ INSERT INTO `email` (`id`, `slug`, `subject`, `tag`, `html`, `created_at`, `upda
(4, 'verify', 'Account verification', 'code', 'Your verification # is {{{code}}}', '2022-04-10 11:07:43', '2022-04-10 11:07:43');
/*!40000 ALTER TABLE `email` ENABLE KEYS */;
-- Dumping structure for table created_by.image
-- Dumping structure for table mkd.image
DROP TABLE IF EXISTS `image`;
CREATE TABLE IF NOT EXISTS `image` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -304,7 +304,7 @@ CREATE TABLE IF NOT EXISTS `image` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8mb4;
-- Dumping data for table created_by.image: ~35 rows (approximately)
-- Dumping data for table mkd.image: ~35 rows (approximately)
DELETE FROM `image`;
/*!40000 ALTER TABLE `image` DISABLE KEYS */;
INSERT INTO `image` (`id`, `url`, `caption`, `user_id`, `width`, `height`, `mobile_width`, `mobile_height`, `upload_type`, `created_at`, `updated_at`) VALUES
@@ -345,7 +345,7 @@ INSERT INTO `image` (`id`, `url`, `caption`, `user_id`, `width`, `height`, `mobi
(35, '/frontend_images/MainImage/main_quiz_image.png', NULL, 1, NULL, NULL, NULL, NULL, NULL, '2022-04-10 11:07:43', '2022-04-10 11:07:43');
/*!40000 ALTER TABLE `image` ENABLE KEYS */;
-- Dumping structure for table created_by.member_operation
-- Dumping structure for table mkd.member_operation
DROP TABLE IF EXISTS `member_operation`;
CREATE TABLE IF NOT EXISTS `member_operation` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -360,12 +360,12 @@ CREATE TABLE IF NOT EXISTS `member_operation` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Dumping data for table created_by.member_operation: ~0 rows (approximately)
-- Dumping data for table mkd.member_operation: ~0 rows (approximately)
DELETE FROM `member_operation`;
/*!40000 ALTER TABLE `member_operation` DISABLE KEYS */;
/*!40000 ALTER TABLE `member_operation` ENABLE KEYS */;
-- Dumping structure for table created_by.order
-- Dumping structure for table mkd.order
DROP TABLE IF EXISTS `order`;
CREATE TABLE IF NOT EXISTS `order` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -387,12 +387,12 @@ CREATE TABLE IF NOT EXISTS `order` (
UNIQUE KEY `shopify_id` (`shopify_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Dumping data for table created_by.order: ~0 rows (approximately)
-- Dumping data for table mkd.order: ~0 rows (approximately)
DELETE FROM `order`;
/*!40000 ALTER TABLE `order` DISABLE KEYS */;
/*!40000 ALTER TABLE `order` ENABLE KEYS */;
-- Dumping structure for table created_by.output_variable
-- Dumping structure for table mkd.output_variable
DROP TABLE IF EXISTS `output_variable`;
CREATE TABLE IF NOT EXISTS `output_variable` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -405,7 +405,7 @@ CREATE TABLE IF NOT EXISTS `output_variable` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4;
-- Dumping data for table created_by.output_variable: ~25 rows (approximately)
-- Dumping data for table mkd.output_variable: ~25 rows (approximately)
DELETE FROM `output_variable`;
/*!40000 ALTER TABLE `output_variable` DISABLE KEYS */;
INSERT INTO `output_variable` (`id`, `name`, `priority`, `active_list`, `ranges_response`, `created_at`, `updated_at`) VALUES
@@ -436,7 +436,7 @@ INSERT INTO `output_variable` (`id`, `name`, `priority`, `active_list`, `ranges_
(25, 'Oxygenation', 40, NULL, '[{"0-33":"Your skin is not that sensetive"},{"34-66":"Your skin is somewhat sensetive"},{"67-100":"Your skin is highly sensetive"}]', '2022-04-10 11:07:43', '2022-04-10 11:07:43');
/*!40000 ALTER TABLE `output_variable` ENABLE KEYS */;
-- Dumping structure for table created_by.question
-- Dumping structure for table mkd.question
DROP TABLE IF EXISTS `question`;
CREATE TABLE IF NOT EXISTS `question` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -463,7 +463,7 @@ CREATE TABLE IF NOT EXISTS `question` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb4;
-- Dumping data for table created_by.question: ~30 rows (approximately)
-- Dumping data for table mkd.question: ~30 rows (approximately)
DELETE FROM `question`;
/*!40000 ALTER TABLE `question` DISABLE KEYS */;
INSERT INTO `question` (`id`, `quiz_id`, `question`, `question_arguments`, `order`, `image_width`, `image_height`, `placeholder`, `note`, `note_type`, `target`, `response`, `save_response_into`, `depends_on`, `slider_range`, `output_variable_name`, `weight`, `extra_output_variable`, `type`, `created_at`, `updated_at`) VALUES
@@ -499,7 +499,7 @@ INSERT INTO `question` (`id`, `quiz_id`, `question`, `question_arguments`, `orde
(30, 2, 'Is your skin prone to Hypopigmentation?', NULL, 7, NULL, NULL, NULL, 'This is the likelihood of skin discoloring associated with aging or after injury.', 1, NULL, NULL, NULL, '', '0-100', 'Hypopigmentation', 100, NULL, 6, '2022-04-10 11:07:43', '2022-04-10 11:07:43');
/*!40000 ALTER TABLE `question` ENABLE KEYS */;
-- Dumping structure for table created_by.quiz
-- Dumping structure for table mkd.quiz
DROP TABLE IF EXISTS `quiz`;
CREATE TABLE IF NOT EXISTS `quiz` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -510,7 +510,7 @@ CREATE TABLE IF NOT EXISTS `quiz` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;
-- Dumping data for table created_by.quiz: ~3 rows (approximately)
-- Dumping data for table mkd.quiz: ~3 rows (approximately)
DELETE FROM `quiz`;
/*!40000 ALTER TABLE `quiz` DISABLE KEYS */;
INSERT INTO `quiz` (`id`, `name`, `description`, `created_at`, `updated_at`) VALUES
@@ -519,7 +519,7 @@ INSERT INTO `quiz` (`id`, `name`, `description`, `created_at`, `updated_at`) VAL
(3, 'Your Environment', 'Almost done, lets talk environment & lifestyle.', '2022-04-10 11:07:43', '2022-04-10 11:07:43');
/*!40000 ALTER TABLE `quiz` ENABLE KEYS */;
-- Dumping structure for table created_by.refer_log
-- Dumping structure for table mkd.refer_log
DROP TABLE IF EXISTS `refer_log`;
CREATE TABLE IF NOT EXISTS `refer_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -531,12 +531,12 @@ CREATE TABLE IF NOT EXISTS `refer_log` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Dumping data for table created_by.refer_log: ~0 rows (approximately)
-- Dumping data for table mkd.refer_log: ~0 rows (approximately)
DELETE FROM `refer_log`;
/*!40000 ALTER TABLE `refer_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `refer_log` ENABLE KEYS */;
-- Dumping structure for table created_by.result_profile
-- Dumping structure for table mkd.result_profile
DROP TABLE IF EXISTS `result_profile`;
CREATE TABLE IF NOT EXISTS `result_profile` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -547,7 +547,7 @@ CREATE TABLE IF NOT EXISTS `result_profile` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;
-- Dumping data for table created_by.result_profile: ~3 rows (approximately)
-- Dumping data for table mkd.result_profile: ~3 rows (approximately)
DELETE FROM `result_profile`;
/*!40000 ALTER TABLE `result_profile` DISABLE KEYS */;
INSERT INTO `result_profile` (`id`, `section_title`, `output_variable_list`, `created_at`, `updated_at`) VALUES
@@ -556,7 +556,7 @@ INSERT INTO `result_profile` (`id`, `section_title`, `output_variable_list`, `cr
(3, 'Environmental Factors', '[19,21,24,25]', '2022-04-10 11:07:44', '2022-04-10 11:07:44');
/*!40000 ALTER TABLE `result_profile` ENABLE KEYS */;
-- Dumping structure for table created_by.role
-- Dumping structure for table mkd.role
DROP TABLE IF EXISTS `role`;
CREATE TABLE IF NOT EXISTS `role` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -566,7 +566,7 @@ CREATE TABLE IF NOT EXISTS `role` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;
-- Dumping data for table created_by.role: ~2 rows (approximately)
-- Dumping data for table mkd.role: ~2 rows (approximately)
DELETE FROM `role`;
/*!40000 ALTER TABLE `role` DISABLE KEYS */;
INSERT INTO `role` (`id`, `name`, `created_at`, `updated_at`) VALUES
@@ -574,7 +574,7 @@ INSERT INTO `role` (`id`, `name`, `created_at`, `updated_at`) VALUES
(2, 'member', '2022-04-10 11:07:43', '2022-04-10 11:07:43');
/*!40000 ALTER TABLE `role` ENABLE KEYS */;
-- Dumping structure for table created_by.rule
-- Dumping structure for table mkd.rule
DROP TABLE IF EXISTS `rule`;
CREATE TABLE IF NOT EXISTS `rule` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -590,14 +590,14 @@ CREATE TABLE IF NOT EXISTS `rule` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;
-- Dumping data for table created_by.rule: ~1 rows (approximately)
-- Dumping data for table mkd.rule: ~1 rows (approximately)
DELETE FROM `rule`;
/*!40000 ALTER TABLE `rule` DISABLE KEYS */;
INSERT INTO `rule` (`id`, `output_variable_name`, `actives`, `operator`, `compare_value`, `min`, `max`, `action`, `created_at`, `updated_at`) VALUES
(1, 'Age', '["Camomile"]', 3, 30, NULL, NULL, 2, '2022-04-10 11:07:43', '2022-04-10 11:07:43');
/*!40000 ALTER TABLE `rule` ENABLE KEYS */;
-- Dumping structure for table created_by.setting
-- Dumping structure for table mkd.setting
DROP TABLE IF EXISTS `setting`;
CREATE TABLE IF NOT EXISTS `setting` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -610,7 +610,7 @@ CREATE TABLE IF NOT EXISTS `setting` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4;
-- Dumping data for table created_by.setting: ~6 rows (approximately)
-- Dumping data for table mkd.setting: ~6 rows (approximately)
DELETE FROM `setting`;
/*!40000 ALTER TABLE `setting` DISABLE KEYS */;
INSERT INTO `setting` (`id`, `key`, `type`, `value`, `maintenance`, `created_at`, `updated_at`) VALUES
@@ -622,7 +622,7 @@ INSERT INTO `setting` (`id`, `key`, `type`, `value`, `maintenance`, `created_at`
(6, 'license_key', 4, '4097fbd4f340955de76ca555c201b185cf9d6921d977301b05cdddeae4af54f924f0508cd0f7ca66', NULL, '2022-04-10 11:07:43', '2022-04-10 11:07:43');
/*!40000 ALTER TABLE `setting` ENABLE KEYS */;
-- Dumping structure for table created_by.sms
-- Dumping structure for table mkd.sms
DROP TABLE IF EXISTS `sms`;
CREATE TABLE IF NOT EXISTS `sms` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -634,14 +634,14 @@ CREATE TABLE IF NOT EXISTS `sms` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;
-- Dumping data for table created_by.sms: ~1 rows (approximately)
-- Dumping data for table mkd.sms: ~1 rows (approximately)
DELETE FROM `sms`;
/*!40000 ALTER TABLE `sms` DISABLE KEYS */;
INSERT INTO `sms` (`id`, `slug`, `tag`, `content`, `created_at`, `updated_at`) VALUES
(1, 'verify', 'code', 'Your verification # is {{{code}}}', '2022-04-10 11:07:43', '2022-04-10 11:07:43');
/*!40000 ALTER TABLE `sms` ENABLE KEYS */;
-- Dumping structure for table created_by.token
-- Dumping structure for table mkd.token
DROP TABLE IF EXISTS `token`;
CREATE TABLE IF NOT EXISTS `token` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -656,12 +656,12 @@ CREATE TABLE IF NOT EXISTS `token` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Dumping data for table created_by.token: ~0 rows (approximately)
-- Dumping data for table mkd.token: ~0 rows (approximately)
DELETE FROM `token`;
/*!40000 ALTER TABLE `token` DISABLE KEYS */;
/*!40000 ALTER TABLE `token` ENABLE KEYS */;
-- Dumping structure for table created_by.user
-- Dumping structure for table mkd.user
DROP TABLE IF EXISTS `user`;
CREATE TABLE IF NOT EXISTS `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@@ -683,7 +683,7 @@ CREATE TABLE IF NOT EXISTS `user` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;
-- Dumping data for table created_by.user: ~2 rows (approximately)
-- Dumping data for table mkd.user: ~2 rows (approximately)
DELETE FROM `user`;
/*!40000 ALTER TABLE `user` DISABLE KEYS */;
INSERT INTO `user` (`id`, `role_id`, `profile_id`, `organization_id`, `first_name`, `last_name`, `phone`, `image`, `refer`, `stripe_uid`, `paypal_uid`, `expire_at`, `status`, `created_at`, `updated_at`, `user_id`) VALUES
+1 -38
View File
@@ -732,12 +732,10 @@ async function nextQuestion(goBack, goBackFromResponse, fromDependedOn) {
$("#page5 .container .row .createdByDiv").append(`
Created By ${tempName}
`);
} //displaying user name on top ends here
}
// first getting the first quiz
totalQuizQuestions = allItems[currentQuizIndex].questions;
// checking if there is any resp onse in question or answer
if (currentQuestionCounter != 0) {
apiQues = totalQuizQuestions.find((ques) => ques.id == lastShowedQuestionId);
let lastAnswerObject = dataToReturn.find(function (ansObj) {
@@ -748,39 +746,8 @@ async function nextQuestion(goBack, goBackFromResponse, fromDependedOn) {
var fullAnswerObject = apiQues.answers.find(function (cAns) {
return cAns.answer == lastAnswerObject.answer;
});
// quesResponse = apiQues.response;
//when there is response with the question
if (apiQues.id == 14) {
//save progress if there is answer
if (lastAnswerObject.answer) {
//ajax save contact
// const email = lastAnswerObject.answer;
// let fullName = localStorage.getItem("name");
// let firstName, lastName;
// if (fullName && fullName !== "You") firstName = fullName.split(" ")[0];
// if (fullName && fullName !== "You" && fullName.split(" ").length > 1) lastName = fullName.split(" ")[fullName.split(" ").length - 1];
// try {
// const newProfile = await fetch(url_preset + "/klaviyo/identity", {
// method: "POST",
// headers: {
// "content-type": "application/json",
// },
// body: JSON.stringify({ email, firstName, lastName }),
// }).then((res) => res.json());
// const addedToList = await fetch(url_preset + "/klaviyo/list", {
// method: "POST",
// headers: {
// "content-type": "application/json",
// },
// body: JSON.stringify({ email }),
// }).then((res) => res.json());
// console.log(newProfile);
// console.log(addedToList);
// } catch (error) {
// console.error(error);
// }
}
}
if (apiQues.id == 20 && apiQues.type == 7) {
if (Array.isArray(lastAnswerObject.answer)) {
@@ -809,9 +776,6 @@ async function nextQuestion(goBack, goBackFromResponse, fromDependedOn) {
$("#page4 .customImgRow .imgRowInner p").append(`${responseHeader}`);
responseOnGoing = true;
hasNoResponse = false;
// closeResponseTimeout = setTimeout(async () => {
// closeResponse();
// }, closeResponseTimeoutCounter);
}
} else if (apiQues.answers && apiQues.answers[0].responseBody) {
$("#page3").css("display", "none");
@@ -1001,7 +965,6 @@ async function askQuestion(totalQuizQuestions, counter, fromBack) {
});
}
// displaying note if it exists
if (note) {
$("#noteRow").css("display", "flex");
$("#noteRow .noteDesc p").html(note);
+3 -4
View File
@@ -15,17 +15,16 @@
<div class="container">
<div class="row firstRow">
<h1>Create Yours</h1>
<h5><span class="dash"></span>CUSTOM SKIN CARE QUIZ</h5>
<h5><span class="dash"></span>TEST SKIN CARE QUIZ</h5>
</div>
<div class="row secondRow">
<div class="columns">
<h3 class="heading">
Lets start our journey to finding your perfect Skincare formula,
Lets start our journey
<span class="underlineSpan">just for you</span>.
</h3>
<p class="para">
We are experts on skin and skincare actives, but only you are the true expert on your skin. By combing our science with your input about you and your skin, together we will co-create
your perfect formula.
We are experts on skin and skincare actives..
</p>
<button id="beginButton" class="beginButton">LET'S BEGIN!</button>
</div>