[UPD] fix employe image bug (🐞️) and change BGs colors (💻️) on classic dashboard

This commit is contained in:
AHIDev 2024-09-15 13:25:09 +04:00
parent f831987535
commit c38a994455
4 changed files with 12 additions and 12 deletions

View File

@ -148,7 +148,7 @@
}
.card2 .card-container .card-header {
background: linear-gradient(270deg, rgb(156, 167, 179, 1) 0%, rgb(96, 121, 146, 1) 75%);
background: linear-gradient(270deg, #0e3e34 0%, #00887e 75%);
height: 50px;
vertical-align: middle;
padding-left: 10px!important;
@ -218,7 +218,7 @@
.card2 .card-container .card-body table tr td:last-child div {
/* background: #003056; */
background: linear-gradient(270deg, rgb(156, 167, 179, 1) 0%, rgb(96, 121, 146, 1) 75%); height: 26px;
background: linear-gradient(270deg, #0e3e34 0%, #00887e 75%); height: 26px;
text-align: center;
width: 26px;
border-radius: 50%;
@ -326,7 +326,7 @@
}
.card3 .card-body .box-2 {
background: linear-gradient(270deg, rgb(156, 167, 179, 1) 0%, rgb(96, 121, 146, 1) 75%); /* background: #003056; */
background: linear-gradient(270deg, #0e3e34 0%, #00887e 75%); /* background: #003056; */
transition: all .4s;
cursor: pointer;
line-height: 50px;
@ -357,7 +357,7 @@
}
.card3 .card-body .box-2:hover {
background: #468bd2;
background: #0c483e;
}
.card3 .card-body .box-2:hover i {

View File

@ -18,7 +18,7 @@
}
.dashboard-container .dashboard-header .dashboard-user-data-section {
background: linear-gradient(270deg, rgb(156, 167, 179, 1) 0%, rgb(96, 121, 146, 1) 75%); /* background: #194b8d; */
background: linear-gradient(270deg, #0e3e34 0%, #00887e 75%); /* background: #194b8d; */
height: 280px;
display: flex;
align-items: center;
@ -658,7 +658,7 @@
height: 7px;
border-radius: 50%;
/* background: #003056; */
background: linear-gradient(270deg, rgb(156, 167, 179, 1) 0%, rgb(96, 121, 146, 1) 75%); margin: -4px 0 0 -4px;
background: linear-gradient(270deg, #0e3e34 0%, #00887e 75%); margin: -4px 0 0 -4px;
}
.lds-roller div:nth-child(1) {

View File

@ -35,14 +35,14 @@ odoo.define('system_dashboard_classic.dashboard', function(require) {
$('.fn-id,.fn-department,.fn-job').show();
// SET EMPLOYEE DATA
if (result.employee[0][0] !== undefined) {
$(".img-box").css('background-image', 'url(data:image/png;base64,' + result.employee[0][0].image_medium + ')')
$(".img-box").css('background-image', 'url(data:image/png;base64,' + result.employee[0][0].image_128 + ')')
$("p.fn-section").html(result.employee[0][0].name);
$("p.fn-id").html(result.employee[0][0].emp_no);
if (result.employee[0][0].job_id.length !== 0) {
$("p.fn-job").html(result.employee[0][0].job_id[1]);
}
} else {
$(".img-box").css('background-image', 'url(data:image/png;base64,' + result.user[0][0].image_medium + ')')
$(".img-box").css('background-image', 'url(data:image/png;base64,' + result.user[0][0].image_128 + ')')
$("p.fn-section").html(result.user[0][0].display_name);
$("p.fn-id").html(result.user[0][0].id);
}
@ -135,7 +135,7 @@ odoo.define('system_dashboard_classic.dashboard', function(require) {
} else {
if (result.user !== undefined && result.user !== '' && result.user[0].length !== 0) {
// SET EMPLOYEE DATA
$(".img-box").css('background-image', 'url(data:image/png;base64,' + result.user[0][0].image_medium + ')')
$(".img-box").css('background-image', 'url(data:image/png;base64,' + result.user[0][0].image_128 + ')')
$("p.fn-section").html(result.user[0][0].name);
$("p.fn-id").html('ID: ' + result.user[0][0].id);
}

View File

@ -34,14 +34,14 @@ odoo.define('system_dashboard_classic.dashboard_self_services', function(require
$('.fn-id,.fn-department,.fn-job').show();
// SET EMPLOYEE DATA
if (result.employee[0][0] !== undefined) {
$(".img-box").css('background-image', 'url(data:image/png;base64,' + result.employee[0][0].image_medium + ')')
$(".img-box").css('background-image', 'url(data:image/png;base64,' + result.employee[0][0].image_128 + ')')
$("p.fn-section").html(result.employee[0][0].name);
$("p.fn-id").html(result.employee[0][0].emp_no);
if (result.employee[0][0].job_id.length !== 0) {
$("p.fn-job").html(result.employee[0][0].job_id[1]);
}
} else {
$(".img-box").css('background-image', 'url(data:image/png;base64,' + result.user[0][0].image_medium + ')')
$(".img-box").css('background-image', 'url(data:image/png;base64,' + result.user[0][0].image_128 + ')')
$("p.fn-section").html(result.user[0][0].display_name);
$("p.fn-id").html(result.user[0][0].id);
}
@ -140,7 +140,7 @@ odoo.define('system_dashboard_classic.dashboard_self_services', function(require
} else {
if (result.user !== undefined && result.user !== '' && result.user[0].length !== 0) {
// SET EMPLOYEE DATA
$(".img-box").css('background-image', 'url(data:image/png;base64,' + result.user[0][0].image_medium + ')')
$(".img-box").css('background-image', 'url(data:image/png;base64,' + result.user[0][0].image_128 + ')')
$("p.fn-section").html(result.user[0][0].name);
$("p.fn-id").html('ID: ' + result.user[0][0].id);
}