Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Commonwell
/
broker-site
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
6f024609
authored
2023-11-16 13:32:32 -0500
by
Jeremy Groot
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix to broker sidebar
1 parent
9ad8e1b1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
10 deletions
wp-content/themes/commonwell-broker/inc/brokers_cli.php
wp-content/themes/commonwell-broker/templates/broker_sidebar.php
wp-content/themes/commonwell-broker/inc/brokers_cli.php
View file @
6f02460
...
...
@@ -145,8 +145,6 @@ if ( class_exists( 'WP_CLI' ) ) {
// }
// syncBrokerListToPosts();
}
function
rebuild_brokers_assigment
(
$args
)
{
...
...
@@ -249,6 +247,8 @@ if ( class_exists( 'WP_CLI' ) ) {
update_option
(
'broker_list'
,
serialize
(
$new_brokers
));
syncBrokerListToPosts
();
}
...
...
@@ -334,6 +334,6 @@ if ( class_exists( 'WP_CLI' ) ) {
}
}
WP_CLI
::
add_command
(
'tz_brokers'
,
'TZ_BROKER_COMMANDS'
);
}
\ No newline at end of file
...
...
wp-content/themes/commonwell-broker/templates/broker_sidebar.php
View file @
6f02460
...
...
@@ -2,13 +2,14 @@
$individual_assignments
=
get_field
(
'assignments'
,
'option'
);
$user_broker_id
=
get_user_meta
(
7525
,
'broker_id'
,
true
);
$farm_team_1
=
get_field
(
'farm_team_1'
,
'option'
);
$farm_team_2
=
get_field
(
'farm_team_2'
,
'option'
);
$commercial_team_1
=
get_field
(
'commercial_team_1'
,
'option'
);
$commercial_team_2
=
get_field
(
'commercial_team_2'
,
'option'
);
$commercial_team_3
=
get_field
(
'commercial_team_3'
,
'option'
);
$user_broker_id
=
get_user_meta
(
get_current_user_id
(),
'broker_id'
,
true
);
// var_dump($user_broker_id);exit;
$farm_team_1
=
get_field
(
'farm_1'
,
'option'
);
$farm_team_2
=
get_field
(
'farm_2'
,
'option'
);
$commercial_team_1
=
get_field
(
'comm_1'
,
'option'
);
$commercial_team_2
=
get_field
(
'comm_2'
,
'option'
);
$commercial_team_3
=
get_field
(
'comme_3'
,
'option'
);
// var_dump($commercial_team_2);exit;
$assignment_arr
=
[[
'indep'
=>
[],
'personal'
=>
[],
'farm'
=>
[],
'commercial'
=>
[]]];
...
...
@@ -197,6 +198,7 @@
$cat
=
$staff_contact
[
'category'
];
$sub_cat
=
$staff_contact
[
'sub_category'
];
//Before check for if this is a direct broker assignment and it matches the current user
if
(
$brokerages
)
{
if
(
!
hasBrokerAssignment
(
$user_broker_id
,
$brokerages
))
{
...
...
Please
register
or
sign in
to post a comment