enhance_kanban
This commit is contained in:
parent
925d0becc6
commit
d6b405bfca
|
|
@ -43,63 +43,291 @@
|
|||
<field name="name">grant.benefit.kanban</field>
|
||||
<field name="model">grant.benefit</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban create="0">
|
||||
<kanban create="0" class="o_kanban_benefit_families">
|
||||
<field name="name"/>
|
||||
<field name="action_type"/>
|
||||
<field name="state"/>
|
||||
<field name="code"/>
|
||||
<field name="benefit_category_id"/>
|
||||
<field name="father_name"/>
|
||||
<field name="father_family_name"/>
|
||||
<field name="mother_name"/>
|
||||
<field name="mother_family_name"/>
|
||||
<field name="benefit_member_count"/>
|
||||
<field name="member_income"/>
|
||||
<field name="researcher_id"/>
|
||||
<field name="branch_custom_id"/>
|
||||
<field name="last_visit_date"/>
|
||||
<field name="currency_id"/>
|
||||
<field name="property_type"/>
|
||||
<field name="total_service_requests"/>
|
||||
<field name="city_id"/>
|
||||
<field name="non_member_count"/>
|
||||
<field name="create_date"/>
|
||||
<field name="district_id"/>
|
||||
<field name="mobile"/>
|
||||
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div t-attf-class="oe_kanban_global_click">
|
||||
<div class="oe_kanban_details">
|
||||
<strong class="o_kanban_record_title">
|
||||
<strong>: Family Name
|
||||
<field name="name"/>
|
||||
</strong>
|
||||
</strong>
|
||||
<!-- <div>-->
|
||||
<!-- <strong>صلة القرابة:-->
|
||||
<!-- <field name="responsible"/>-->
|
||||
<!-- </strong>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div>-->
|
||||
<!-- <strong>الوحدة السكنية:-->
|
||||
<!-- <field name="housing_id"/>-->
|
||||
<!-- </strong>-->
|
||||
<!-- </div>-->
|
||||
<div t-attf-class="oe_kanban_global_click #{record.benefit_category_id.value == 'غير مستفيدة' ? 'inactive_family_card' : ''}"
|
||||
t-attf-style="background: linear-gradient(135deg, #{record.benefit_category_id.value == 'غير مستفيدة' ? '#fff5f5' : '#ffffff'} 0%, #{record.benefit_category_id.value == 'غير مستفيدة' ? '#ffe0e0' : '#f8f9fa'} 100%); border: 1px solid #{record.benefit_category_id.value == 'غير مستفيدة' ? '#dc3545' : '#dee2e6'}; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); transition: all 0.3s ease; margin-bottom: 15px; overflow: hidden; position: relative; min-height: 380px; opacity: #{record.benefit_category_id.value == 'غير مستفيدة' ? '0.85' : '1'};">
|
||||
<!-- Header -->
|
||||
<div style="background: linear-gradient(135deg, #05887e 0%, #036d64 100%); color: white; padding: 8px 10px 90px 10px; font-weight: 700; position: relative;">
|
||||
<!-- كود الأسرة -->
|
||||
<div style="position: absolute; top: 8px; right: 10px; background: rgba(255,255,255,0.95); color: #198754; padding: 6px 10px; border-radius: 6px; font-size: 13px; font-weight: 800; box-shadow: 0 2px 4px rgba(0,0,0,0.1); z-index: 1;">
|
||||
<field name="code"/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<strong>الأب:
|
||||
<field name="father_name"/>
|
||||
</strong>
|
||||
<!-- فئة الأسرة -->
|
||||
<t t-if="record.benefit_category_id.raw_value">
|
||||
<div style="position: absolute; top: 8px; left: 10px; background: rgba(255,255,255,0.95); padding: 5px 10px; border-radius: 6px; font-size: 11px; font-weight: 800; box-shadow: 0 2px 4px rgba(0,0,0,0.1); z-index: 1;">
|
||||
<i t-attf-class="fa #{record.benefit_category_id.value == 'غير مستفيدة' ? 'fa-times-circle' : 'fa-check-circle'}"
|
||||
t-attf-style="color: #{record.benefit_category_id.value == 'غير مستفيدة' ? '#dc3545' : '#198754'}; margin-left: 4px; font-size: 13px;"/>
|
||||
<span t-attf-style="color: #{record.benefit_category_id.value == 'غير مستفيدة' ? '#dc3545' : '#198754'};">
|
||||
<field name="benefit_category_id"/>
|
||||
</span>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<!-- الصف الثاني: الفرع (يمين) + حالة الملف (يسار) -->
|
||||
<div style="position: absolute; top: 43px; right: 10px; left: 10px; display: flex; justify-content: space-between; align-items: center; z-index: 1;">
|
||||
<!-- الفرع -->
|
||||
<div style="font-size: 10px; opacity: 0.85; text-align: right;">
|
||||
<span style="display: inline-block;">الفرع: </span>
|
||||
<span style="margin-right: 4px;">
|
||||
<t t-if="record.branch_custom_id.raw_value">
|
||||
<field name="branch_custom_id"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
--
|
||||
</t>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- حالة الملف -->
|
||||
<div>
|
||||
<field name="state" widget="badge"
|
||||
decoration-success="state in ['first_approve', 'second_approve']"
|
||||
decoration-muted="state in ['draft','new']"
|
||||
decoration-danger="state in ['refused','suspended_second_approve','black_list']"
|
||||
decoration-warning="state in ['first_refusal','waiting_approve']"
|
||||
decoration-info="state in ['complete_info']"/>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<strong>الأم:
|
||||
<field name="mother_name"/>
|
||||
</strong>
|
||||
|
||||
<!-- الصف الثالث: تاريخ التسجيل (يمين) + نوع الإجراء (يسار) -->
|
||||
<div style="position: absolute; top: 68px; right: 10px; left: 10px; display: flex; justify-content: space-between; align-items: center; z-index: 1;">
|
||||
<!-- تاريخ التسجيل -->
|
||||
<div style="font-size: 10px; opacity: 0.85; text-align: right;">
|
||||
<span style="display: inline-block;">تاريخ التسجيل: </span>
|
||||
<span style="margin-right: 4px;"><field name="create_date" widget="date"/></span>
|
||||
</div>
|
||||
|
||||
<!-- نوع الإجراء -->
|
||||
<div>
|
||||
<field name="action_type" widget="badge"
|
||||
decoration-muted="action_type in ['new']"
|
||||
decoration-info="action_type in ['edit_info']"
|
||||
decoration-success="action_type in ['approved']"
|
||||
decoration-danger="action_type in ['suspended']"
|
||||
decoration-warning="action_type in ['exception']"/>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<strong>الكود:
|
||||
<field name="code"/>
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
<!-- Content -->
|
||||
<div style="padding: 10px; background: white;">
|
||||
|
||||
<!-- الوالدين -->
|
||||
<div style="margin-bottom: 14px;">
|
||||
<div style="display: flex; margin-bottom: 8px;">
|
||||
<div style="flex: 1; margin-left: 8px;">
|
||||
<div style="display: flex; align-items: center; margin-bottom: 4px;">
|
||||
<i class="fa fa-male" style="color: #198754; margin-left: 4px; font-size: 14px;"/>
|
||||
<span style="color: #495057; font-size: 12px; font-weight: 700;">الأب: </span>
|
||||
</div>
|
||||
<div style="font-weight: 600; font-size: 13px; color: #212529; line-height: 1.2; max-height: 30px; overflow: hidden;">
|
||||
<t t-if="record.father_name.raw_value">
|
||||
<t t-if="record.father_name.raw_value.length > 15">
|
||||
<span t-esc="record.father_name.raw_value.substring(0, 15) + '...'" style="display: block;"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<field name="father_name"/>
|
||||
</t>
|
||||
<span style="font-size: 12px; color: #6c757d;">
|
||||
<t t-if="record.father_family_name.raw_value">
|
||||
<field name="father_family_name"/>
|
||||
</t>
|
||||
</span>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span style="color: #6c757d; font-size: 13px;">--</span>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
<div style="flex: 1;">
|
||||
<div style="display: flex; align-items: center; margin-bottom: 4px;">
|
||||
<i class="fa fa-female" style="color: #e91e63; margin-left: 4px; font-size: 14px;"/>
|
||||
<span style="color: #495057; font-size: 12px; font-weight: 700;">الأم: </span>
|
||||
</div>
|
||||
<div style="font-weight: 600; font-size: 13px; color: #212529; line-height: 1.2; max-height: 30px; overflow: hidden;">
|
||||
<t t-if="record.mother_name.raw_value">
|
||||
<t t-if="record.mother_name.raw_value.length > 15">
|
||||
<span t-esc="record.mother_name.raw_value.substring(0, 15) + '...'" style="display: block;"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<field name="mother_name"/>
|
||||
</t>
|
||||
<span style="font-size: 12px; color: #6c757d;">
|
||||
<t t-if="record.mother_family_name.raw_value">
|
||||
<field name="mother_family_name"/>
|
||||
</t>
|
||||
</span>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span style="color: #6c757d; font-size: 13px;">--</span>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<strong>الحالة:
|
||||
<field name="state" widget="badge"
|
||||
decoration-success="state in ['first_approve', 'second_approve']"
|
||||
decoration-muted="state in ['draft','new']"
|
||||
decoration-danger="state in ['refused','suspended_second_approve']"
|
||||
decoration-warning="state in ['first_refusal','waiting_approve']"
|
||||
decoration-info="state not in ('waiting_approve','draft','new','first_approve', 'second_approve','first_refusal','refused','suspended_second_approve')"/>
|
||||
</strong>
|
||||
|
||||
<!-- إحصائيات مهمة -->
|
||||
<div style="display: flex; margin-bottom: 10px; gap: 8px;">
|
||||
<a name="action_view_benefit_members" type="object" style="flex: 1; text-align: center; padding: 5px 6px; background: linear-gradient(135deg, #f1f8e9 0%, #dcedc8 100%); border-radius: 8px; border: 2px solid #689f38; display: block; text-decoration: none; cursor: pointer; transition: all 0.2s ease; box-shadow: 0 2px 4px rgba(104,159,56,0.2);" onmouseover="this.style.transform='translateY(-2px)'; this.style.boxShadow='0 4px 8px rgba(245,124,0,0.3)'; this.style.background='linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%)'" onmouseout="this.style.transform='translateY(0)'; this.style.boxShadow='0 2px 4px rgba(104,159,56,0.2)'; this.style.background='linear-gradient(135deg, #f1f8e9 0%, #dcedc8 100%)'">
|
||||
<i class="fa fa-users" style="color: #198754; font-size: 16px; margin-bottom: 6px; display: block;"/>
|
||||
<div style="font-size: 11px; color: #198754; font-weight: 700; text-transform: uppercase; margin-bottom: 4px; line-height: 1.1;">
|
||||
<div>أفراد</div>
|
||||
<div>مستفيدة</div>
|
||||
</div>
|
||||
<div style="font-weight: 800; font-size: 14px; color: #198754;">
|
||||
<t t-if="(record.benefit_member_count.raw_value || 0) > 0 or (record.non_member_count.raw_value || 0) > 0">
|
||||
<span style="color: #198754; font-weight: 900; text-decoration: underline;"><t t-esc="(record.benefit_member_count.raw_value || 0)"/></span> من <t t-esc="(record.benefit_member_count.raw_value || 0) + (record.non_member_count.raw_value || 0)"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
--
|
||||
</t>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a name="action_open_related_move_line_records" type="object" style="flex: 1; text-align: center; padding: 5px 6px; background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%); border-radius: 8px; border: 2px solid #6b7280; display: block; text-decoration: none; cursor: pointer; transition: all 0.2s ease; box-shadow: 0 2px 4px rgba(245,124,0,0.2);" onmouseover="this.style.transform='translateY(-2px)'; this.style.boxShadow='0 4px 8px rgba(245,124,0,0.3)'; this.style.background='linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%)'" onmouseout="this.style.transform='translateY(0)'; this.style.boxShadow='0 2px 4px rgba(245,124,0,0.2)'; this.style.background='linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%)'">
|
||||
<i class="fa fa-money" style="color: #388e3c; font-size: 16px; margin-bottom: 6px; display: block;"/>
|
||||
<div style="font-size: 11px; color: #388e3c; font-weight: 700; text-transform: uppercase; margin-bottom: 4px; line-height: 1.1;">
|
||||
<div>المصروف</div>
|
||||
<div>الشهري</div>
|
||||
</div>
|
||||
<div style="font-weight: 800; font-size: 11px; color: #388e3c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">
|
||||
<t t-if="record.total_move_lines.raw_value and record.total_move_lines.raw_value > 0">
|
||||
<field name="total_move_lines" widget="monetary" options="{'currency_field': 'currency_id', 'field_digits': [16,0]}"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
--
|
||||
</t>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a name="action_open_related_service_requests" type="object" style="flex: 1; text-align: center; padding: 5px 6px; background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%); border-radius: 8px; border: 2px solid #6b7280; display: block; text-decoration: none; cursor: pointer; transition: all 0.2s ease; box-shadow: 0 2px 4px rgba(245,124,0,0.2);" onmouseover="this.style.transform='translateY(-2px)'; this.style.boxShadow='0 4px 8px rgba(245,124,0,0.3)'; this.style.background='linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%)'" onmouseout="this.style.transform='translateY(0)'; this.style.boxShadow='0 2px 4px rgba(245,124,0,0.2)'; this.style.background='linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%)'">
|
||||
<i class="fa fa-file-text" style="color: #f57c00; font-size: 16px; margin-bottom: 6px; display: block;"/>
|
||||
<div style="font-size: 11px; color: #f57c00; font-weight: 700; text-transform: uppercase; margin-bottom: 4px; line-height: 1.1;">
|
||||
<div>طلبات</div>
|
||||
<div>الخدمة</div>
|
||||
</div>
|
||||
<div style="font-weight: 800; font-size: 14px; color: #f57c00;">
|
||||
<t t-if="record.total_service_requests.raw_value and record.total_service_requests.raw_value > 0">
|
||||
<field name="total_service_requests"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
--
|
||||
</t>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<strong>نوع الاجراء:
|
||||
<field name="action_type" widget="badge"
|
||||
decoration-muted="action_type in ['new']"
|
||||
decoration-info="action_type in ['edit_info']"
|
||||
decoration-success="action_type in ['approved']"
|
||||
decoration-danger="action_type in ['suspended']"
|
||||
decoration-warning="action_type in ['exception']"/>
|
||||
</strong>
|
||||
|
||||
<div style="margin-bottom: 4px;">
|
||||
<div style="display: flex; justify-content: space-between; margin-bottom: 6px;">
|
||||
<div style="display: flex; align-items: center; font-size: 12px;">
|
||||
<i class="fa fa-map-marker" style="color: #dc3545; margin-left: 4px; font-size: 12px;"/>
|
||||
<span style="font-weight: 600; color: #495057;">المدينة: </span>
|
||||
<span style="color: #212529; margin-right: 6px; font-weight: 500;">
|
||||
<t t-if="record.city_id.raw_value">
|
||||
<field name="city_id"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span style="color: #6c757d;">--</span>
|
||||
</t>
|
||||
</span>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; font-size: 12px;">
|
||||
<i class="fa fa-location-arrow" style="color: #6f42c1; margin-left: 4px; font-size: 12px;"/>
|
||||
<span style="font-weight: 600; color: #495057;">الحي: </span>
|
||||
<span style="color: #212529; margin-right: 6px; font-weight: 500;">
|
||||
<t t-if="record.district_id.raw_value">
|
||||
<field name="district_id"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span style="color: #6c757d;">--</span>
|
||||
</t>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: space-between; margin-bottom: 6px;">
|
||||
<div style="display: flex; align-items: center; font-size: 12px;">
|
||||
<i class="fa fa-phone" style="color: #17a2b8; margin-left: 4px; font-size: 12px;"/>
|
||||
<span style="font-weight: 600; color: #495057;">جوال: </span>
|
||||
<span style="color: #212529; margin-right: 6px; font-weight: 500;">
|
||||
<t t-if="record.mobile.raw_value and record.mobile.raw_value.substr(0,3) === '966'">
|
||||
0<t t-esc="record.mobile.raw_value.substr(3)"/>
|
||||
</t>
|
||||
<t t-elif="record.mobile.raw_value">
|
||||
<field name="mobile"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span style="color: #6c757d;">--</span>
|
||||
</t>
|
||||
</span>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; font-size: 12px;">
|
||||
<i class="fa fa-money" style="color: #388e3c; margin-left: 4px; font-size: 12px;"/>
|
||||
<span style="font-weight: 600; color: #495057;">الدخل: </span>
|
||||
<span style="color: #212529; margin-right: 6px; font-weight: 500;">
|
||||
<t t-if="record.member_income.raw_value and record.member_income.raw_value > 0">
|
||||
<field name="member_income" widget="monetary" options="{'currency_field': 'currency_id', 'field_digits': [16,0]}"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span style="color: #6c757d;">--</span>
|
||||
</t>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; align-items: center; font-size: 12px;">
|
||||
<i class="fa fa-user-circle" style="color: #198754; margin-left: 4px; font-size: 12px;"/>
|
||||
<span style="font-weight: 600; color: #495057;">الأخصائى: </span>
|
||||
<span style="color: #212529; margin-right: 6px; font-weight: 500;">
|
||||
<t t-if="record.researcher_id.raw_value">
|
||||
<field name="researcher_id"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span style="color: #6c757d;">--</span>
|
||||
</t>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); padding: 10px 15px; border-top: 2px solid #198754; text-align: right;">
|
||||
<div style="display: inline-flex; align-items: center; font-size: 11px;">
|
||||
<i class="fa fa-calendar" style="color: #6c757d; margin-left: 4px;"/>
|
||||
<span style="font-weight: 600; color: #495057; margin-left: 4px;">آخر زيارة: </span>
|
||||
<span style="color: #212529; font-weight: 500;">
|
||||
<t t-if="record.last_visit_date.raw_value">
|
||||
<field name="last_visit_date"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span style="color: #6c757d;">--</span>
|
||||
</t>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -300,12 +300,317 @@
|
|||
<field name="name">family.member.kanban</field>
|
||||
<field name="model">family.member</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban create="0">
|
||||
<kanban create="0" class="o_kanban_family_members">
|
||||
<field name="name"/>
|
||||
<field name="age"/>
|
||||
<field name="age_status"/>
|
||||
<field name="gender"/>
|
||||
<field name="relationn"/>
|
||||
<field name="relation"/>
|
||||
<field name="member_status"/>
|
||||
<field name="is_work"/>
|
||||
<field name="member_income"/>
|
||||
<field name="education_status"/>
|
||||
<field name="member_location"/>
|
||||
<field name="member_phone"/>
|
||||
<field name="benefit_id"/>
|
||||
<field name="member_id_number"/>
|
||||
<field name="state"/>
|
||||
<field name="total_member_service_requests"/>
|
||||
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div t-attf-class="oe_kanban_global_click">
|
||||
<div class="oe_kanban_details">
|
||||
<div t-attf-class="oe_kanban_global_click #{record.member_status.raw_value == 'non_benefit' ? 'non_benefit_member_card' : ''}"
|
||||
t-attf-style="background: linear-gradient(135deg, #{record.member_status.raw_value == 'non_benefit' ? '#fff5f5' : '#ffffff'} 0%, #{record.member_status.raw_value == 'non_benefit' ? '#ffe0e0' : '#f8f9fa'} 100%); border: 2px solid #{record.member_status.raw_value == 'non_benefit' ? '#dc3545' : '#198754'}; border-radius: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); transition: all 0.3s ease; margin-bottom: 15px; overflow: hidden; position: relative; min-height: 300px; opacity: #{record.member_status.raw_value == 'non_benefit' ? '0.85' : '1'};">
|
||||
|
||||
<!-- Minor Badge (only if minor) -->
|
||||
<t t-if="record.age_status.value == 'minor'">
|
||||
<div style="position: absolute; top: 8px; left: 8px; background: linear-gradient(45deg, #ff9800 0%, #ffc107 100%); color: white; padding: 4px 10px; border-radius: 0 15px 15px 0; font-size: 10px; font-weight: 800; z-index: 2; box-shadow: 0 2px 4px rgba(255,152,0,0.3);">
|
||||
<i class="fa fa-child" style="margin-left: 3px; font-size: 11px;"/>
|
||||
قاصر
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<!-- Header with relationship-based colors -->
|
||||
<!-- Header with relationship-based colors -->
|
||||
<div t-attf-style="
|
||||
background: linear-gradient(135deg,
|
||||
#{record.relationn.value and record.relationn.value.indexOf('الابن') !== -1
|
||||
? '#8CB5DB'
|
||||
: record.relationn.value and record.relationn.value.indexOf('ابنة') !== -1
|
||||
? '#F4AFC8'
|
||||
: '#C7B7E8'} 0%,
|
||||
#{record.relationn.value and record.relationn.value.indexOf('الابن') !== -1
|
||||
? '#5E97C7'
|
||||
: record.relationn.value and record.relationn.value.indexOf('ابنة') !== -1
|
||||
? '#DD7FA8'
|
||||
: '#9D87D3'} 100%
|
||||
);
|
||||
color: white;
|
||||
padding: 12px 15px 70px 15px;
|
||||
font-weight: 700;
|
||||
position: relative;">
|
||||
|
||||
<!-- Row 1: Member ID Number (right) + Member Status (left) -->
|
||||
<div style="position: absolute; top: 12px; right: 15px; left: 15px; display: flex; justify-content: space-between; align-items: center; z-index: 1;">
|
||||
|
||||
<!-- Member ID Number -->
|
||||
<div style="background: rgba(255,255,255,0.97); padding: 6px 12px; border-radius: 8px; font-size: 11px; font-weight: 800; box-shadow: 0 2px 4px rgba(0,0,0,0.1);">
|
||||
<i class="fa fa-id-card" style="color: #666; margin-left: 4px; font-size: 12px;"/>
|
||||
<span style="color: #333;">
|
||||
<t t-if="record.member_id_number.raw_value">
|
||||
<field name="member_id_number"/>
|
||||
</t>
|
||||
<t t-else="">--</t>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Member Status -->
|
||||
<div>
|
||||
<t t-if="record.member_status.raw_value == 'non_benefit'">
|
||||
<div style="background: rgba(255,255,255,0.97); color: #dc3545; padding: 5px 10px; border-radius: 6px; font-size: 11px; font-weight: 800; box-shadow: 0 2px 4px rgba(0,0,0,0.1);">
|
||||
<i class="fa fa-times-circle" style="color: #dc3545; margin-left: 4px; font-size: 13px;"/>
|
||||
<span>غير مستفيد</span>
|
||||
</div>
|
||||
</t>
|
||||
<t t-elif="record.member_status.raw_value == 'benefit'">
|
||||
<div style="background: rgba(255,255,255,0.97); color: #198754; padding: 5px 10px; border-radius: 6px; font-size: 11px; font-weight: 800; box-shadow: 0 2px 4px rgba(0,0,0,0.1);">
|
||||
<i class="fa fa-check-circle" style="color: #198754; margin-left: 4px; font-size: 13px;"/>
|
||||
<span>مستفيد</span>
|
||||
</div>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<div style="background: rgba(255,255,255,0.97); color: #6c757d; padding: 5px 10px; border-radius: 6px; font-size: 11px; font-weight: 800; box-shadow: 0 2px 4px rgba(0,0,0,0.1);">
|
||||
<i class="fa fa-question-circle" style="color: #6c757d; margin-left: 4px; font-size: 13px;"/>
|
||||
<span>غير محدد</span>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Row 2: Relationship Type (right) + Age (left) -->
|
||||
<div style="position: absolute; top: 45px; right: 15px; left: 15px; display: flex; justify-content: space-between; align-items: center; z-index: 1;">
|
||||
|
||||
<!-- Relationship Type -->
|
||||
<div style="background: rgba(255,255,255,0.97); padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 800; box-shadow: 0 2px 4px rgba(0,0,0,0.1);">
|
||||
|
||||
<!-- Icon -->
|
||||
<i t-attf-class="fa #{record.relationn.value and record.relationn.value.indexOf('الابن') !== -1 ? 'fa-male' : 'fa-female'}"
|
||||
t-attf-style="color: #{record.relationn.value and record.relationn.value.indexOf('الابن') !== -1
|
||||
? '#5E97C7'
|
||||
: record.relationn.value and record.relationn.value.indexOf('ابنة') !== -1
|
||||
? '#DD7FA8'
|
||||
: '#9D87D3'};
|
||||
margin-left: 4px; font-size: 14px;"/>
|
||||
|
||||
<!-- Label -->
|
||||
<span t-attf-style="color: #{record.relationn.value and record.relationn.value.indexOf('الابن') !== -1
|
||||
? '#5E97C7'
|
||||
: record.relationn.value and record.relationn.value.indexOf('ابنة') !== -1
|
||||
? '#DD7FA8'
|
||||
: '#9D87D3'};">
|
||||
<t t-if="record.relationn.raw_value"><field name="relationn"/></t>
|
||||
<t t-else="">غير محدد</t>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Age -->
|
||||
<div style="font-size: 12px; opacity: 0.9;">
|
||||
<i class="fa fa-birthday-cake" style="margin-left: 4px;"/>
|
||||
<span>العمر: </span>
|
||||
<span style="font-weight: 800;">
|
||||
<t t-if="record.age.raw_value"><field name="age"/> سنة</t>
|
||||
<t t-else="">--</t>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Content -->
|
||||
<div style="padding: 10px; background: white;">
|
||||
|
||||
<!-- Member Name -->
|
||||
<div style="margin-bottom: 8px; text-align: center;">
|
||||
<h4 style="margin: 0; font-size: 16px; font-weight: 700; color: #212529; line-height: 1.3;">
|
||||
<t t-if="record.name.raw_value">
|
||||
<field name="name"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span style="color: #6c757d;">--</span>
|
||||
</t>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<!-- Location -->
|
||||
<div style="display: flex; align-items: center; font-size: 11px; margin-bottom: 6px;">
|
||||
<i class="fa fa-home" style="color: #dc3545; margin-left: 4px; font-size: 12px; width: 16px;"/>
|
||||
<span style="font-weight: 600; color: #495057;">السكن: </span>
|
||||
<span style="color: #212529; margin-right: 4px; font-weight: 500;">
|
||||
<t t-if="record.member_location.raw_value">
|
||||
<field name="member_location"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
مع الأسرة
|
||||
</t>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Education Status -->
|
||||
<div style="display: flex; align-items: center; font-size: 11px; margin-bottom: 6px;">
|
||||
<i class="fa fa-graduation-cap" style="color: #6f42c1; margin-left: 4px; font-size: 12px; width: 16px;"/>
|
||||
<span style="font-weight: 600; color: #495057;">التعليم: </span>
|
||||
<span style="color: #212529; margin-right: 4px; font-weight: 500;">
|
||||
<t t-if="record.education_status.raw_value">
|
||||
<field name="education_status"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
غير محدد
|
||||
</t>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Work Status and Income on same line -->
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; font-size: 11px; margin-bottom: 6px;">
|
||||
<!-- Work Status -->
|
||||
<div style="display: flex; align-items: center;">
|
||||
<i class="fa fa-briefcase" style="color: #ff9800; margin-left: 4px; font-size: 12px; width: 16px;"/>
|
||||
<span style="font-weight: 600; color: #495057;">يعمل: </span>
|
||||
<span style="margin-right: 4px;">
|
||||
<t t-if="record.is_work.raw_value">
|
||||
<span style="background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%); color: #2e7d32; padding: 2px 6px; border-radius: 8px; font-weight: 700; font-size: 10px; border: 1px solid #4caf50;">
|
||||
نعم
|
||||
</span>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span style="color: #6c757d;">لا</span>
|
||||
</t>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Income -->
|
||||
<div style="display: flex; align-items: center;">
|
||||
<i class="fa fa-money" style="color: #388e3c; margin-left: 4px; font-size: 12px;"/>
|
||||
<span style="font-weight: 600; color: #495057;">الدخل: </span>
|
||||
<span style="margin-right: 4px;">
|
||||
<t t-if="record.member_income.raw_value and record.member_income.raw_value > 0">
|
||||
<span style="background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%); color: #2e7d32; padding: 2px 6px; border-radius: 8px; font-weight: 700; font-size: 10px; border: 1px solid #4caf50;">
|
||||
<field name="member_income" widget="monetary"/>
|
||||
</span>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span style="color: #6c757d;">--</span>
|
||||
</t>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Contact Information -->
|
||||
<div style="margin-bottom: 8px;">
|
||||
<div style="display: flex; align-items: center; font-size: 11px; margin-bottom: 4px;">
|
||||
<i class="fa fa-phone" style="color: #17a2b8; margin-left: 4px; font-size: 12px; width: 16px;"/>
|
||||
<span style="font-weight: 600; color: #495057;">الجوال: </span>
|
||||
<span style="color: #212529; margin-right: 4px; font-weight: 500;">
|
||||
<t t-if="record.member_phone.raw_value and record.member_phone.raw_value.substr(0,3) === '966'">
|
||||
0<t t-esc="record.member_phone.raw_value.substr(3)"/>
|
||||
</t>
|
||||
<t t-elif="record.member_phone.raw_value">
|
||||
<field name="member_phone"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span style="color: #6c757d;">--</span>
|
||||
</t>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; align-items: center; font-size: 11px;">
|
||||
<i class="fa fa-users" style="color: #795548; margin-left: 4px; font-size: 12px; width: 16px;"/>
|
||||
<span style="font-weight: 600; color: #495057;">الأسرة: </span>
|
||||
<span style="color: #212529; margin-right: 4px; font-weight: 500;">
|
||||
<t t-if="record.benefit_id.raw_value">
|
||||
<field name="benefit_id"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span style="color: #6c757d;">--</span>
|
||||
</t>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Action Button -->
|
||||
<!-- Action Button - updated style but still clickable (keeps Odoo action name/type) -->
|
||||
<a name="action_open_related_member_service_requests" type="object"
|
||||
style="
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
margin-top: 10px;
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
transition: transform 0.15s ease, box-shadow 0.15s ease;
|
||||
box-shadow: 0 2px 6px rgba(0,0,0,0.06);
|
||||
"
|
||||
onmouseover="this.style.transform='translateY(-4px)'; this.style.boxShadow='0 10px 20px rgba(0,0,0,0.12)'"
|
||||
onmouseout="this.style.transform='translateY(0)'; this.style.boxShadow='0 2px 6px rgba(0,0,0,0.06)';">
|
||||
|
||||
<div style="
|
||||
display:flex;
|
||||
align-items:center;
|
||||
justify-content:space-between;
|
||||
padding:10px 14px;
|
||||
background: linear-gradient(135deg, #ffffffcc 0%, #f6f9f6cc 100%);
|
||||
border: 1px solid rgba(25,135,84,0.08);
|
||||
border-radius: 12px;
|
||||
">
|
||||
<!-- Left: Icon + label -->
|
||||
<div style="display:flex; align-items:center; gap:10px;">
|
||||
<div style="
|
||||
display:flex;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
width:34px;
|
||||
height:34px;
|
||||
border-radius:8px;
|
||||
background: linear-gradient(180deg, rgba(25,135,84,0.08) 0%, rgba(25,135,84,0.04) 100%);
|
||||
border: 1px solid rgba(25,135,84,0.12);
|
||||
font-size:14px;
|
||||
">
|
||||
<i class="fa fa-file-text-o" style="color:#198754; font-size:14px;"></i>
|
||||
</div>
|
||||
|
||||
<div style="display:flex; flex-direction:column; line-height:1;">
|
||||
<div style="font-size:13px; font-weight:700; color:#155724;">طلبات الخدمة</div>
|
||||
<div style="font-size:11px; color:#3b3b3b; opacity:0.85;">
|
||||
<t t-if="record.total_member_service_requests.raw_value and record.total_member_service_requests.raw_value > 0">
|
||||
عرض التفاصيل
|
||||
</t>
|
||||
<t t-else="">لا توجد طلبات</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Right: chevron / badge -->
|
||||
<div style="display:flex; align-items:center; gap:8px;">
|
||||
<t t-if="record.total_member_service_requests.raw_value and record.total_member_service_requests.raw_value > 0">
|
||||
<span style="
|
||||
display:inline-block;
|
||||
min-width:46px;
|
||||
text-align:center;
|
||||
padding:6px 8px;
|
||||
font-size:12px;
|
||||
font-weight:800;
|
||||
color:#155724;
|
||||
background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
|
||||
border-radius:8px;
|
||||
border:1px solid #4caf50;
|
||||
">
|
||||
<t t-esc="record.total_member_service_requests.raw_value"/>
|
||||
</span>
|
||||
</t>
|
||||
<i class="fa fa-chevron-left" style="color:#9aa5a0; font-size:12px;"></i>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
|
|
|
|||
Loading…
Reference in New Issue