Compare commits
19 Commits
dashboard
...
backend-co
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d6837e004 | ||
|
|
60de10633b | ||
|
|
902d339c6e | ||
|
|
86867c4e04 | ||
|
|
395a60b1cf | ||
|
|
85d21322a0 | ||
|
|
c133374159 | ||
|
|
a3761f3c71 | ||
|
|
e4da6c7d45 | ||
|
|
4aed08a96b | ||
|
|
bb9dc470d4 | ||
|
|
392b113427 | ||
|
|
d15cb6a225 | ||
|
|
3ce531ca4e | ||
|
|
ba0549b9fb | ||
|
|
f33c6aa6e2 | ||
|
|
1726c3d7f7 | ||
|
|
4f057b8338 | ||
|
|
89080780ed |
@@ -62,3 +62,122 @@
|
|||||||
.gravityflow-dicussion-item-value {
|
.gravityflow-dicussion-item-value {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.woocommerce-help-tip{
|
||||||
|
color:#666;
|
||||||
|
display:inline-block;
|
||||||
|
font-size:1.1em;
|
||||||
|
font-style:normal;
|
||||||
|
height:16px;
|
||||||
|
line-height:16px;
|
||||||
|
position:relative;
|
||||||
|
vertical-align:middle;
|
||||||
|
width:16px}
|
||||||
|
|
||||||
|
.woocommerce-help-tip::after{
|
||||||
|
font-family:Dashicons;
|
||||||
|
speak:none;
|
||||||
|
font-weight:400;
|
||||||
|
font-variant:normal;
|
||||||
|
text-transform:none;
|
||||||
|
line-height:1;
|
||||||
|
-webkit-font-smoothing:antialiased;
|
||||||
|
margin:0;
|
||||||
|
text-indent:0;
|
||||||
|
position:absolute;
|
||||||
|
top:0;
|
||||||
|
left:0;
|
||||||
|
width:100%;
|
||||||
|
height:100%;
|
||||||
|
text-align:center;
|
||||||
|
content:"";
|
||||||
|
cursor:help
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 .woocommerce-help-tip{
|
||||||
|
margin-top:-5px;
|
||||||
|
margin-left:.25em
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tooltips
|
||||||
|
*/
|
||||||
|
.tips {
|
||||||
|
cursor: help;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
img.tips {
|
||||||
|
padding: 5px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tiptip_holder {
|
||||||
|
display: none;
|
||||||
|
z-index: 8675309;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
/*rtl:ignore*/
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
#tiptip_holder.tip_top {
|
||||||
|
padding-bottom: 5px;
|
||||||
|
}
|
||||||
|
#tiptip_holder.tip_top #tiptip_arrow_inner {
|
||||||
|
margin-top: -7px;
|
||||||
|
margin-left: -6px;
|
||||||
|
border-top-color: #333;
|
||||||
|
}
|
||||||
|
#tiptip_holder.tip_bottom {
|
||||||
|
padding-top: 5px;
|
||||||
|
}
|
||||||
|
#tiptip_holder.tip_bottom #tiptip_arrow_inner {
|
||||||
|
margin-top: -5px;
|
||||||
|
margin-left: -6px;
|
||||||
|
border-bottom-color: #333;
|
||||||
|
}
|
||||||
|
#tiptip_holder.tip_right {
|
||||||
|
padding-left: 5px;
|
||||||
|
}
|
||||||
|
#tiptip_holder.tip_right #tiptip_arrow_inner {
|
||||||
|
margin-top: -6px;
|
||||||
|
margin-left: -5px;
|
||||||
|
border-right-color: #333;
|
||||||
|
}
|
||||||
|
#tiptip_holder.tip_left {
|
||||||
|
padding-right: 5px;
|
||||||
|
}
|
||||||
|
#tiptip_holder.tip_left #tiptip_arrow_inner {
|
||||||
|
margin-top: -6px;
|
||||||
|
margin-left: -7px;
|
||||||
|
border-left-color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tiptip_content,
|
||||||
|
.chart-tooltip,
|
||||||
|
.wc_error_tip {
|
||||||
|
color: #fff;
|
||||||
|
font-size: 0.8em;
|
||||||
|
max-width: 150px;
|
||||||
|
background: #333;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 0.618em 1em;
|
||||||
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
#tiptip_content code,
|
||||||
|
.chart-tooltip code,
|
||||||
|
.wc_error_tip code {
|
||||||
|
padding: 1px;
|
||||||
|
background: #888;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tiptip_arrow,
|
||||||
|
#tiptip_arrow_inner {
|
||||||
|
position: absolute;
|
||||||
|
border-color: transparent;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 6px;
|
||||||
|
height: 0;
|
||||||
|
width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
.wiaas-contacts-table th{
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wiaas-contacts-table tr.odd{
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
jQuery(document).ready(function($) {
|
||||||
|
$('#wiaas_contacts_table').DataTable({
|
||||||
|
"pageLength": 20,
|
||||||
|
"lengthChange": false,
|
||||||
|
"info": false,
|
||||||
|
"filter": true,
|
||||||
|
"order": [[ 0, "desc" ]]
|
||||||
|
});
|
||||||
|
} );
|
||||||
@@ -1,5 +1,15 @@
|
|||||||
jQuery(document).ready(function ($) {
|
jQuery(document).ready(function ($) {
|
||||||
|
|
||||||
|
$( document.body ).on( 'init_tooltips', function() {
|
||||||
|
$( '.woocommerce-help-tip' ).tipTip( {
|
||||||
|
'attribute': 'data-tip',
|
||||||
|
'fadeIn': 50,
|
||||||
|
'fadeOut': 50,
|
||||||
|
'delay': 200,
|
||||||
|
'defaultPosition': 'top'
|
||||||
|
} );
|
||||||
|
} ).trigger( 'init_tooltips' );
|
||||||
|
|
||||||
$('#tabs').each(function() {
|
$('#tabs').each(function() {
|
||||||
var disabled = $( this ).data('disabled') || '';
|
var disabled = $( this ).data('disabled') || '';
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,94 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class Wiaas_Admin_CL_Contacts
|
||||||
|
*/
|
||||||
|
class Wiaas_Admin_CL_Contacts {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Displays table list of customers that are linked to commercial lead and brokers
|
||||||
|
*/
|
||||||
|
|
||||||
|
public static function init() {
|
||||||
|
add_action( 'admin_menu', array( __CLASS__, 'add_contacts_page' ), 9 );
|
||||||
|
|
||||||
|
add_action( 'admin_enqueue_scripts', array(__CLASS__, 'enqueue_scripts'), 100 );
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function enqueue_scripts() {
|
||||||
|
$plugin_url = untrailingslashit( plugins_url( '/', WIAAS_FILE ) );
|
||||||
|
|
||||||
|
wp_enqueue_style( 'wiaas_admin_cl_contacts', $plugin_url . '/assets/css/wiaas-admin-cl-contacts.css' );
|
||||||
|
wp_enqueue_script( 'wiaas_admin_cl_contacts', $plugin_url . '/assets/js/wiaas-admin-cl-contacts.js' );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add customer menu page for commercial lead
|
||||||
|
*/
|
||||||
|
public static function add_contacts_page() {
|
||||||
|
add_menu_page(
|
||||||
|
__( 'Contacts', 'wiaas' ),
|
||||||
|
__( 'Contacts', 'wiaas' ),
|
||||||
|
'manage_wiaas_cl_customers',
|
||||||
|
'wiaas-cl-contacts',
|
||||||
|
array(__CLASS__, 'output_contacts'),
|
||||||
|
'dashicons-list-view',
|
||||||
|
'66.0' );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render content for contacts menu page
|
||||||
|
*/
|
||||||
|
public static function output_contacts() {
|
||||||
|
$organization_id = wiaas_get_current_user_organization_id();
|
||||||
|
|
||||||
|
$related_customer_organizations = Wiaas_Shop::get_shop_customers($organization_id);
|
||||||
|
$ids_of_user_organizations_to_show = [];
|
||||||
|
|
||||||
|
//add customer organizations related to CL
|
||||||
|
foreach( $related_customer_organizations as $customer_organization){
|
||||||
|
$ids_of_user_organizations_to_show[] = $customer_organization['customer_id'];
|
||||||
|
}
|
||||||
|
|
||||||
|
//add brokers
|
||||||
|
$brokers = wiaas_get_brokers();
|
||||||
|
|
||||||
|
foreach ($brokers as $broker_id => $broker_name) {
|
||||||
|
$ids_of_user_organizations_to_show[] = $broker_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$args = array(
|
||||||
|
'meta_key' => '_wiaas_organization_id',
|
||||||
|
'meta_value' => $ids_of_user_organizations_to_show,
|
||||||
|
'compare' => 'IN'
|
||||||
|
);
|
||||||
|
|
||||||
|
$query = new WP_User_Query($args);
|
||||||
|
|
||||||
|
$list_of_users = $query->get_results();
|
||||||
|
$contacts = [];
|
||||||
|
|
||||||
|
foreach ($list_of_users as $user){
|
||||||
|
$roles_array = wiaas_get_organization_roles($user->_wiaas_organization_id);
|
||||||
|
|
||||||
|
$roles = '';
|
||||||
|
foreach($roles_array as $role){
|
||||||
|
$roles .= translate_user_role( wp_roles()->role_names[ $role ]) . ', ';
|
||||||
|
}
|
||||||
|
|
||||||
|
$roles = substr($roles, 0, -2);
|
||||||
|
|
||||||
|
$contacts[] = array(
|
||||||
|
'name' => $user->user_nicename,
|
||||||
|
'email' => $user->user_email,
|
||||||
|
'phone' => get_the_author_meta('phone', $user->ID),
|
||||||
|
'roles' => $roles
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
require 'views/html-admin-cl-contacts-page.php';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Wiaas_Admin_CL_Contacts::init();
|
||||||
@@ -40,6 +40,7 @@ class Wiaas_Admin_CL_Packages {
|
|||||||
$plugin_url = untrailingslashit( plugins_url( '/', WIAAS_FILE ) );
|
$plugin_url = untrailingslashit( plugins_url( '/', WIAAS_FILE ) );
|
||||||
|
|
||||||
wp_enqueue_style( 'wiaas_admin_menu', $plugin_url . '/assets/css/menu.css' );
|
wp_enqueue_style( 'wiaas_admin_menu', $plugin_url . '/assets/css/menu.css' );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function add_cl_packages_menu() {
|
public static function add_cl_packages_menu() {
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<h1><?php esc_html_e( 'Contacts', 'wiaas' ); ?> </h1>
|
||||||
|
|
||||||
|
<br class="clear" />
|
||||||
|
<div >
|
||||||
|
<table id="wiaas_contacts_table" class="wiaas-contacts-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th><?php esc_html_e( 'Name', 'wiaas' ); ?></th>
|
||||||
|
<th><?php esc_html_e( 'Email', 'wiaas' ); ?></th>
|
||||||
|
<th><?php esc_html_e( 'Phone', 'wiaas' ); ?></th>
|
||||||
|
<th><?php esc_html_e( 'Roles', 'wiaas' ); ?></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody id="wiaas-contacts-tbody">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
foreach ($contacts as $contact) {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><?php esc_html_e($contact['name'] ?: '-', 'wiaas'); ?></td>
|
||||||
|
<td><a href="mailto:<?php esc_html_e($contact['email'] ?: '-', 'wiaas'); ?>"><?php esc_html_e($contact['email'] ?: '-', 'wiaas'); ?></a></td>
|
||||||
|
<td><?php esc_html_e($contact['phone'] ?: '-', 'wiaas'); ?></td>
|
||||||
|
<td><?php esc_html_e($contact['roles'] ?: '-', 'wiaas'); ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
@@ -149,25 +149,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||||||
<div class="inside">
|
<div class="inside">
|
||||||
<div class="panel-wrap">
|
<div class="panel-wrap">
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
|
|
||||||
<div class="wrap">
|
|
||||||
<div>
|
|
||||||
<i style="vertical-align: middle;" class="dashicons dashicons-info"></i>
|
|
||||||
<strong><?php esc_html_e('EPR', 'wiaas') ?></strong>
|
|
||||||
<span><?php esc_html_e('= Extra package recurrent commission', 'wiaas') ?></span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<i style="vertical-align: middle;" class="dashicons dashicons-info"></i>
|
|
||||||
<strong><?php esc_html_e('ESR') ?></strong>
|
|
||||||
<span><?php esc_html_e('= Extra services and support recurrent commission', 'wiaas') ?></span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<i style="vertical-align: middle;" class="dashicons dashicons-info"></i>
|
|
||||||
<strong><?php esc_html_e('Extra commission', 'wiaas') ?></strong>
|
|
||||||
<span><?php esc_html_e('= EPR + ESR', 'wiaas') ?></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="tabs" data-disabled="<?php echo $has_default_cl_extras ? '' : '1' ; ?>">
|
<div id="tabs" data-disabled="<?php echo $has_default_cl_extras ? '' : '1' ; ?>">
|
||||||
<ul id="tabs-navigation">
|
<ul id="tabs-navigation">
|
||||||
<li><a href="#tabs-1"><?php esc_html_e('Default prices', 'wiaas') ?></a> | </li>
|
<li><a href="#tabs-1"><?php esc_html_e('Default prices', 'wiaas') ?></a> | </li>
|
||||||
|
|||||||
@@ -20,7 +20,13 @@ $id = isset($customer_id) ? 'extras_customer_'.$customer_id : 'extras_default';
|
|||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td><?php esc_html_e('Minimal sell price', 'wiaas') ?></td>
|
<td><?php esc_html_e('Minimal sell price', 'wiaas') ?></td>
|
||||||
<td><?php esc_html_e('Extra commision', 'wiaas') ?></td>
|
<td><?php esc_html_e('Margin', 'wiaas') ?></td>
|
||||||
|
<td><?php esc_html_e('Margin services', 'wiaas') ?>
|
||||||
|
<?php echo wc_help_tip( __( 'Extra services and support recurrent commission', 'wiaas' ) );?>
|
||||||
|
</td>
|
||||||
|
<td><?php esc_html_e('Margin recurrent', 'wiaas') ?>
|
||||||
|
<?php echo wc_help_tip( __( 'Extra package recurrent commission', 'wiaas' ) );?>
|
||||||
|
</td>
|
||||||
<td><?php esc_html_e('Default price', 'wiaas') ?></td>
|
<td><?php esc_html_e('Default price', 'wiaas') ?></td>
|
||||||
<td><?php esc_html_e('Visible?', 'wiaas') ?>
|
<td><?php esc_html_e('Visible?', 'wiaas') ?>
|
||||||
<?php
|
<?php
|
||||||
@@ -81,48 +87,81 @@ $id = isset($customer_id) ? 'extras_customer_'.$customer_id : 'extras_default';
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="form-group">
|
<td class="form-group">
|
||||||
<div class="form-control">
|
<div class="form-control">
|
||||||
<label>+</label>
|
<label>+</label>
|
||||||
<input
|
<input
|
||||||
class="wiaas-cl-extra-input"
|
|
||||||
data-target="wiaas_cl_fixed_extra_<?php esc_attr_e($extra_type, 'wiaas') ?>"
|
|
||||||
data-type="fixed"
|
|
||||||
name="cl_extras[<?php esc_attr_e($extra_type, 'wiaas')?>][fixed]"
|
|
||||||
value="<?php esc_attr_e($cl_extras[$extra_type]['fixed'], 'wiaas') ?>"
|
|
||||||
type="text"
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<?php
|
|
||||||
if($configured_price['package_pay_period'] > 0) {
|
|
||||||
?>
|
|
||||||
<div class="form-control">
|
|
||||||
<label>+</label>
|
|
||||||
<input
|
|
||||||
class="wiaas-cl-extra-input"
|
class="wiaas-cl-extra-input"
|
||||||
data-target="wiaas_cl_recurrent_extra_<?php esc_attr_e($extra_type, 'wiaas') ?>"
|
data-target="wiaas_cl_fixed_extra_<?php esc_attr_e($extra_type, 'wiaas') ?>"
|
||||||
data-type="recurrent"
|
data-type="fixed"
|
||||||
name="cl_extras[<?php esc_attr_e($extra_type, 'wiaas')?>][recurrent]"
|
name="cl_extras[<?php esc_attr_e($extra_type, 'wiaas')?>][fixed]"
|
||||||
value="<?php esc_attr_e($cl_extras[$extra_type]['recurrent'], 'wiaas') ?>"
|
value="<?php esc_attr_e($cl_extras[$extra_type]['fixed'], 'wiaas') ?>"
|
||||||
type="text"
|
type="text"
|
||||||
>
|
>
|
||||||
<label><?php esc_html_e('(EPR)', 'wiaas') ?></label>
|
</div>
|
||||||
</div>
|
<div class="form-control">
|
||||||
<?php
|
<label>+</label>
|
||||||
}
|
<input
|
||||||
?>
|
class="wiaas-cl-extra-input"
|
||||||
<div class="form-control">
|
type="text"
|
||||||
<label>+</label>
|
readonly
|
||||||
<input
|
value="0"
|
||||||
class="wiaas-cl-extra-input"
|
>
|
||||||
data-target="wiaas_cl_monthly_extra_<?php esc_attr_e($extra_type, 'wiaas') ?>"
|
</div>
|
||||||
data-type="services"
|
</td>
|
||||||
name="cl_extras[<?php esc_attr_e($extra_type, 'wiaas')?>][services]"
|
|
||||||
value="<?php esc_attr_e($cl_extras[$extra_type]['services'], 'wiaas') ?>"
|
<td class="form-group">
|
||||||
type="text"
|
<div class="form-control">
|
||||||
>
|
<label>+</label>
|
||||||
<label><?php esc_html_e('(ESR)', 'wiaas') ?></label>
|
<input
|
||||||
</div>
|
class="wiaas-cl-extra-input"
|
||||||
|
type="text"
|
||||||
|
readonly
|
||||||
|
value="0"
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="form-control">
|
||||||
|
<label>+</label>
|
||||||
|
<input
|
||||||
|
class="wiaas-cl-extra-input"
|
||||||
|
data-target="wiaas_cl_monthly_extra_<?php esc_attr_e($extra_type, 'wiaas') ?>"
|
||||||
|
data-type="services"
|
||||||
|
name="cl_extras[<?php esc_attr_e($extra_type, 'wiaas')?>][services]"
|
||||||
|
value="<?php esc_attr_e($cl_extras[$extra_type]['services'], 'wiaas') ?>"
|
||||||
|
type="text"
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td class="form-group">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if($configured_price['package_pay_period'] > 0) {
|
||||||
|
?>
|
||||||
|
<div class="form-control">
|
||||||
|
<label>+</label>
|
||||||
|
<input
|
||||||
|
class="wiaas-cl-extra-input"
|
||||||
|
type="text"
|
||||||
|
readonly
|
||||||
|
value="0"
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="form-control">
|
||||||
|
<label>+</label>
|
||||||
|
<input
|
||||||
|
class="wiaas-cl-extra-input"
|
||||||
|
data-target="wiaas_cl_recurrent_extra_<?php esc_attr_e($extra_type, 'wiaas') ?>"
|
||||||
|
data-type="recurrent"
|
||||||
|
name="cl_extras[<?php esc_attr_e($extra_type, 'wiaas')?>][recurrent]"
|
||||||
|
value="<?php esc_attr_e($cl_extras[$extra_type]['recurrent'], 'wiaas') ?>"
|
||||||
|
type="text"
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div> =
|
<div> =
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ class Wiaas_Admin_CL {
|
|||||||
|
|
||||||
require_once dirname( __FILE__ ) . '/admin-cl/class-wiaas-admin-cl-customers.php';
|
require_once dirname( __FILE__ ) . '/admin-cl/class-wiaas-admin-cl-customers.php';
|
||||||
|
|
||||||
|
require_once dirname( __FILE__ ) . '/admin-cl/class-wiaas-admin-cl-contacts.php';
|
||||||
|
|
||||||
require_once dirname( __FILE__ ) . '/admin-cl/class-wiaas-admin-cl-orders.php';
|
require_once dirname( __FILE__ ) . '/admin-cl/class-wiaas-admin-cl-orders.php';
|
||||||
|
|
||||||
require_once dirname( __FILE__ ) . '/admin-cl/wiaas-admin-cl-packages-ajax.php';
|
require_once dirname( __FILE__ ) . '/admin-cl/wiaas-admin-cl-packages-ajax.php';
|
||||||
@@ -37,6 +39,7 @@ class Wiaas_Admin_CL {
|
|||||||
$plugin_url = untrailingslashit( plugins_url( '/', WIAAS_FILE ) );
|
$plugin_url = untrailingslashit( plugins_url( '/', WIAAS_FILE ) );
|
||||||
|
|
||||||
wp_enqueue_script( 'wiaas_admin_cl_packages', $plugin_url . '/assets/js/wiaas-admin-cl-packages.js' );
|
wp_enqueue_script( 'wiaas_admin_cl_packages', $plugin_url . '/assets/js/wiaas-admin-cl-packages.js' );
|
||||||
|
wp_enqueue_script('jquery-tiptip');
|
||||||
|
|
||||||
wp_enqueue_style( 'wiaas_admin_cl', $plugin_url . '/assets/css/wiaas-admin-cl.css' );
|
wp_enqueue_style( 'wiaas_admin_cl', $plugin_url . '/assets/css/wiaas-admin-cl.css' );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class Wiaas_Admin_Contacts {
|
||||||
|
|
||||||
|
public static function init() {
|
||||||
|
add_filter( 'manage_users_columns', array(__CLASS__, 'modify_users_screen_table_columns'), 999, 1 );
|
||||||
|
|
||||||
|
add_filter( 'manage_users_custom_column', array(__CLASS__, 'fill_custom_columns'), 10, 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function modify_users_screen_table_columns( $columns ) {
|
||||||
|
|
||||||
|
$show_columns = array();
|
||||||
|
|
||||||
|
$show_columns['cb'] = $columns['cb'];
|
||||||
|
$show_columns['username'] = $columns['username'];
|
||||||
|
$show_columns['name'] = $columns['name'];
|
||||||
|
$show_columns['email'] = $columns['email'];
|
||||||
|
$show_columns['phone'] = __( 'Phone', 'wiaas' );
|
||||||
|
$show_columns['role'] = $columns['role'];
|
||||||
|
$show_columns['wiaas-user-organization'] = $columns['wiaas-user-organization'];
|
||||||
|
|
||||||
|
return $show_columns;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function fill_custom_columns ($empty, $column, $user_id){
|
||||||
|
if ($column == 'phone'){
|
||||||
|
return get_the_author_meta('phone', $user_id) ?: '-';
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Wiaas_Admin_Contacts::init();
|
||||||
@@ -113,6 +113,7 @@ class Wiaas_Admin_Organization {
|
|||||||
|
|
||||||
if (! empty($organization_role)) {
|
if (! empty($organization_role)) {
|
||||||
unset($role_list['none']);
|
unset($role_list['none']);
|
||||||
|
unset($role_list['user']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ class Wiaas_Admin_Package_Pricing {
|
|||||||
add_action('woocommerce_product_options_general_product_data', array(__CLASS__, 'render_edit_prices_link'));
|
add_action('woocommerce_product_options_general_product_data', array(__CLASS__, 'render_edit_prices_link'));
|
||||||
|
|
||||||
add_filter('woocommerce_bundle_price_html', array( __CLASS__, 'get_package_price_html' ), 10, 2);
|
add_filter('woocommerce_bundle_price_html', array( __CLASS__, 'get_package_price_html' ), 10, 2);
|
||||||
|
|
||||||
|
add_filter('woocommerce_screen_ids', array(__CLASS__, 'add_package_pricing_page_to_woocommerce_screens'), 10, 1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function get_package_price_html($price_html, $package) {
|
public static function get_package_price_html($price_html, $package) {
|
||||||
@@ -116,6 +119,10 @@ class Wiaas_Admin_Package_Pricing {
|
|||||||
include 'views/html-package-pricing-page.php';
|
include 'views/html-package-pricing-page.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function add_package_pricing_page_to_woocommerce_screens( $screens ){
|
||||||
|
$screens[] = 'product_page_wiaas-package_price_editor';
|
||||||
|
return $screens;
|
||||||
|
}
|
||||||
|
|
||||||
// PRIVATE HELPERS
|
// PRIVATE HELPERS
|
||||||
|
|
||||||
|
|||||||
@@ -187,7 +187,9 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||||||
<input type="hidden" name="id" value="<?php esc_attr_e($package->get_id(), 'wiaas') ?>">
|
<input type="hidden" name="id" value="<?php esc_attr_e($package->get_id(), 'wiaas') ?>">
|
||||||
|
|
||||||
<div class="form-field">
|
<div class="form-field">
|
||||||
<label><?php esc_html_e('Max cost margin:', 'wiaas') ?></label>
|
<label><?php esc_html_e('Max cost margin :', 'wiaas') ?>
|
||||||
|
<?php echo wc_help_tip('Product deactivation limit (total cost)') ?>
|
||||||
|
</label>
|
||||||
<input
|
<input
|
||||||
id="wiaas_pricing_rules_max_cost_margin"
|
id="wiaas_pricing_rules_max_cost_margin"
|
||||||
name="wiaas_max_cost_margin"
|
name="wiaas_max_cost_margin"
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ class Wiaas_Admin {
|
|||||||
|
|
||||||
require_once dirname(__FILE__) . '/admin/class-wiaas-admin-dashboard.php';
|
require_once dirname(__FILE__) . '/admin/class-wiaas-admin-dashboard.php';
|
||||||
|
|
||||||
|
require_once dirname( __FILE__) . '/admin/class-wiaas-admin-contacts.php';
|
||||||
|
|
||||||
add_action( 'admin_enqueue_scripts', array(__CLASS__, 'enqueue_scripts'), 100 );
|
add_action( 'admin_enqueue_scripts', array(__CLASS__, 'enqueue_scripts'), 100 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,15 @@ function wiaas_get_organizations_with_role($role) {
|
|||||||
return is_array($terms) ? $terms : array();
|
return is_array($terms) ? $terms : array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves list of broker organizations in [ 'id' => 'name' ] format
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
function wiaas_get_brokers() {
|
||||||
|
return wiaas_get_organizations_with_role('administrator');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves list of commercial lead organizations in [ 'id' => 'name' ] format
|
* Retrieves list of commercial lead organizations in [ 'id' => 'name' ] format
|
||||||
*
|
*
|
||||||
@@ -134,7 +143,7 @@ function wiaas_get_organization_info($organization_id) {
|
|||||||
'description' => $organization->description,
|
'description' => $organization->description,
|
||||||
'vat_code' => get_term_meta($organization_id, '_wiaas_organization_vat', true),
|
'vat_code' => get_term_meta($organization_id, '_wiaas_organization_vat', true),
|
||||||
'phone' => get_term_meta($organization_id, '_wiaas_organization_phone', true),
|
'phone' => get_term_meta($organization_id, '_wiaas_organization_phone', true),
|
||||||
'email' => $email
|
'email' => $email
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BIN
frontend/public/static/img/WIAAS_Market_SMO_infobox.jpg
Normal file
BIN
frontend/public/static/img/WIAAS_Market_SMO_infobox.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 MiB |
BIN
frontend/public/static/img/WIAAS_Market_banner.jpg
Normal file
BIN
frontend/public/static/img/WIAAS_Market_banner.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 842 KiB |
@@ -1,4 +1,4 @@
|
|||||||
const APPLICATION_NAME = 'Co-Market';
|
const APPLICATION_NAME = 'WIAAS Market';
|
||||||
const API_VERSION = 'v2';
|
const API_VERSION = 'v2';
|
||||||
|
|
||||||
const API_SERVER_BASE = process.env.REACT_APP_API_URL;
|
const API_SERVER_BASE = process.env.REACT_APP_API_URL;
|
||||||
|
|||||||
@@ -28,12 +28,12 @@ class CoMarketPackagesContainer extends Component {
|
|||||||
<Row>
|
<Row>
|
||||||
<Col xl="8" lg="8" md="8" sm="12" xs="12">
|
<Col xl="8" lg="8" md="8" sm="12" xs="12">
|
||||||
<WiaasBox id="co-market-big-commercial">
|
<WiaasBox id="co-market-big-commercial">
|
||||||
<img className="description-photo" src="https://res.cloudinary.com/co-market/image/upload/v1524472688/Co-Market/CoMarketStartsida_MAIN.jpg" alt="big-commercial"/>
|
<img className="description-photo" src="/static/img/WIAAS_Market_banner.jpg" alt="big-commercial"/>
|
||||||
</WiaasBox>
|
</WiaasBox>
|
||||||
</Col>
|
</Col>
|
||||||
<Col xl="4" lg="4" md="4" sm="12" xs="12">
|
<Col xl="4" lg="4" md="4" sm="12" xs="12">
|
||||||
<WiaasBox id="co-market-commercials">
|
<WiaasBox id="co-market-commercials">
|
||||||
<img alt="wiaas commercial" src="https://res.cloudinary.com/co-market/image/upload/v1524472688/Co-Market/CoMarketStartsida_OFFERCoor.jpg" className="commercial-photo"/>
|
<img alt="wiaas commercial" src="/static/img/WIAAS_Market_SMO_infobox.jpg" className="commercial-photo"/>
|
||||||
</WiaasBox>
|
</WiaasBox>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|||||||
@@ -131,7 +131,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#co-market-big-commercial{
|
#co-market-big-commercial{
|
||||||
background: $whiteColor;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
.ricoh-text {
|
.ricoh-text {
|
||||||
@@ -144,13 +143,24 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#co-market-commercials {
|
#co-market-commercials {
|
||||||
background: $whiteColor;
|
|
||||||
|
|
||||||
.commercial-photo {
|
.commercial-photo {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
|
||||||
|
#co-market-commercials {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.commercial-photo {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#co-market-catalog {
|
#co-market-catalog {
|
||||||
.filter-name {
|
.filter-name {
|
||||||
margin-top: 0.4rem;
|
margin-top: 0.4rem;
|
||||||
|
|||||||
Reference in New Issue
Block a user