Commit 9a8d369b by Damien Moulard

display partner name in home & my info + style fixes

parent 46c72a44
......@@ -7,6 +7,7 @@
#my_info_content {
display: flex;
flex-direction: column;
margin: 2rem 0;
}
.my_info_line {
......
......@@ -13,6 +13,12 @@ body {
flex-wrap: wrap;
}
@media screen and (max-width: 768px) {
.tiles_container {
flex-direction: column;
}
}
.tile {
flex: 1 0 45%;
display: flex;
......@@ -39,15 +45,10 @@ body {
justify-content: center;
align-items: center;
border-bottom: 1px solid #e7e9ed;
font-size: 2.7rem;
font-size: 2.4rem;
padding: 2rem 0;
width: 80%;
}
@media screen and (max-width: 768px) {
.tile_title {
font-size: 2.5rem;
}
}
.tile_content {
position: relative;
......@@ -109,6 +110,10 @@ body {
position: relative;
}
#home_tile_my_info .tile_content {
margin: 2rem 0;
}
.tile_icon {
margin-right: 15px;
color: #00a573;
......@@ -118,11 +123,11 @@ body {
height: 100%;
flex-direction: column;
align-items: center;
font-size: 2.2rem;
font-size: 2rem;
}
@media screen and (max-width: 768px) {
#home_tile_my_info .tile_content {
font-size: 1.9rem;
font-size: 1.7rem;
}
}
......@@ -130,6 +135,10 @@ body {
font-weight: bold;
}
.member_status_text_container {
margin-bottom: 5px;
}
#member_status_action {
margin-bottom: 20px;
}
......
......@@ -23,14 +23,14 @@ function init_my_info() {
}
if (partner_data.mobile !== "" && partner_data.mobile !== false && partner_data.mobile !== null) {
if (partner_data.mobile !== "" && partner_data.mobile !== "False" && partner_data.mobile !== false && partner_data.mobile !== null) {
$(".member_mobile")
.append(partner_data.mobile);
} else {
$(".member_mobile").hide();
}
if (partner_data.phone !== "" && partner_data.phone !== false && partner_data.phone !== null) {
if (partner_data.phone !== "" && partner_data.phone !== "False" && partner_data.phone !== false && partner_data.phone !== null) {
$(".member_phone")
.append(partner_data.phone);
} else {
......
......@@ -147,10 +147,15 @@ function prepare_shift_line_template(date_begin) {
function init_my_info_data() {
$(".choose_makeups").off();
$(".unsuscribed_form_link").off();
console.log(partner_data);
$(".member_shift_name").text(partner_data.regular_shift_name);
console.log(partner_data);
let pns = partner_data.name.split(" - ");
let name = pns.length > 1 ? pns[1] : pns[0];
// Status related
$(".member_name").text(name);
$(".member_status")
.text(possible_cooperative_state[partner_data.cooperative_state])
.addClass("member_status_" + partner_data.cooperative_state);
......
......@@ -6,10 +6,11 @@
<div class="tile high_tile" id="home_tile_my_info">
<div class="tile_title">
<i class="fas fa-user tile_icon"></i>
Mes Infos
<span class="member_info member_name"></span>
</div>
<div class="tile_content">
<p>Mon statut : <span class="member_info member_status"></span></p>
{# <p><span class="member_info member_name"></span></p> #}
<p class="member_status_text_container">Mon statut : <span class="member_info member_status"></span></p>
<div class="delay_date_stop_container">
( jusqu'au <span class="delay_date_stop"></span> )
</div>
......
......@@ -4,6 +4,10 @@
</div>
<div class="tiles_container">
<div class="tile full_width_tile" id="my_info_area">
<div class="tile_title">
<i class="fas fa-user tile_icon"></i>
<span class="member_info member_name"></span>
</div>
<div class="tile_content" id="my_info_content">
<div class="my_info_line">
<div class="my_info_line_left">
......
......@@ -15,7 +15,7 @@
</div>
<div class="tile full_width_tile" id="history_area">
<div class="tile_title">
Historique des mouvements de points
Historique de mes services
</div>
<div class="loading-history">
<i class="fas fa-spinner fa-spin fa-lg"></i>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment