3d5667ce by Jeremy Groot

redesign updates

1 parent d00abdf9
Showing 536 changed files with 212 additions and 399 deletions
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
2 2
3 class campaignItemClass 3 class campaignItemClass
4 { //define campaignItemClass 4 { //define campaignItemClass
5 private $item; //Define member variables 5 /*private CHANGED TO PUBLIC BECAUSE THE PREVIOUS SYSTEM
6 IS TOO COUPLED TO THE FRONTEND AND WE NEED TO BYPASS IT */ public $item; //Define member variables
6 7
7 function __construct($item) 8 function __construct($item)
8 { 9 {
......
1 TEST_SITE_DB_DSN=mysql:host=localhost;dbname=brokers
2 TEST_SITE_DB_HOST=localhost
3 TEST_SITE_DB_NAME=brokers
4 TEST_SITE_DB_USER=root
5 TEST_SITE_DB_PASSWORD=
6 TEST_SITE_TABLE_PREFIX=wp_
7 TEST_SITE_ADMIN_USERNAME=admin
8 TEST_SITE_ADMIN_PASSWORD=password
9 TEST_SITE_WP_ADMIN_PATH=/wp-admin
10 WP_ROOT_FOLDER=/Users/jeremy/WebServer/broker-site
11 TEST_DB_NAME=brokers
12 TEST_DB_HOST=localhost
13 TEST_DB_USER=root
14 TEST_DB_PASSWORD="<KJad2W5"
15 TEST_TABLE_PREFIX=wp_
16 TEST_SITE_WP_URL=http://brokers.test
17 TEST_SITE_WP_DOMAIN=brokers.test
18 TEST_SITE_ADMIN_EMAIL=jeremy@gotenzing.com
1 module.exports = function (grunt) {
2 var uglifyFiles = {
3 files: {
4 'scripts/vendor/modernizr.js': 'components/modernizr/modernizr.js',
5 'scripts/vendor/r.js': 'components/requirejs/require.js'
6 }
7 };
8 grunt.initConfig(
9 {
10 // Watches for changes and runs tasks
11 watch: {
12 sass: {
13 files: ['styles/**/*.scss'],
14 tasks: ['sass:production']
15 },
16 js: {
17 files: ['scripts/**/*.js', '!scripts/optimized.min.js'],
18 tasks: ['jshint', 'requirejs:production']
19 },
20 php: {
21 files: ['**/*.php'],
22 tasks: []
23 }
24 },
25
26 // JsHint your javascript
27 jshint: {
28 all: [
29 'scripts/*.js',
30 '!scripts/modernizr.js',
31 '!scripts/*.min.js',
32 '!scripts/vendor/**/*.js',
33 '!scripts/src/*.js'
34 ],
35 options: {
36 browser: true,
37 curly: false,
38 eqeqeq: false,
39 eqnull: true,
40 expr: true,
41 immed: true,
42 newcap: true,
43 noarg: true,
44 smarttabs: true,
45 sub: true,
46 undef: false
47 }
48 },
49
50 // Dev and production build for sass
51 sass: {
52 production: {
53 files: [
54 {
55 src: ['**/*.scss', '!**/_*.scss'],
56 cwd: 'styles',
57 dest: 'styles',
58 ext: '.css',
59 expand: true
60 }
61 ],
62 options: {
63 style: 'compressed'
64 }
65 },
66 dev: {
67 files: [
68 {
69 src: ['**/*.scss', '!**/_*.scss'],
70 cwd: 'styles',
71 dest: 'styles',
72 ext: '.css',
73 expand: true
74 }
75 ],
76 options: {
77 style: 'expanded'
78 }
79 }
80 },
81
82 browserSync: {
83 dev: {
84 bsFiles: {
85 src: [
86 '**/*.css',
87 "**/*.php"
88 ]
89 },
90 options: {
91 proxy: "http://commonwell.test/",
92 port: 3200,
93 notify: true,
94 watchTask: true
95 }
96 }
97 },
98
99 // Bower task sets up require config
100 bower: {
101 all: {
102 rjsConfig: 'scripts/global.js'
103 }
104 },
105
106 // Require config
107 requirejs: {
108 production: {
109 options: {
110 name: 'global',
111 baseUrl: 'scripts',
112 mainConfigFile: 'scripts/global.js',
113 out: 'scripts/optimized.min.js'
114 }
115 }
116 },
117
118 uglify: {
119 dist: uglifyFiles
120 },
121
122 // Image min
123 imagemin: {
124 production: {
125 files: [
126 {
127 expand: true,
128 cwd: 'images',
129 src: '**/*.{png,jpg,jpeg}',
130 dest: 'images'
131 }
132 ]
133 }
134 },
135
136 // SVG min
137 svgmin: {
138 production: {
139 files: [
140 {
141 expand: true,
142 cwd: 'images',
143 src: '**/*.svg',
144 dest: 'images'
145 }
146 ]
147 }
148 },
149
150 tenon: {
151 options: {
152 key: '396222b2a0eb802ac222d58feba8786e',
153 filter: [31, 54],
154 level: 'AA'
155 },
156 all: {
157 options: {
158 saveOutputIn: 'allHtml.json',
159 snippet: true,
160 asyncLim: 2
161 },
162 src: ['../../cache/page_enhanced/commonwell-corp.dev/**.html']
163 },
164 index: {
165 src: [
166 '../../cache/page_enhanced/commonwell-corp.dev/_index_ssl.html'
167 ]
168 }
169 }
170
171 }
172 );
173
174 // Default task
175 grunt.registerTask('default', ['browserSync', 'watch']);
176
177 // tenon task
178 grunt.registerTask('tenon', 'tenon');
179
180 // Build task
181 grunt.registerTask(
182 'build', [
183 'jshint',
184 'sass:production',
185 'imagemin:production',
186 'svgmin:production',
187 'requirejs:production',
188 'uglify'
189 ]
190 );
191
192 // Template Setup Task
193 grunt.registerTask('setup', ['sass:dev', 'bower-install']);
194
195 // Wtach Task
196 grunt.registerTask('watch', ['regarde', 'requirejs:production']);
197
198 // Load up tasks
199 grunt.loadNpmTasks('grunt-contrib-sass');
200 grunt.loadNpmTasks('grunt-contrib-jshint');
201 // grunt.loadNpmTasks('grunt-contrib-livereload');
202 grunt.loadNpmTasks('grunt-regarde');
203 grunt.loadNpmTasks('grunt-contrib-watch');
204 grunt.loadNpmTasks('grunt-bower-requirejs');
205 grunt.loadNpmTasks('grunt-contrib-requirejs');
206 grunt.loadNpmTasks('grunt-contrib-imagemin');
207 grunt.loadNpmTasks('grunt-svgmin');
208 grunt.loadNpmTasks('grunt-contrib-uglify');
209 grunt.loadNpmTasks('grunt-tenon-client');
210 grunt.loadNpmTasks('grunt-browser-sync');
211
212 // Run bower install
213 grunt.registerTask(
214 'bower-install', function () {
215 var done = this.async();
216 var bower = require('bower').commands;
217 bower.install().on(
218 'end', function (data) {
219 done();
220 }
221 ).on(
222 'data', function (data) {
223 console.log(data);
224 }
225 ).on(
226 'error', function (err) {
227 console.error(err);
228 done();
229 }
230 );
231 }
232 );
233
234 };
...@@ -68,22 +68,4 @@ if (function_exists(clean_custom_menus())) { ...@@ -68,22 +68,4 @@ if (function_exists(clean_custom_menus())) {
68 } 68 }
69 ?> 69 ?>
70 </div> 70 </div>
71 <div class="new-footer-box">
72 <div class="left-image-menu"><a href="<?php echo site_url(); ?>/lets-connect-info/"></a></div>
73 <?php wp_nav_menu(
74 array(
75 'theme_location' => 'broker-footer',
76 'container' => 'nav',
77 'container_id' => 'broker-footer',
78 )
79 );
80
81 ?>
82 </div>
83
84 <style>
85 html {
86 margin-top : 32px !important;
87 }
88 </style>
89 <?php get_footer();?> 71 <?php get_footer();?>
......
1 <?php
2 /*
3 * Template Name: Broker Pages
4 */
5
6 global $user_ID;
7 get_currentuserinfo();
8 if (!$user_ID) {
9 auth_redirect();
10 }
11 ?>
12 <?php get_header("brokerlanding");
13 global $wpdb;
14 ?>
15 <div id="brokercontent">
16 <div class="row">
17 <?php include_once 'broker_sidebar.php';?>
18 </div>
19 <div class="row">
20 <?php include_once 'broker_sidebar_tab.php';?>
21 </div>
22 <div id="page-content">
23 <?php
24 if (function_exists(clean_custom_menus())) {
25 clean_custom_menus();
26 }
27 ?>
28 <h5 style="text-transform:uppercase;"><?php the_title();?></h5>
29 <?php get_template_part('loop', 'single');?>
30 </div>
31 </div>
32
33 <div class="new-footer-box">
34 <div class="left-image-menu"><a href="<?php echo site_url(); ?>/lets-connect-info/"></a></div>
35 <?php wp_nav_menu(
36 array(
37 'theme_location' => 'broker-footer',
38 'container' => 'nav',
39 'container_id' => 'broker-footer',
40 )
41 );
42
43 ?>
44 </div>
45
46
47 <style>
48 html {
49 margin-top : 32px !important;
50 }
51 #page-content{
52 max-width:unset !important;
53 }
54 </style>
55 <?php get_footer();?>
1 <?php
2
3 $results[] = "";
4 $brokerId = get_user_meta($current_user->ID, 'broker_id', true);
5 $query = "SELECT group_id From wp_broker_list where broker_id ='" . $brokerId . "'";
6 $groupHash = $wpdb->get_results($query);
7 //error_log($groupHash[0]->group_id);
8 $results = GraphServiceAccessHelper::getMemberOfGroup($groupHash[0]->group_id);
9 //error_log(print_r($results, true));
10 if (!$results) {
11 $results = GraphServiceAccessHelper::getMemberOfGroup(get_option('fall_back_team'));
12 }
13
14 $menu_name = 'broker-menu'; // specify custom menu slug
15 $locations = get_nav_menu_locations();
16 $menu = wp_get_nav_menu_object($locations[$menu_name]);
17 $menu_items = wp_get_nav_menu_items($menu->term_id);
18 $menuCount = count($menu_items);
19 $menuCount = 12 / $menuCount;
20 if ($menuCount == '2.4') {
21 $menuCount = '5ths';
22 $menuLeftCount = 'three5ths';
23 } else {
24
25 $menuLeftCount = 12 - $menuCount;
26 }
27
28 $colCount = count($results);
29 $colCount = 12 / $colCount;
30 if ($colCount == '2.4') {
31 $colCount = '5ths';
32 }
33 $colCount = '1';
34
35
36 ?>
37 <?php if ($results) { ?>
38
39 <div id="mySidenav" class="sidenav">
40 <?php
41 foreach ($results as $key => $row) {
42 $staffData = get_user_by('id', $row->staff_id);
43 ?>
44 <div class="col-sm-12 sideMobile">
45 <div class="moblieLine">
46 <div class="video-wrapper-side">
47 <div class="video_container-side">
48 <?php
49 if ($row->extension_1618b427c4f345429813806e3f0e2763_moivie) { ?>
50
51 <iframe src="<?php echo $row->extension_1618b427c4f345429813806e3f0e2763_moivie; ?>"
52 frameborder="0"></iframe>
53 <?php } elseif ($row->extension_1618b427c4f345429813806e3f0e2763_photo) {
54 echo '<img class="user_image" src="' . $row->extension_1618b427c4f345429813806e3f0e2763_photo . '" />';
55
56 } else {
57 echo '<img class="placeholder" src="' . get_template_directory_uri(
58 ) . '/images/placeholder.png" />';
59 } ?>
60 </div>
61 </div>
62 <span class="SSname"><?php echo $row->displayName; ?></span>
63 <span class="SStitle"><?php echo $row->jobTitle; ?></span>
64
65 <span class="SSphoneSide"><?php if ($row->telephoneNumber) { ?> <i class="material-icons md-18"
66 style="top: 4px;position: relative;">
67 &#xE61D;</i> <a href="tel:<?php echo str_replace(
68 ['-', ' '],
69 ['', ''],
70 $row->telephoneNumber
71 ); ?>"><?php echo $row->telephoneNumber; ?></a> <?php } ?></span>
72
73 <span class="SScontactSide"> <?php if ($row->mail) { ?> <a href="mailto:<?php echo $row->mail; ?>"><i
74 class="material-icons md-18">&#xE0BE;</i></a> <?php } ?></span>
75 <?php if ($row->messager) { ?> <a href=""><i
76 class="material-icons md-18" style="top: 1px;position: relative;">
77 &#xE0B9;</i></a></span><?php } ?>
78
79 </div>
80 </div>
81 <?php } ?>
82 <a tabindex="1" href="javascript:void(0)" class="closebtn" onclick="openNav();">&times;</a>
83 </div>
84 <?php } ?>
...\ No newline at end of file ...\ No newline at end of file
1 paths:
2 tests: tests
3 output: tests/_output
4 data: tests/_data
5 support: tests/_support
6 envs: tests/_envs
7 actor_suffix: Tester
8 extensions:
9 enabled:
10 - Codeception\Extension\RunFailed
11 commands:
12 - Codeception\Command\GenerateWPUnit
13 - Codeception\Command\GenerateWPRestApi
14 - Codeception\Command\GenerateWPRestController
15 - Codeception\Command\GenerateWPRestPostTypeController
16 - Codeception\Command\GenerateWPAjax
17 - Codeception\Command\GenerateWPCanonical
18 - Codeception\Command\GenerateWPXMLRPC
19 params:
20 - .env.testing
1 {
2 "name": "insu/commonwell-broker",
3 "authors": [
4 {
5 "name": "Insu Mun",
6 "email": "insu@gotenzing.com"
7 }
8 ],
9 "require-dev": {
10 "phpunit/phpunit": "^9.6",
11 "lucatume/wp-browser": "^3.1",
12 "codeception/module-asserts": "^1.0",
13 "codeception/module-phpbrowser": "^1.0",
14 "codeception/module-webdriver": "^1.0",
15 "codeception/module-db": "^1.0",
16 "codeception/module-filesystem": "^1.0",
17 "codeception/module-cli": "^1.0",
18 "codeception/util-universalframework": "^1.0"
19 }
20 }
...@@ -7,9 +7,6 @@ ...@@ -7,9 +7,6 @@
7 } 7 }
8 ], 8 ],
9 "require": { 9 "require": {
10 10 "predis/predis": "^2.2"
11 },
12 "require-dev": {
13
14 } 11 }
15 } 12 }
......
...@@ -4,8 +4,70 @@ ...@@ -4,8 +4,70 @@
4 "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", 4 "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5 "This file is @generated automatically" 5 "This file is @generated automatically"
6 ], 6 ],
7 "content-hash": "617e9641bee528364791c3db43dc6451", 7 "content-hash": "1e77f5b1b9f199088cfe8a2b42c0bb75",
8 "packages": [], 8 "packages": [
9 {
10 "name": "predis/predis",
11 "version": "v2.2.0",
12 "source": {
13 "type": "git",
14 "url": "https://github.com/predis/predis.git",
15 "reference": "33b70b971a32b0d28b4f748b0547593dce316e0d"
16 },
17 "dist": {
18 "type": "zip",
19 "url": "https://api.github.com/repos/predis/predis/zipball/33b70b971a32b0d28b4f748b0547593dce316e0d",
20 "reference": "33b70b971a32b0d28b4f748b0547593dce316e0d",
21 "shasum": ""
22 },
23 "require": {
24 "php": "^7.2 || ^8.0"
25 },
26 "require-dev": {
27 "friendsofphp/php-cs-fixer": "^3.3",
28 "phpstan/phpstan": "^1.9",
29 "phpunit/phpunit": "^8.0 || ~9.4.4"
30 },
31 "suggest": {
32 "ext-relay": "Faster connection with in-memory caching (>=0.6.2)"
33 },
34 "type": "library",
35 "autoload": {
36 "psr-4": {
37 "Predis\\": "src/"
38 }
39 },
40 "notification-url": "https://packagist.org/downloads/",
41 "license": [
42 "MIT"
43 ],
44 "authors": [
45 {
46 "name": "Till Krüss",
47 "homepage": "https://till.im",
48 "role": "Maintainer"
49 }
50 ],
51 "description": "A flexible and feature-complete Redis client for PHP.",
52 "homepage": "http://github.com/predis/predis",
53 "keywords": [
54 "nosql",
55 "predis",
56 "redis"
57 ],
58 "support": {
59 "issues": "https://github.com/predis/predis/issues",
60 "source": "https://github.com/predis/predis/tree/v2.2.0"
61 },
62 "funding": [
63 {
64 "url": "https://github.com/sponsors/tillkruss",
65 "type": "github"
66 }
67 ],
68 "time": "2023-06-14T10:37:31+00:00"
69 }
70 ],
9 "packages-dev": [], 71 "packages-dev": [],
10 "aliases": [], 72 "aliases": [],
11 "minimum-stability": "stable", 73 "minimum-stability": "stable",
...@@ -14,5 +76,5 @@ ...@@ -14,5 +76,5 @@
14 "prefer-lowest": false, 76 "prefer-lowest": false,
15 "platform": [], 77 "platform": [],
16 "platform-dev": [], 78 "platform-dev": [],
17 "plugin-api-version": "2.3.0" 79 "plugin-api-version": "2.0.0"
18 } 80 }
......
1 # Please see https://github.com/browserslist/browserslist for more info
2 # These settings can be changed depending on what browsers your project is supporting
3
4
5 #
6 # BOOTSTRAP 4
7 #
8
9 [bs4]
10
11 # General rules
12 last 2 major version and not dead
13 >= 0.01%
14
15 # Explicit inclusions
16 # See https://getbootstrap.com/docs/4.6/getting-started/browsers-devices/
17 >= 1%
18 last 1 major version
19 not dead
20 Chrome >= 45
21 Firefox ESR
22 Firefox >= 38
23 Edge >= 12
24 Explorer >= 10
25 iOS >= 9
26 Safari >= 9
27 Android >= 4.4
28 Opera >= 30
29
30 # Explicit exclusions
31 # See https://caniuse.com/?search=flex
32 # See https://developer.mozilla.org/en-US/docs/Web/CSS/flex
33 not Chrome < 22 # no support for flex-basis, flex-shrink, flex-grow
34 not Firefox < 28 # no support for multi-line flexbox
35 not Explorer < 10 # no flexbox support
36 not iOS < 8 # no support for flex-shrink
37 not Safari < 8 # no support for flex-shrink
38 not Opera < 12.1 # no flexbox support
39 not OperaMobile < 12.1 # no flexbox support
40 not Android < 4.4 # no flexbox support
41
42 #
43 # BOOTSTRAP 5
44 # See https://getbootstrap.com/docs/5.1/getting-started/browsers-devices/
45 #
46
47 [bs5]
48 >= 0.5%
49 last 2 major versions
50 not dead
51 Chrome >= 60
52 Firefox >= 60
53 Firefox ESR
54 iOS >= 12
55 Safari >= 12
56 not Explorer <= 11
1
2
3 /*# sourceMappingURL=custom-editor-style.css.map */
...\ No newline at end of file ...\ No newline at end of file
1 {"version":3,"sources":[],"names":[],"mappings":"","file":"custom-editor-style.css"}
...\ No newline at end of file ...\ No newline at end of file
1
2 /*# sourceMappingURL=custom-editor-style.min.css.map */
...\ No newline at end of file ...\ No newline at end of file
1 {"version":3,"sources":[],"names":[],"mappings":""}
...\ No newline at end of file ...\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
1 const https = require('https');
2
3 https.get('https://events.teams.microsoft.com/event/820adfa0-e0e8-45ae-ad6d-a6da220d1674@9cec283c-a6d1-4e33-8a7a-c49d77d3e033', res => {
4 let data = [];
5 const headerDate = res.headers && res.headers.date ? res.headers.date : 'no response date';
6 console.log('Status Code:', res.statusCode);
7 console.log('Date in Response header:', headerDate);
8
9 res.on('data', chunk => {
10 data.push(chunk);
11 });
12
13 res.on('end', () => {
14 console.log('Response ended: ');
15 const users = JSON.parse(Buffer.concat(data).toString());
16
17 for(user of users) {
18 console.log(`Got user with id: ${user.id}, name: ${user.name}`);
19 }
20 });
21 }).on('error', err => {
22 console.log('Error: ', err.message);
23 });
...\ No newline at end of file ...\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.