Skip to content
TheChatArchiveThe Chat Archive
gpt-4o-mini-2024-07-18· OpenAIAi2 WildChat-4.8M (AI2)

انت مبرمج محترف في البرمجة باستخدام frappe framework ولغة البرمجة paython ولغة البرمجة…

  1. User

    انت مبرمج محترف في البرمجة باستخدام frappe framework ولغة البرمجة paython ولغة البرمجة JavaScrept, وانا اريد مساعدتك , لدي Doctype باسم Timesheet Tool ولذي سوف ارسل لك الكود الخاص بملف الجافاء سكربت الخاص به , يوجد في هذا ال Doctype مجموعة الحقول التاليه : { project:Link, company:Link, day:Date, get_employee:Button, timesheet_tool_details:Table } حيث ان الجدول الفرعي timesheet_tool_details يحتوي على حقل employee وهو عباره عن حقل من نوع Link من Doctype ال Employee , و الذي يحتوي ايضاً على الحقول الاتيه :{

    over_time_n:Float, over_time_h:Float, deduction:Float, hour:Currency, }, اريد ان اقوم با تعطيل الازرار [Move, Duplicate , Insert Above , Insert Below] التي تظهر في ال Dialog عند عرض بيانات اي صف من صفوف الجدول الفرعي timesheet_tool_details , والان واريد منك انا تخبرني كيف ابداء بارسال محتواء الملفات اليك وماهي الخطوات التي اتبعها للتعامل معك , المخرجات اريد ان تكون مخرجات كود كل ملف بعد التعديل وشرح للتعديلات.

  2. Assistant

    بالطبع، سأساعدك بخطوات كود JavaScript لتعديل الحقول في الـ Doctype الخاص بك. لبدء العملية، يمكنك اتباع الخطوات التالية:

    خطوات إرسال المحتوى

    1. نسخ كود JavaScript: قم بنسخ الكود الموجود في ملف الجافا سكريبت الخاص بـ Timesheet Tool. إذا كان لديك كود معين، يمكنك نسخه ولصقه هنا.

    2. وصف التعديلات المطلوبة: بعد إرسال الكود، يمكنك توضيح أي تعديلات أخرى أو تفاصيل إضافية تحتاجها سواء كانت في الجافا سكريبت أو في أي ملف آخر.

    الكود المطلوب لتعديل الأزرار

    لإلغاء تفعيل (تعطيل) الأزرار [Move, Duplicate, Insert Above, Insert Below] في الجدول الفرعي timesheet_tool_details، يمكنك استخدام الكود التالي في ملف الجافا سكريبت الخاص بك:

    frappe.ui.form.on('Timesheet Tool', {
        // عند فتح النموذج
        refresh: function(frm) {
            // تعطيل الأزرار في جدول timesheet_tool_details
            frm.fields_dict['timesheet_tool_details'].grid.grid_buttons = false;
        }
    });
    

    شرح الكود

    • frappe.ui.form.on('Timesheet Tool', { ... }): هذا هو الحدث الأساسي الذي يتم تنفيذه عند تحميل النموذج.

    • refresh: function(frm): تستخدم هذه الدالة لتحديث عرض النموذج كلما تم تحميله أو تصحيحه.

    • frm.fields_dict['timesheet_tool_details'].grid.grid_buttons = false;: هذا السطر يقوم بتعطيل الأزرار في الجدول الفرعي timesheet_tool_details.

    يمكنك إضافة الكود أعلاه إلى ملف الجافا سكريبت الخاص بـ Timesheet Tool.

    الخطوات التالية

    1. أرسل محتوى ملف الجافا سكريبت: إذا كان لديك كود أكثر تعقيدًا أو هيكل آخر للملف، يمكنك إرساله لي لأقوم بمراجعته.

    2. تعديل الكود حسب الحاجة: إذا كان لديك احتياجات محددة أو تعديلات أخرى، سأقوم بمساعدتك في ذلك.

    سأكون في انتظار الكود الذي تود إرساله والتعديلات التي ترغب بها.

  3. User

    // Copyright (c) 2024, Ebkar Technology And Management Solutions. and contributors // For license information, please see license.txt // timesheet_tool.js let settings = {}; frappe.ui.form.on("Timesheet Tool", { refresh(frm) { // Amendment of the filter for the staff field to bring only active staff with Salary Structure Assignment frm.fields_dict['timesheet_tool_details'].grid.get_field('employee').get_query = function(doc, cdt, cdn) { return { query: "time_sheet_tool.time_sheet_tool.utils.timesheet_tool.get_active_employees_with_salary" }; };

        // Hide the addition button .
        frm.fields_dict['timesheet_tool_details'].grid.wrapper.find('.grid-add-row').hide();
    
        // hide the deletion button .
        frm.fields_dict['timesheet_tool_details'].grid.wrapper.find('.grid-remove-rows').hide();      
    
        // hide the selection box in each row  .
        frm.fields_dict['timesheet_tool_details'].grid.wrapper.find('.grid-row-check').closest('.row-check').hide();        
        
        // Management of the "Create Attendance" button .
        if (frm.doc.docstatus === 1 && hasRole("Create Timesheet")) {
        let can_show_create_timesheet = handle_button(
            frm,
            "time_sheet_tool.time_sheet_tool.utils.timesheet_tool.check_missing_records",
            "create_attendance",
            "Create Timesheet",
            "Timesheet records have been created successfully.",
            "All records have already been created."
        );
    
        // Hide "Approval Attendance" button if "Create Timesheet" button is visible
        if (can_show_create_timesheet) {
            frm.remove_custom_button("Submit Timesheet");
        }
    }
    
    // Management "Approval Attendance"
    if (frm.doc.docstatus === 1 && hasRole("Submit Timesheet")) {
        handle_button(
            frm,
            "time_sheet_tool.time_sheet_tool.utils.timesheet_tool.check_missing_records_for_approval",
            "approval_attendance",
            "Submit Timesheet",
            "Timesheet records have been approved successfully.",
            "All records have already been approved."
        );
    }
    frm.set_query('project', () => {
        let filters = {
            company : frm.doc.company,
            };
        return {filters: filters};
    })
    },
    
    // "Get Employmentee" button to get employees based on the project
    get_employee(frm) {
        if (settings.is_project_mandatory && !frm.doc.project) {
            frappe.msgprint(__('Please select a Project before fetching employees.'));
            return;
        }
    
        frappe.call({
            method: "get_all_employees",
            doc: frm.doc,
            args: { project: frm.doc.project || null },
            callback: function(response) {
                if (!response.exc) {
                    frm.refresh_field("timesheet_tool_details");
                    frappe.msgprint(__('All active personnel with Salary Structure Assignment were brought in.'));
                }
            }
        });
    },
    
    project(frm) {
        frappe.call({
            method: "clear_timesheet_tool_details_table",
            doc: frm.doc,
            callback: function(response) {
                frm.refresh_field("timesheet_tool_details"); 
            }
        });
    },
    
    // Update the fields when adjusting the Table "Timesheet Tool Details"
    timesheet_tool_details: {
        hour(frm, cdt, cdn) {
            let row = frappe.get_doc(cdt, cdn);
            row.total_working_hours = row.hour * row.ratio_attendance;
            frm.refresh_field("timesheet_tool_details");
        },
    
        over_time_h(frm, cdt, cdn) {
            frappe.call({
                method: "process_all", 
                doc: frm.doc,
                callback: function() {
                    frm.refresh_field("timesheet_tool_details");
                }
            });
        },
    
    
        over_time_n(frm, cdt, cdn) {
            frappe.call({
                method: "process_all", 
                doc: frm.doc,
                callback: function() {
                    frm.refresh_field("timesheet_tool_details");
                }
            });
        },
    
        deduction(frm, cdt, cdn) {
            frappe.call({
                method: "process_all", 
                doc: frm.doc,
                callback: function() {
                    frm.refresh_field("timesheet_tool_details");
                }
            });
        }
    }  
      
    

    });

    function handle_button(frm, method, def, btn_label, success_msg, fail_msg) { let button_visible = false; frappe.call({ method: method, args: { timesheet_tool_name: frm.doc.name }, callback: function(response) { if (response.message && response.message === "missing") { frm.add_custom_button((btn_label), function() { if (frm.is_dirty()) { frappe.throw(("You have unsaved changes in this form. Please save before you continue.")); } frappe.call({ method: def, doc: frm.doc, callback: function() { frm.reload_doc(); frappe.msgprint((success_msg)); } }); }); button_visible = true; // Mark button as visible } else { // frm.remove_custom_button("Approval Timesheet"); // frm.add_custom_button((btn_label), function() { // frappe.throw(__(fail_msg)); // }).prop("disabled", true); } } }); return button_visible; // Return whether the button is visible }

    // Function to check if the user has a specific role function hasRole(roleName) { return frappe.user.has_role(roleName); }

  4. Assistant

    إليك التعديلات المطلوبة على الكود الخاص بك لتعطيل الأزرار [Move، Duplicate، Insert Above، Insert Below] في الجدول الفرعي timesheet_tool_details. سأقوم بإضافة الكود اللازم، ومن ثم سأقوم بشرح التعديلات.

    تعديل الكود

    أضف السطرين التاليين في دالة refresh في الجزء الذي يدير إعداد نموذج Timesheet Tool، بعد التعليقات حول الأزرار الحالية الموجودة (إضافة/حذف):

    // Disable action buttons in timesheet_tool_details
    frm.fields_dict['timesheet_tool_details'].grid.grid_buttons = false;
    

    الكود المعدل كاملًا

    إليك الكود المعدل مع إضافة تعطيل الأزرار:

    // Copyright (c) 2024, Ebkar Technology And Management Solutions. and contributors
    // For license information, please see license.txt
    // timesheet_tool.js
    let settings = {};
    frappe.ui.form.on("Timesheet Tool", {
        refresh(frm) {
            // Amendment of the filter for the staff field to bring only active staff with Salary Structure Assignment
            frm.fields_dict['timesheet_tool_details'].grid.get_field('employee').get_query = function(doc, cdt, cdn) {
                return {
                    query: "time_sheet_tool.time_sheet_tool.utils.timesheet_tool.get_active_employees_with_salary"
                };
            };
    
            // Hide the addition button .
            frm.fields_dict['timesheet_tool_details'].grid.wrapper.find('.grid-add-row').hide();
    
            // hide the deletion button .
            frm.fields_dict['timesheet_tool_details'].grid.wrapper.find('.grid-remove-rows').hide();      
    
            // hide the selection box in each row  .
            frm.fields_dict['timesheet_tool_details'].grid.wrapper.find('.grid-row-check').closest('.row-check').hide();        
    
            // Disable action buttons in timesheet_tool_details
            frm.fields_dict['timesheet_tool_details'].grid.grid_buttons = false;
    
            // Management of the "Create Attendance" button .
            if (frm.doc.docstatus === 1 && hasRole("Create Timesheet")) {
                let can_show_create_timesheet = handle_button(
                    frm,
                    "time_sheet_tool.time_sheet_tool.utils.timesheet_tool.check_missing_records",
                    "create_attendance",
                    "Create Timesheet",
                    "Timesheet records have been created successfully.",
                    "All records have already been created."
                );
    
                // Hide "Approval Attendance" button if "Create Timesheet" button is visible
                if (can_show_create_timesheet) {
                    frm.remove_custom_button("Submit Timesheet");
                }
            }
    
            // Management "Approval Attendance"
            if (frm.doc.docstatus === 1 && hasRole("Submit Timesheet")) {
                handle_button(
                    frm,
                    "time_sheet_tool.time_sheet_tool.utils.timesheet_tool.check_missing_records_for_approval",
                    "approval_attendance",
                    "Submit Timesheet",
                    "Timesheet records have been approved successfully.",
                    "All records have already been approved."
                );
            }
            frm.set_query('project', () => {
                let filters = {
                    company : frm.doc.company,
                };
                return {filters: filters};
            });
        },
    
        // "Get Employmentee" button to get employees based on the project
        get_employee(frm) {
            if (settings.is_project_mandatory && !frm.doc.project) {
                frappe.msgprint(__('Please select a Project before fetching employees.'));
                return;
            }
    
            frappe.call({
                method: "get_all_employees",
                doc: frm.doc,
                args: { project: frm.doc.project || null },
                callback: function(response) {
                    if (!response.exc) {
                        frm.refresh_field("timesheet_tool_details");
                        frappe.msgprint(__('All active personnel with Salary Structure Assignment were brought in.'));
                    }
                }
            });
        },
    
        project(frm) {
            frappe.call({
                method: "clear_timesheet_tool_details_table",
                doc: frm.doc,
                callback: function(response) {
                    frm.refresh_field("timesheet_tool_details"); 
                }
            });
        },
    
        // Update the fields when adjusting the Table "Timesheet Tool Details"
        timesheet_tool_details: {
            hour(frm, cdt, cdn) {
                let row = frappe.get_doc(cdt, cdn);
                row.total_working_hours = row.hour * row.ratio_attendance;
                frm.refresh_field("timesheet_tool_details");
            },
    
            over_time_h(frm, cdt, cdn) {
                frappe.call({
                    method: "process_all", 
                    doc: frm.doc,
                    callback: function() {
                        frm.refresh_field("timesheet_tool_details");
                    }
                });
            },
            
            over_time_n(frm, cdt, cdn) {
                frappe.call({
                    method: "process_all", 
                    doc: frm.doc,
                    callback: function() {
                        frm.refresh_field("timesheet_tool_details");
                    }
                });
            },
    
            deduction(frm, cdt, cdn) {
                frappe.call({
                    method: "process_all", 
                    doc: frm.doc,
                    callback: function() {
                        frm.refresh_field("timesheet_tool_details");
                    }
                });
            }
        }  
          
    });
    
    function handle_button(frm, method, def, btn_label, success_msg, fail_msg) {
        let button_visible = false;
        frappe.call({
            method: method,
            args: { timesheet_tool_name: frm.doc.name },
            callback: function(response) {
                if (response.message && response.message === "missing") {
                    frm.add_custom_button(__(btn_label), function() {
                        if (frm.is_dirty()) {
                            frappe.throw(__("You have unsaved changes in this form. Please save before you continue."));
                        }
                        frappe.call({
                            method: def,
                            doc: frm.doc,
                            callback: function() {
                                frm.reload_doc();
                                frappe.msgprint(__(success_msg));
                            }
                        });
                    });
                    button_visible = true;  // Mark button as visible
                } else {
                    // frm.remove_custom_button("Approval Timesheet");
                    // frm.add_custom_button(__(btn_label), function() {
                    //     frappe.throw(__(fail_msg));
                    // }).prop("disabled", true);
                }
            }
        });
        return button_visible;  // Return whether the button is visible
    }
    
    // Function to check if the user has a specific role
    function hasRole(roleName) {
        return frappe.user.has_role(roleName);
    }
    

    شرح التعديلات

    1. تعطيل الأزرار: تمت إضافة السطر frm.fields_dict['timesheet_tool_details'].grid.grid_buttons = false; لتعطيل أزرار إضافية مثل "Move"، "Duplicate"، "Insert Above"، و"Insert Below" في الجدول الفرعي timesheet_tool_details.

    2. حفظ تنظيم الكود: تم الحفاظ على تنظيم الكود وسلاسة التعامل مع عناصره كما كانت في النسخة الأصلية.

    الخطوات التالية

    • قم بنسخ الكود المعدل وإضافته إلى ملف الجافا سكريبت الخاص بك.
    • اختبر التعديلات على الـ Doctype الخاص بـ Timesheet Tool للتأكد من أن الأزرار المطلوبة قد تم تعطيلها.

    إذا كان لديك أي استفسارات أخرى أو تحتاج إلى مزيد من التعديلات، فلا تتردد في إخباري!

  5. User

    لم يحدث اي تغيير

  6. Assistant

    آسف لسماع أن التعديلات لم تُحدث أي تغييرات. لنقم بمراجعة عملية تعطيل الأزرار من منظور مختلف. قد تحتاج إلى استخدام طرق مختلفة لتعطيل الأزرار في الجدول الفرعي بدلاً من استخدام grid_buttons، لأن هذه الخاصية قد لا تعمل بنفس الطريقة في جميع الإصدارات أو التحديثات من Frappe.

    خطوات جديدة لتعطيل الأزرار

    هنا طريقة أخرى لتعطيل الأزرار [Move, Duplicate, Insert Above, Insert Below] في الجدول الفرعي timesheet_tool_details. سنستخدم خصائص CSS لتعطيل الأزرار عند عرض البيانات:

    1. تعديل الكود

    أضف كود JavaScript التالي في دالة refresh داخل كود timesheet_tool.js، بعد السطور التي تخفي أزرار الإضافة والحذف:

    // Disable action buttons in timesheet_tool_details
    let grid = frm.fields_dict['timesheet_tool_details'].grid;
    grid.wrapper.find('.grid-move-row').remove();  // Disable Move button
    grid.wrapper.find('.grid-duplicate-row').remove();  // Disable Duplicate button
    grid.wrapper.find('.grid-add-row').hide();  // Hide Add Row button
    grid.wrapper.find('.grid-remove-rows').hide();  // Hide Remove Row button
    

    2. الكود المعدل كاملًا

    إليك الكود المعدل بعد إضافة الأسطر الجديدة لتعطيل الأزرار:

    // Copyright (c) 2024, Ebkar Technology And Management Solutions. and contributors
    // For license information, please see license.txt
    // timesheet_tool.js
    let settings = {};
    frappe.ui.form.on("Timesheet Tool", {
        refresh(frm) {
            // Amendment of the filter for the staff field to bring only active staff with Salary Structure Assignment
            frm.fields_dict['timesheet_tool_details'].grid.get_field('employee').get_query = function(doc, cdt, cdn) {
                return {
                    query: "time_sheet_tool.time_sheet_tool.utils.timesheet_tool.get_active_employees_with_salary"
                };
            };
    
            // Hide the addition button .
            frm.fields_dict['timesheet_tool_details'].grid.wrapper.find('.grid-add-row').hide();
    
            // hide the deletion button .
            frm.fields_dict['timesheet_tool_details'].grid.wrapper.find('.grid-remove-rows').hide();      
    
            // hide the selection box in each row  .
            frm.fields_dict['timesheet_tool_details'].grid.wrapper.find('.grid-row-check').closest('.row-check').hide();        
    
            // Disable action buttons in timesheet_tool_details
            let grid = frm.fields_dict['timesheet_tool_details'].grid;
            grid.wrapper.find('.grid-move-row').remove();  // Disable Move button
            grid.wrapper.find('.grid-duplicate-row').remove();  // Disable Duplicate button
            grid.wrapper.find('.grid-add-row').hide();  // Hide Add Row button
            grid.wrapper.find('.grid-remove-rows').hide();  // Hide Remove Row button
    
            // Management of the "Create Attendance" button .
            if (frm.doc.docstatus === 1 && hasRole("Create Timesheet")) {
                let can_show_create_timesheet = handle_button(
                    frm,
                    "time_sheet_tool.time_sheet_tool.utils.timesheet_tool.check_missing_records",
                    "create_attendance",
                    "Create Timesheet",
                    "Timesheet records have been created successfully.",
                    "All records have already been created."
                );
    
                // Hide "Approval Attendance" button if "Create Timesheet" button is visible
                if (can_show_create_timesheet) {
                    frm.remove_custom_button("Submit Timesheet");
                }
            }
    
            // Management "Approval Attendance"
            if (frm.doc.docstatus === 1 && hasRole("Submit Timesheet")) {
                handle_button(
                    frm,
                    "time_sheet_tool.time_sheet_tool.utils.timesheet_tool.check_missing_records_for_approval",
                    "approval_attendance",
                    "Submit Timesheet",
                    "Timesheet records have been approved successfully.",
                    "All records have already been approved."
                );
            }
            frm.set_query('project', () => {
                let filters = {
                    company : frm.doc.company,
                };
                return {filters: filters};
            });
        },
    
        // "Get Employmentee" button to get employees based on the project
        get_employee(frm) {
            if (settings.is_project_mandatory && !frm.doc.project) {
                frappe.msgprint(__('Please select a Project before fetching employees.'));
                return;
            }
    
            frappe.call({
                method: "get_all_employees",
                doc: frm.doc,
                args: { project: frm.doc.project || null },
                callback: function(response) {
                    if (!response.exc) {
                        frm.refresh_field("timesheet_tool_details");
                        frappe.msgprint(__('All active personnel with Salary Structure Assignment were brought in.'));
                    }
                }
            });
        },
    
        project(frm) {
            frappe.call({
                method: "clear_timesheet_tool_details_table",
                doc: frm.doc,
                callback: function(response) {
                    frm.refresh_field("timesheet_tool_details"); 
                }
            });
        },
    
        // Update the fields when adjusting the Table "Timesheet Tool Details"
        timesheet_tool_details: {
            hour(frm, cdt, cdn) {
                let row = frappe.get_doc(cdt, cdn);
                row.total_working_hours = row.hour * row.ratio_attendance;
                frm.refresh_field("timesheet_tool_details");
            },
    
            over_time_h(frm, cdt, cdn) {
                frappe.call({
                    method: "process_all", 
                    doc: frm.doc,
                    callback: function() {
                        frm.refresh_field("timesheet_tool_details");
                    }
                });
            },
            
            over_time_n(frm, cdt, cdn) {
                frappe.call({
                    method: "process_all", 
                    doc: frm.doc,
                    callback: function() {
                        frm.refresh_field("timesheet_tool_details");
                    }
                });
            },
    
            deduction(frm, cdt, cdn) {
                frappe.call({
                    method: "process_all", 
                    doc: frm.doc,
                    callback: function() {
                        frm.refresh_field("timesheet_tool_details");
                    }
                });
            }
        }  
          
    });
    
    function handle_button(frm, method, def, btn_label, success_msg, fail_msg) {
        let button_visible = false;
        frappe.call({
            method: method,
            args: { timesheet_tool_name: frm.doc.name },
            callback: function(response) {
                if (response.message && response.message === "missing") {
                    frm.add_custom_button(__(btn_label), function() {
                        if (frm.is_dirty()) {
                            frappe.throw(__("You have unsaved changes in this form. Please save before you continue."));
                        }
                        frappe.call({
                            method: def,
                            doc: frm.doc,
                            callback: function() {
                                frm.reload_doc();
                                frappe.msgprint(__(success_msg));
                            }
                        });
                    });
                    button_visible = true;  // Mark button as visible
                } else {
                    // frm.remove_custom_button("Approval Timesheet");
                    // frm.add_custom_button(__(btn_label), function() {
                    //     frappe.throw(__(fail_msg));
                    // }).prop("disabled", true);
                }
            }
        });
        return button_visible;  // Return whether the button is visible
    }
    
    // Function to check if the user has a specific role
    function hasRole(roleName) {
        return frappe.user.has_role(roleName);
    }
    

    الشرح

    • إزالة الأزرار: قمنا بإزالة الأزرار "Move" و "Duplicate" من خلال استخدام remove() على العناصر المحددة باستخدام .grid-move-row و .grid-duplicate-row.

    خطوات تجريبية

    1. احفظ الكود المعدل وتأكد من أنه موجود في الملف الصحيح.
    2. أعد تحميل النموذج: بعد حفظ التعديلات، تأكد من إعادة تحميل الصفحة أو النموذج بالكامل لمشاهدة التغييرات.
    3. اختبر الجدول الفرعي: تحقق مما إذا كانت الأزرار المعنية قد تم إزالتها.

    إذا لم تنجح هذه الخطوات مرة أخرى، سأكون سعيدًا بمساعدتك في تفحص أي أخطاء أخرى أو تقديم مزيد من الدعم.

  7. User

    انت مبرمج محترف في البرمجة باستخدام frappe framework ولغة البرمجة paython ولغة البرمجة JavaScrept, وانا اريد مساعدتك , لدي Doctype باسم Timesheet Tool ولذي سوف ارسل لك الكود الخاص بملف الجافاء سكربت الخاص به , يوجد في هذا ال Doctype مجموعة الحقول التاليه : { project:Link, company:Link, day:Date, get_employee:Button, timesheet_tool_details:Table } حيث ان الجدول الفرعي timesheet_tool_details يحتوي على حقل employee وهو عباره عن حقل من نوع Link من Doctype ال Employee , و الذي يحتوي ايضاً على الحقول الاتيه :{

    over_time_n:Float, over_time_h:Float, deduction:Float, hour:Currency, }, اريد ان اقوم با تعطيل الازرار [Move, Duplicate , Insert Above , Insert Below] التي تظهر في ال Dialog عند عرض بيانات اي صف من صفوف الجدول الفرعي , والان واريد منك انا تخبرني كيف ابداء بارسال محتواء الملفات اليك وماهي الخطوات التي اتبعها للتعامل معك , المخرجات اريد ان تكون مخرجات كود كل ملف بعد التعديل وشرح للتعديلات.

  8. Assistant

    بالطبع، سأساعدك في تعطيل الأزرار [Move, Duplicate, Insert Above, Insert Below] في الجدول الفرعي timesheet_tool_details. لنبدأ من الخطوات التي يمكن اتباعها لإرسال المحتوى والتعديلات المطلوبة.

    كيفية إرسال المحتوى

    1. نسخ كود JavaScript: يمكنك نسخ الكود الموجود في ملف JavaScript الخاص بـ Timesheet Tool ولصقه هنا.

    2. التعليق على أي تفاصيل إضافية: إذا كنت ترغب في إضافة أي ملاحظات أو توضيحات حول الكود أو التعديلات التي تريدها، يمكنك إدراجها بعد الكود.

    3. تحديد الملفات الأخرى: إذا كان هناك أي ملفات أخرى تحتاج إلى تعديل، يرجى ذكرها.

    تعديل الكود لتعطيل الأزرار

    سأقترح كودًا يمكنك استخدامه لتعطيل الأزرار في الجدول الفرعي timesheet_tool_details. يمكنك إضافته إلى دالة refresh عند تحميل النموذج.

    1. الكود المعدل لتعطيل الأزرار

    frappe.ui.form.on('Timesheet Tool', {
        refresh(frm) {
            // Disable action buttons in timesheet_tool_details
            frm.fields_dict['timesheet_tool_details'].grid.after_render = function() {
                $(this.wrapper).find('.grid-move-row').remove();     // Remove Move button
                $(this.wrapper).find('.grid-duplicate-row').remove();  // Remove Duplicate button
                $(this.wrapper).find('.grid-add-row').hide();         // Hide Add Row button
                $(this.wrapper).find('.grid-remove-rows').hide();     // Hide Remove Row button
            };
        },
        
        // باقي الكود الخاص بك كما هو ...
    });
    

    شرح الكود

    • after_render: هذه الدالة تقوم بالتعديل بعد أن يتم عرض الجدول الفرعي، مما يتيح لنا إزالة الأزرار بعد أن يتم تحميل الجدول.
    • remove(): يستخدم هذا الأمر لإزالة عنصر محدد من DOM (نموذج المستند) مثل زر "Move" أو "Duplicate".
    • hide(): يستخدم هذا الأمر لإخفاء عناصر معينة بدلاً من إزالتها، مثل "Add Row" و "Remove Row".

    الخطوات التالية

    • نسخ الكود المعدل: قم بنسخ الكود المعدل وأضفه إلى ملف JavaScript الخاص بـ Timesheet Tool.
    • اختبار الكود: بعد حفظ التعديلات، تأكد من إعادة تحميل النموذج وتجربة الجدول الفرعي للتحقق مما إذا كانت الأزرار قد أُزيلت أو تم إخفاؤها بنجاح.

    إذا كانت لديك أي استفسارات أو تحتاج إلى مزيد من التوضيحات، فلا تتردد في طرحها! يمكنك أيضًا إرسال بقية محتوى ملف JavaScript أو أي ملفات أخرى إذا كنت بحاجة لمساعدتي في تعديلها.

  9. User

    // Copyright (c) 2024, Ebkar Technology And Management Solutions. and contributors // For license information, please see license.txt // timesheet_tool.js let settings = {}; frappe.ui.form.on("Timesheet Tool", { refresh(frm) { // Amendment of the filter for the staff field to bring only active staff with Salary Structure Assignment frm.fields_dict['timesheet_tool_details'].grid.get_field('employee').get_query = function(doc, cdt, cdn) { return { query: "time_sheet_tool.time_sheet_tool.utils.timesheet_tool.get_active_employees_with_salary" }; };

        // Hide the addition button .
        frm.fields_dict['timesheet_tool_details'].grid.wrapper.find('.grid-add-row').hide();
    
        // hide the deletion button .
        frm.fields_dict['timesheet_tool_details'].grid.wrapper.find('.grid-remove-rows').hide();      
    
        // hide the selection box in each row  .
        frm.fields_dict['timesheet_tool_details'].grid.wrapper.find('.grid-row-check').closest('.row-check').hide();        
        
        // Management of the "Create Attendance" button .
        if (frm.doc.docstatus === 1 && hasRole("Create Timesheet")) {
        let can_show_create_timesheet = handle_button(
            frm,
            "time_sheet_tool.time_sheet_tool.utils.timesheet_tool.check_missing_records",
            "create_attendance",
            "Create Timesheet",
            "Timesheet records have been created successfully.",
            "All records have already been created."
        );
    
        // Hide "Approval Attendance" button if "Create Timesheet" button is visible
        if (can_show_create_timesheet) {
            frm.remove_custom_button("Submit Timesheet");
        }
    }
    
    // Management "Approval Attendance"
    if (frm.doc.docstatus === 1 && hasRole("Submit Timesheet")) {
        handle_button(
            frm,
            "time_sheet_tool.time_sheet_tool.utils.timesheet_tool.check_missing_records_for_approval",
            "approval_attendance",
            "Submit Timesheet",
            "Timesheet records have been approved successfully.",
            "All records have already been approved."
        );
    }
    frm.set_query('project', () => {
        let filters = {
            company : frm.doc.company,
            };
        return {filters: filters};
    })
    },
    
    // "Get Employmentee" button to get employees based on the project
    get_employee(frm) {
        if (settings.is_project_mandatory && !frm.doc.project) {
            frappe.msgprint(__('Please select a Project before fetching employees.'));
            return;
        }
    
        frappe.call({
            method: "get_all_employees",
            doc: frm.doc,
            args: { project: frm.doc.project || null },
            callback: function(response) {
                if (!response.exc) {
                    frm.refresh_field("timesheet_tool_details");
                    frappe.msgprint(__('All active personnel with Salary Structure Assignment were brought in.'));
                }
            }
        });
    },
    
    project(frm) {
        frappe.call({
            method: "clear_timesheet_tool_details_table",
            doc: frm.doc,
            callback: function(response) {
                frm.refresh_field("timesheet_tool_details"); 
            }
        });
    },
    
    // Update the fields when adjusting the Table "Timesheet Tool Details"
    timesheet_tool_details: {
        hour(frm, cdt, cdn) {
            let row = frappe.get_doc(cdt, cdn);
            row.total_working_hours = row.hour * row.ratio_attendance;
            frm.refresh_field("timesheet_tool_details");
        },
    
        over_time_h(frm, cdt, cdn) {
            frappe.call({
                method: "process_all", 
                doc: frm.doc,
                callback: function() {
                    frm.refresh_field("timesheet_tool_details");
                }
            });
        },
    
    
        over_time_n(frm, cdt, cdn) {
            frappe.call({
                method: "process_all", 
                doc: frm.doc,
                callback: function() {
                    frm.refresh_field("timesheet_tool_details");
                }
            });
        },
    
        deduction(frm, cdt, cdn) {
            frappe.call({
                method: "process_all", 
                doc: frm.doc,
                callback: function() {
                    frm.refresh_field("timesheet_tool_details");
                }
            });
        }
    }  
      
    

    });

    function handle_button(frm, method, def, btn_label, success_msg, fail_msg) { let button_visible = false; frappe.call({ method: method, args: { timesheet_tool_name: frm.doc.name }, callback: function(response) { if (response.message && response.message === "missing") { frm.add_custom_button((btn_label), function() { if (frm.is_dirty()) { frappe.throw(("You have unsaved changes in this form. Please save before you continue.")); } frappe.call({ method: def, doc: frm.doc, callback: function() { frm.reload_doc(); frappe.msgprint((success_msg)); } }); }); button_visible = true; // Mark button as visible } else { // frm.remove_custom_button("Approval Timesheet"); // frm.add_custom_button((btn_label), function() { // frappe.throw(__(fail_msg)); // }).prop("disabled", true); } } }); return button_visible; // Return whether the button is visible }

    // Function to check if the user has a specific role function hasRole(roleName) { return frappe.user.has_role(roleName); }

  10. Assistant

    شكرًا لك على مشاركة كود JavaScript الخاص بـ Timesheet Tool. سنعمل على إضافة الكود اللازمة لتعطيل الأزرار [Move, Duplicate, Insert Above, Insert Below] التي تظهر في تعيين عرض صفوف الجدول الفرعي timesheet_tool_details.

    تعديلات لتعطيل الأزرار

    سأقوم بإضافة جزء من الكود داخل دالة refresh التي تقوم بتحديث النموذج لجعلها تعمل على تعطيل الأزرار المطلوبة. إليك كيفية القيام بذلك:

    الكود المعدل

    يمكنك استبدال كود refresh الخاص بك بهذا الكود بعد إضافة الأسطر التي تعطل الأزرار:

    frappe.ui.form.on("Timesheet Tool", {
        refresh(frm) {
            // Amendment of the filter for the staff field to bring only active staff with Salary Structure Assignment
            frm.fields_dict['timesheet_tool_details'].grid.get_field('employee').get_query = function(doc, cdt, cdn) {
                return {
                    query: "time_sheet_tool.time_sheet_tool.utils.timesheet_tool.get_active_employees_with_salary"
                };
            };
    
            // Hide the addition button .
            frm.fields_dict['timesheet_tool_details'].grid.wrapper.find('.grid-add-row').hide();
    
            // Hide the deletion button .
            frm.fields_dict['timesheet_tool_details'].grid.wrapper.find('.grid-remove-rows').hide();      
    
            // Hide the selection box in each row.
            frm.fields_dict['timesheet_tool_details'].grid.wrapper.find('.grid-row-check').closest('.row-check').hide();        
    
            // Disable action buttons in timesheet_tool_details
            frm.fields_dict['timesheet_tool_details'].grid.after_render = function() {
                $(this.wrapper).find('.grid-move-row').remove();          // Disable Move button
                $(this.wrapper).find('.grid-duplicate-row').remove();      // Disable Duplicate button
                $(this.wrapper).find('.grid-add-row').hide();              // Hide Add Row button
                $(this.wrapper).find('.grid-remove-rows').hide();          // Hide Remove Row button
            };
    
            // Management of the "Create Attendance" button.
            if (frm.doc.docstatus === 1 && hasRole("Create Timesheet")) {
                let can_show_create_timesheet = handle_button(
                    frm,
                    "time_sheet_tool.time_sheet_tool.utils.timesheet_tool.check_missing_records",
                    "create_attendance",
                    "Create Timesheet",
                    "Timesheet records have been created successfully.",
                    "All records have already been created."
                );
    
                // Hide "Approval Attendance" button if "Create Timesheet" button is visible
                if (can_show_create_timesheet) {
                    frm.remove_custom_button("Submit Timesheet");
                }
            }
    
            // Management "Approval Attendance"
            if (frm.doc.docstatus === 1 && hasRole("Submit Timesheet")) {
                handle_button(
                    frm,
                    "time_sheet_tool.time_sheet_tool.utils.timesheet_tool.check_missing_records_for_approval",
                    "approval_attendance",
                    "Submit Timesheet",
                    "Timesheet records have been approved successfully.",
                    "All records have already been approved."
                );
            }
            frm.set_query('project', () => {
                let filters = {
                    company: frm.doc.company,
                };
                return { filters: filters };
            });
        },
    
        // ... باقي الكود الخاص بك
    });
    

    شرح التعديلات

    1. إضافة after_render: هذه الدالة ستقوم بتعطيل الأزرار "Move" و"Duplicate" وتخفي أزرار "Add Row" و"Remove Row" بعد تحميل الجدول. هذا يضمن أنه حتى بعد ظهور الجدول، سيتم إخفاء أو إزالة الأزرار المعنية.

    2. إزالة الأزرار: باستخدام remove() يمكننا إزالة الأزرار من DOM، مما يمنع المستخدمين من استخدامها.

    3. إخفاء الأزرار (Hide): في حالة الأزرار "Add Row" و"Remove Row"، استخدمنا hide() لإخفائها مما يجعلها غير مرئية للمستخدم.

    الخطوات التالية

    1. تعديل الكود: انسخ الكود المعدل واستبدل الجزء الخاص بدالة refresh في ملف JavaScript الخاص بك.
    2. اختبار الكود: احفظ التغيير وأعد تحميل الـ Doctype الخاص بك للتحقق إذا كانت الأزرار قد أزيلت أو أُخفيت بنجاح.
    3. تجربة جميع الوظائف: تأكد من أن كل شيء يعمل كما هو متوقع وتحقق من وجود أي أخطاء في وحدة التحكم (Console) للمستعرض.

    إذا كانت لديك أي استفسارات أخرى أو تحتاج إلى تعديلات إضافية، فلا تتردد في طرحها!

  11. User
    					<span class="menu-item-label" data-label="Print">Print</span>
    				</a>
    			</li><li>
    				<a class="grey-link dropdown-item" href="#" onclick="return false;">
    					
    					<span class="menu-item-label" data-label="Email"><span><span class="alt-underline">E</span>mail</span></span>
    					<kbd class="pull-right">
    						<span>Ctrl+E</span>
    					</kbd>
    				</a>
    			</li><li>
    				<a class="grey-link dropdown-item" href="#" onclick="return false;">
    					
    					<span class="menu-item-label" data-label="Jump%20to%20field"><span><span class="alt-underline">J</span>ump to field</span></span>
    					<kbd class="pull-right">
    						<span>Ctrl+J</span>
    					</kbd>
    				</a>
    			</li><li>
    				<a class="grey-link dropdown-item" href="#" onclick="return false;">
    					
    					<span class="menu-item-label" data-label="Links"><span><span class="alt-underline">L</span>inks</span></span>
    				</a>
    			</li><li>
    				<a class="grey-link dropdown-item" href="#" onclick="return false;">
    					
    					<span class="menu-item-label" data-label="Duplicate"><span><span class="alt-underline">D</span>uplicate</span></span>
    					<kbd class="pull-right">
    						<span>⇧+D</span>
    					</kbd>
    				</a>
    			</li><li>
    				<a class="grey-link dropdown-item" href="#" onclick="return false;">
    					
    					<span class="menu-item-label" data-label="Copy%20to%20Clipboard"><span><span class="alt-underline">C</span>opy to Clipboard</span></span>
    				</a>
    			</li><li>
    				<a class="grey-link dropdown-item" href="#" onclick="return false;">
    					
    					<span class="menu-item-label" data-label="Rename"><span><span class="alt-underline">R</span>ename</span></span>
    				</a>
    			</li><li>
    				<a class="grey-link dropdown-item" href="#" onclick="return false;">
    					
    					<span class="menu-item-label" data-label="Reload"><span>Rel<span class="alt-underline">o</span>ad</span></span>
    				</a>
    			</li><li>
    				<a class="grey-link dropdown-item" href="#" onclick="return false;">
    					
    					<span class="menu-item-label" data-label="Delete">Delete</span>
    					<kbd class="pull-right">
    						<span>⇧+Ctrl+D</span>
    					</kbd>
    				</a>
    			</li><li>
    				<a class="grey-link dropdown-item" href="#" onclick="return false;">
    					
    					<span class="menu-item-label" data-label="Remind%20Me">Remind Me</span>
    					<kbd class="pull-right">
    						<span>⇧+R</span>
    					</kbd>
    				</a>
    			</li><li>
    				<a class="grey-link dropdown-item" href="#" onclick="return false;">
    					
    					<span class="menu-item-label" data-label="Undo">Undo</span>
    					<kbd class="pull-right">
    						<span>Ctrl+Z</span>
    					</kbd>
    				</a>
    			</li><li>
    				<a class="grey-link dropdown-item" href="#" onclick="return false;">
    					
    					<span class="menu-item-label" data-label="Redo">Redo</span>
    					<kbd class="pull-right">
    						<span>Ctrl+Y</span>
    					</kbd>
    				</a>
    			</li><li>
    				<a class="grey-link dropdown-item" href="#" onclick="return false;">
    					
    					<span class="menu-item-label" data-label="Customize"><span>Custom<span class="alt-underline">i</span>ze</span></span>
    				</a>
    			</li><li>
    				<a class="grey-link dropdown-item" href="#" onclick="return false;">
    					
    					<span class="menu-item-label" data-label="Edit%20DocType">Edit DocType</span>
    				</a>
    			</li><li>
    				<a class="grey-link dropdown-item" href="#" onclick="return false;">
    					
    					<span class="menu-item-label" data-label="New%20Timesheet%20Tool"><span><span class="alt-underline">N</span>ew Timesheet Tool</span></span>
    					<kbd class="pull-right">
    						<span>Ctrl+B</span>
    					</kbd>
    				</a>
    			</li></ul>      </div>      <button class="btn btn-secondary btn-default btn-sm hide"></button>      <div class="actions-btn-group hide">       <button type="button" class="btn btn-primary btn-sm" data-toggle="dropdown" aria-expanded="false">        <span>         <span class="hidden-xs actions-btn-group-label" data-label="Actions"><span><span class="alt-underline">A</span>ctions</span></span>         <svg class="icon icon-xs">          <use href="#icon-select">          </use>         </svg>        </span>       </button>       <ul class="dropdown-menu dropdown-menu-right" role="menu">       </ul>      </div>      <button class="btn btn-primary btn-sm primary-action" data-label="Submit"><span>S<span class="alt-underline">u</span>bmit</span></button>     </div>    </div>   </div>  </div> </div> <div class="container page-body">  <div class="page-toolbar hide">   <div class="container">   </div>  </div>  <div class="page-wrapper">   <div class="page-content">    <div class="workflow-button-area btn-group pull-right hide"></div>    <div class="clearfix"></div>   <div class="row layout-main">
    				<div class="col-lg-2 layout-side-section"><div class="form-sidebar overlay-sidebar hidden-xs hidden-sm"><ul class="list-unstyled sidebar-menu user-actions hidden"></ul> <ul class="list-unstyled sidebar-menu sidebar-image-section hide">  <li class="sidebar-image-wrapper">   <img class="sidebar-image">   <div class="sidebar-standard-image">    <div class="standard-image"></div>   </div>      <div class="sidebar-image-actions">    <div class="dropdown">     <a href="#" class="dropdown-toggle" data-toggle="dropdown">Change</a>     <div class="dropdown-menu" role="menu">      <a class="dropdown-item sidebar-image-change">Upload</a>      <a class="dropdown-item sidebar-image-remove">Remove</a>     </div>    </div>   </div>     </li> </ul>  <ul class="list-unstyled sidebar-menu sidebar-rating hide">  <li style="position: relative;">   <a class="strong badge-hover">    <span>Feedback</span>   </a>  </li>  <li class="rating-icons"></li> </ul> <ul class="list-unstyled sidebar-menu hidden">   </ul> <ul class="list-unstyled sidebar-menu form-assignments">  <li>   <span class="form-sidebar-items">    <span class="add-assignment-label">     <svg class="es-icon ml-0 icon-sm"><use href="#es-line-add-people"></use></svg>     <span class="ellipsis">Assigned To</span>    </span>    <button class="add-assignment-btn btn btn-link icon-btn">     <svg class="es-icon icon-sm"><use href="#es-line-add"></use></svg>    </button>   </span>   <div class="assignments" style="display: none;"></div>  </li> </ul> <ul class="list-unstyled sidebar-menu form-attachments">  <li class="attachments-actions">   <span class="form-sidebar-items">    <span>     <svg class="es-icon ml-0 icon-sm">      <use href="#es-line-attachment"></use>     </svg>     <a class="pill-label ellipsis explore-link">      Attachments     </a>    </span>    <button class="add-attachment-btn btn btn-link icon-btn">     <svg class="es-icon icon-sm"><use href="#es-line-add"></use></svg>    </button>   </span>  </li>  <a class="show-all-btn hidden" href="">   <svg class="es-icon icon-sm">    <use href="#es-line-preview"></use>   </svg>   <span class="pill-label ellipsis">    Show All   </span>  </a> </ul>  <ul class="list-unstyled sidebar-menu form-tags">   <li>    <span class="form-sidebar-items">     <span>      <svg class="es-icon ml-0 icon-sm"><use href="#es-line-tag"></use></svg>      <span class="tags-label ellipsis">Tags</span>     </span>    <button class="add-tags-btn text-muted btn btn-link icon-btn" id="add_tags">
    			<svg class="es-icon icon-sm"><use href="#es-line-add"></use></svg>
    		</button></span>   </li> <li class="" style="display: none;"><div class="awesomplete"><input class="tags-input form-control" autocomplete="off" aria-expanded="false" aria-owns="awesomplete_list_2" role="combobox"><ul hidden="" role="listbox" id="awesomplete_list_2"></ul><span class="visually-hidden" role="status" aria-live="assertive" aria-atomic="true">Begin typing for results.</span></div></li></ul> <ul class="list-unstyled sidebar-menu form-shared">  <li>   <span class="form-sidebar-items">    <span class="share-label">     <svg class="es-icon ml-0 icon-sm"><use href="#es-line-add-people"></use></svg>     <span class="ellipsis">Share</span>    </span>    <button class="share-doc-btn btn btn-link icon-btn">     <svg class="es-icon icon-sm"><use href="#es-line-add"></use></svg>    </button>   </span>   <div class="shares" style="display: none;"></div>  </li> </ul> <ul class="list-unstyled sidebar-menu followed-by-section">  <li class="sidebar-label followed-by-label hidden">   <svg class="icon icon-sm">    <use href="#icon-link-url" class="like-icon"></use>   </svg>   Followed by  </li>  <li class="followed-by"></li>  <li class="document-follow">   <a class="badge-hover follow-document-link hidden">    Follow   </a>   <a class="badge-hover unfollow-document-link hidden">    Unfollow   </a>  </li> </ul> <ul class="list-unstyled sidebar-menu">  <a><li class="auto-repeat-status"></li></a><li><a></a> </li></ul> <ul class="list-unstyled sidebar-menu form-sidebar-stats">  <li class="flex">   <div class="form-stats d-flex">    <span class="form-stats-likes">     <span class="liked-by like-action d-flex align-items-center not-liked" data-doctype="Timesheet Tool" data-name="TT-2024-12-31-0029">      <svg class="es-icon icon-sm">       <use href="#es-solid-heart" class="like-icon"></use>      </svg>      <span class="like-count ml-2">0</span>     </span>    </span>    <span class="mx-2">·</span>    <a class="comments d-flex align-items-center">     <svg class="es-icon icon-sm">      <use href="#es-line-chat-alt" class="comment-icon"></use>     </svg>     <span class="comments-count ml-2">0</span>    </a>   </div>   <a class="form-follow text-sm">Follow</a>  </li> </ul> <hr> <ul class="list-unstyled sidebar-menu text-muted">  <li class="pageview-count"></li>  <li class="modified-by">You last edited this · <span class="frappe-timestamp " data-timestamp="2024-12-22 15:36:04.113769" title="22-12-2024 15:36:04">19 minutes ago</span></li>  <li class="created-by">You created this · <span class="frappe-timestamp " data-timestamp="2024-12-21 22:48:55.833230" title="21-12-2024 22:48:55">17 hours ago</span></li> </ul>  </div></div>
    				<div class="col layout-main-section-wrapper">
    					<div class="layout-main-section"><div class="page-form row hide"></div><div><div class="std-form-layout"><div class="form-layout"><div class="form-message blue"><div>Submit this document to confirm</div><div class="close-message"><svg class="icon  icon-sm" style="" aria-hidden="true">
    		<use class="" href="#icon-close"></use>
    	</svg></div></div><div class="form-page"><div class="form-dashboard visible-section"><div class="row form-dashboard-section progress-area hide-control" data-fieldname="undefined"><div class="section-body"></div></div><div class="row form-dashboard-section form-heatmap hide-control" data-fieldname="undefined"><div class="section-head collapsible">
    			Activity
    			<span class="ml-2 collapse-indicator mb-1" style=""><svg class="es-icon es-line  icon-sm" style="" aria-hidden="true">
    		<use class="mb-1" href="#es-line-up"></use>
    	</svg></span>
    		</div><div class="section-body">
    			<div id="heatmap-timesheet_tool" class="heatmap"></div>
    			<div class="text-muted small heatmap-message hidden"></div>
    		</div></div><div class="row form-dashboard-section form-graph hide-control" data-fieldname="undefined"><div class="section-head collapsible">
    			Graph
    			<span class="ml-2 collapse-indicator mb-1" style=""><svg class="es-icon es-line  icon-sm" style="" aria-hidden="true">
    		<use class="mb-1" href="#es-line-up"></use>
    	</svg></span>
    		</div><div class="section-body"></div></div><div class="row form-dashboard-section form-stats hide-control" data-fieldname="undefined"><div class="section-head collapsible">
    			Stats
    			<span class="ml-2 collapse-indicator mb-1" style=""><svg class="es-icon es-line  icon-sm" style="" aria-hidden="true">
    		<use class="mb-1" href="#es-line-up"></use>
    	</svg></span>
    		</div><div class="section-body"><div class="row"></div></div></div><div class="row form-dashboard-section form-links" data-fieldname="undefined"><div class="section-head collapsible">
    			Connections
    			<span class="ml-2 collapse-indicator mb-1" style=""><svg class="es-icon es-line  icon-sm" style="" aria-hidden="true">
    		<use class="mb-1" href="#es-line-up"></use>
    	</svg></span>
    		</div><div class="section-body"><div class="transactions"><div class="form-documents">        <div class="row">       <div class="col-md-4">     <div class="form-link-title">      <span>Timesheet</span>     </div>                 <div class="document-link" data-doctype="Timesheet">       <div class="document-link-badge" data-doctype="Timesheet">        <span class="count hidden"></span>        <a class="badge-link">Timesheet</a>       </div>       <span class="open-notification hidden" title="Open Timesheet">       </span>               <button class="btn btn-new btn-secondary btn-xs icon-btn hidden" data-doctype="Timesheet">         <svg class="icon icon-sm"><use href="#icon-add"></use></svg>        </button>             </div>         </div>            <div class="col-md-4">     <div class="form-link-title">      <span>Additional Salary</span>     </div>                 <div class="document-link" data-doctype="Additional Salary">       <div class="document-link-badge" data-doctype="Additional Salary">        <span class="count hidden"></span>        <a class="badge-link">Additional Salary</a>       </div>       <span class="open-notification hidden" title="Open Additional Salary">       </span>               <button class="btn btn-new btn-secondary btn-xs icon-btn hidden" data-doctype="Additional Salary">         <svg class="icon icon-sm"><use href="#icon-add"></use></svg>        </button>             </div>         </div>      </div>      </div></div></div></div></div><div class="row form-section card-section empty-section" data-fieldname="__section_1"><div class="section-body"><div class="form-column col-sm-12" data-fieldname="__column_1">
    			<form>
    			<div class="frappe-control input-max-width hide-control" data-fieldtype="Data" data-fieldname="__newname">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label" style="padding-right: 0px;"></label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input"></div>
    					<div class="control-value like-disabled-input" style="display: none;"></div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">__newname</span></div></form>
    		</div></div></div><div class="row form-section card-section visible-section" data-fieldname="section_break_d92t"><div class="section-body"><div class="form-column col-sm-4" data-fieldname="__column_2">
    			<form>
    			<div class="frappe-control input-max-width" data-fieldtype="Link" data-fieldname="project">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label reqd" style="padding-right: 0px;">Project</label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input"><div class="link-field ui-front" style="position: relative;">
    		<div class="awesomplete"><input type="text" class="input-with-feedback form-control bold" maxlength="140" data-fieldtype="Link" data-fieldname="project" placeholder="" data-doctype="Timesheet Tool" data-target="Project" autocomplete="off" aria-expanded="false" aria-owns="awesomplete_list_3" role="combobox"><ul hidden="" role="listbox" id="awesomplete_list_3"></ul><span class="visually-hidden" role="status" aria-live="assertive" aria-atomic="true">Begin typing for results.</span></div>
    		<span class="link-btn">
    			<a class="btn-clear no-decoration">
    				<svg class="icon  icon-xs" style="" aria-hidden="true">
    		<use class="" href="#icon-close-alt"></use>
    	</svg>
    			</a>
    			<a class="btn-open no-decoration" title="Open Link">
    				<svg class="icon  icon-xs" style="" aria-hidden="true">
    		<use class="" href="#icon-arrow-right"></use>
    	</svg>
    			</a>
    		</span>
    	</div></div>
    					<div class="control-value like-disabled-input bold" style="display: none;"><a href="/app/project/PROJ-0002" data-doctype="Project" data-name="PROJ-0002" data-value="PROJ-0002">PROJ-0002</a></div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">project</span></div><div class="frappe-control input-max-width hide-control" data-fieldtype="Link" data-fieldname="amended_from">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label" style="padding-right: 0px;"></label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input"></div>
    					<div class="control-value like-disabled-input" style="display: none;"></div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">amended_from</span></div></form>
    		</div><div class="form-column col-sm-4" data-fieldname="column_break_fyyw">
    			<form>
    			<div class="frappe-control input-max-width" data-fieldtype="Link" data-fieldname="company">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label reqd" style="padding-right: 0px;">Company</label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input"><div class="link-field ui-front" style="position: relative;">
    		<div class="awesomplete"><input type="text" class="input-with-feedback form-control bold" maxlength="140" data-fieldtype="Link" data-fieldname="company" placeholder="" data-doctype="Timesheet Tool" data-target="Company" autocomplete="off" aria-expanded="false" aria-owns="awesomplete_list_4" role="combobox"><ul hidden="" role="listbox" id="awesomplete_list_4"></ul><span class="visually-hidden" role="status" aria-live="assertive" aria-atomic="true">Begin typing for results.</span></div>
    		<span class="link-btn">
    			<a class="btn-clear no-decoration">
    				<svg class="icon  icon-xs" style="" aria-hidden="true">
    		<use class="" href="#icon-close-alt"></use>
    	</svg>
    			</a>
    			<a class="btn-open no-decoration" title="Open Link">
    				<svg class="icon  icon-xs" style="" aria-hidden="true">
    		<use class="" href="#icon-arrow-right"></use>
    	</svg>
    			</a>
    		</span>
    	</div></div>
    					<div class="control-value like-disabled-input bold" style="display: none;"><a href="/app/company/Ebkar%20(Demo)" data-doctype="Company" data-name="Ebkar (Demo)" data-value="Ebkar (Demo)">Ebkar (Demo)</a></div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">company</span></div></form>
    		</div><div class="form-column col-sm-4" data-fieldname="column_break_qgiv">
    			<form>
    			<div class="frappe-control input-max-width" data-fieldtype="Date" data-fieldname="day">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label reqd" style="padding-right: 0px;">Timesheet Day </label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input"><input type="text" autocomplete="off" class="input-with-feedback form-control bold" data-fieldtype="Date" data-fieldname="day" placeholder="" data-doctype="Timesheet Tool"></div>
    					<div class="control-value like-disabled-input bold" style="display: none;">31-12-2024</div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">day</span></div></form>
    		</div></div></div><div class="row form-section card-section visible-section" data-fieldname="section_break_jssf"><div class="section-body"><div class="form-column col-sm-12" data-fieldname="__column_3">
    			<form>
    			<div class="frappe-control input-max-width" data-fieldtype="Button" data-fieldname="get_employee">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label hide" style="padding-right: 0px;">&nbsp;</label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input"><button class="btn btn-xs btn-default" data-fieldtype="Button" data-fieldname="get_employee" placeholder="" data-doctype="Timesheet Tool" value="">Get Project Team</button></div>
    					<div class="hide" style="display: none;"></div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">get_employee</span></div><div class="frappe-control form-group" data-fieldtype="Table" data-fieldname="timesheet_tool_details"><span class="tooltip-content">timesheet_tool_details</span><div class="grid-field">
    			<label class="control-label">Timesheet Tool Details</label>
    			<span class="help"></span>
    			<p class="text-muted small grid-description" style="display: none;"></p>
    			<div class="grid-custom-buttons"></div>
    			<div class="form-grid-container">
    				<div class="form-grid">
    					<div class="grid-heading-row"><div class="grid-row"><div class="data-row row"><div class="row-check sortable-handle col" style="display: none;">
    				<input type="checkbox" class="grid-row-check">
    			</div><div class="row-index sortable-handle col">
    				<span>No.</span>
    			</div><div class="col grid-static-col col-xs-2 " data-fieldname="employee" data-fieldtype="Link" title="Team Member"><div class="field-area" style="display: none;"></div><div class="static-area ellipsis reqd">Team Member</div></div><div class="col grid-static-col col-xs-2 " data-fieldname="employee_name" data-fieldtype="Read Only" title="Employee Name"><div class="field-area" style="display: none;"></div><div class="static-area ellipsis">Employee Name</div></div><div class="col grid-static-col col-xs-2 " data-fieldname="attendance" data-fieldtype="Link" title="Attendance"><div class="field-area" style="display: none;"></div><div class="static-area ellipsis">Attendance</div></div><div class="col grid-static-col col-xs-2  text-right" data-fieldname="ratio_attendance" data-fieldtype="Float" title="Attendance Factor"><div class="field-area" style="display: none;"></div><div class="static-area ellipsis">Attendance Factor</div></div><div class="col grid-static-col col-xs-2 " data-fieldname="salary_structure" data-fieldtype="Link" title="Salary Structure"><div class="field-area" style="display: none;"></div><div class="static-area ellipsis">Salary Structure</div></div><div class="col grid-static-col d-flex justify-content-center" style="cursor: pointer;">
    				<a><svg class="icon  icon-sm" style="filter: opacity(0.5)" aria-hidden="true">
    		<use class="" href="#icon-setting-gear"></use>
    	</svg></a>
    			</div></div></div></div>
    					<div class="grid-body">
    						<div class="rows"><div class="grid-row" data-name="gtq07o7se0" data-idx="1"><div class="data-row row" style=""><div class="row-check sortable-handle col" style="display: none;">
    				<input type="checkbox" class="grid-row-check">
    			</div><div class="row-index sortable-handle col">
    				<span>1</span>
    			</div><div class="col grid-static-col col-xs-2 bold" data-fieldname="employee" data-fieldtype="Link"><div class="field-area" style="display: none;"></div><div class="static-area ellipsis reqd"><a href="/app/employee/HR-EMP-00001" data-doctype="Employee" data-name="HR-EMP-00001" data-value="HR-EMP-00001">HR-EMP-00001: تجريبي</a></div></div><div class="col grid-static-col col-xs-2 " data-fieldname="employee_name" data-fieldtype="Read Only"><div class="field-area" style="display: none;"></div><div class="static-area ellipsis">تجريبي</div></div><div class="col grid-static-col col-xs-2 " data-fieldname="attendance" data-fieldtype="Link"><div class="field-area" style="display: none;"></div><div class="static-area ellipsis"><a href="/app/activity-type/Planning" data-doctype="Activity Type" data-name="Planning" data-value="Planning">Planning</a></div></div><div class="col grid-static-col col-xs-2  text-right" data-fieldname="ratio_attendance" data-fieldtype="Float"><div class="field-area" style="display: none;"></div><div class="static-area ellipsis"><div style="text-align: right">0.500</div></div></div><div class="col grid-static-col col-xs-2 " data-fieldname="salary_structure" data-fieldtype="Link"><div class="field-area" style="display: none;"></div><div class="static-area ellipsis"><a href="/app/salary-structure/Salary%20Structure%201" data-doctype="Salary Structure" data-name="Salary Structure 1" data-value="Salary Structure 1">Salary Structure 1</a></div></div><div class="col"><div class="btn-open-row" data-toggle="tooltip" data-placement="right" title="" data-original-title="Edit">
    						<a><svg class="icon  icon-xs" style="" aria-hidden="true">
    		<use class="" href="#icon-edit"></use>
    	</svg></a>
    					</div></div></div><div class="form-in-grid"><div class="grid-form-heading">
    			<div class="toolbar grid-header-toolbar">
    				<span class="panel-title">
    					Editing Row #<span class="grid-form-row-index">1</span></span>
    				<span class="row-actions">
    					<button class="btn btn-secondary btn-sm pull-right grid-collapse-row">
    						<svg class="icon  icon-sm" style="" aria-hidden="true">
    		<use class="" href="#icon-down"></use>
    	</svg>
    					</button>
    					<button class="btn btn-secondary btn-sm pull-right grid-move-row hidden-xs">
    						Move</button>
    					<button class="btn btn-secondary btn-sm pull-right grid-duplicate-row hidden-xs">
    						<svg class="icon  icon-sm" style="" aria-hidden="true">
    		<use class="" href="#icon-duplicate"></use>
    	</svg>
    						Duplicate
    					</button>
    					<button class="btn btn-secondary btn-sm pull-right grid-insert-row hidden-xs">
    						Insert Above</button>
    					<button class="btn btn-secondary btn-sm pull-right grid-insert-row-below hidden-xs">
    						Insert Below</button>
    					<button class="btn btn-danger btn-sm pull-right grid-delete-row">
    						<svg class="icon  icon-sm" style="" aria-hidden="true">
    		<use class="" href="#icon-delete"></use>
    	</svg>
    					</button>
    				</span>
    			</div>
    		</div>
    		<div class="grid-form-body">
    			<div class="form-area"><div class="form-layout"><div class="form-message hidden"></div><div class="form-page"><div class="row form-section visible-section" data-fieldname="__section_1"><div class="section-body"><div class="form-column col-sm-6" data-fieldname="__column_1">
    			<form>
    			<div class="frappe-control input-max-width" data-fieldtype="Link" data-fieldname="employee">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label reqd" style="padding-right: 0px;">Team Member</label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input"><div class="link-field ui-front" style="position: relative;">
    		<div class="awesomplete"><input type="text" class="input-with-feedback form-control bold" maxlength="140" data-fieldtype="Link" data-fieldname="employee" placeholder="" data-doctype="Timesheet Tool Details" data-target="Employee" autocomplete="off" aria-expanded="false" aria-owns="awesomplete_list_5" role="combobox" data-listener-added_a1a90814="true"><ul hidden="" role="listbox" id="awesomplete_list_5"></ul><span class="visually-hidden" role="status" aria-live="assertive" aria-atomic="true">Begin typing for results.</span></div>
    		<span class="link-btn" style="display: none;">
    			<a class="btn-clear no-decoration">
    				<svg class="icon  icon-xs" style="" aria-hidden="true">
    		<use class="" href="#icon-close-alt"></use>
    	</svg>
    			</a>
    			<a class="btn-open no-decoration" title="Open Link" href="/app/employee/HR-EMP-00001">
    				<svg class="icon  icon-xs" style="" aria-hidden="true">
    		<use class="" href="#icon-arrow-right"></use>
    	</svg>
    			</a>
    		</span>
    	</div></div>
    					<div class="control-value like-disabled-input bold" style="display: none;"><a href="/app/employee/HR-EMP-00001" data-doctype="Employee" data-name="HR-EMP-00001" data-value="HR-EMP-00001">HR-EMP-00001: تجريبي</a></div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">employee</span></div></form>
    		</div><div class="form-column col-sm-6" data-fieldname="column_break_vyzm">
    			<form>
    			<div class="frappe-control input-max-width" data-fieldtype="Read Only" data-fieldname="employee_name">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label" style="padding-right: 0px;">Employee Name</label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input" style="display: none;"></div>
    					<div class="control-value like-disabled-input" style="">تجريبي</div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">employee_name</span></div></form>
    		</div></div></div><div class="row form-section visible-section" data-fieldname="section_break_rqxm"><div class="section-body"><div class="form-column col-sm-6" data-fieldname="__column_2">
    			<form>
    			<div class="frappe-control input-max-width" data-fieldtype="Link" data-fieldname="attendance">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label" style="padding-right: 0px;">Attendance</label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input"><div class="link-field ui-front" style="position: relative;">
    		<div class="awesomplete"><input type="text" class="input-with-feedback form-control" maxlength="140" data-fieldtype="Link" data-fieldname="attendance" placeholder="" data-doctype="Timesheet Tool Details" data-target="Activity Type" autocomplete="off" aria-expanded="false" aria-owns="awesomplete_list_6" role="combobox"><ul hidden="" role="listbox" id="awesomplete_list_6"></ul><span class="visually-hidden" role="status" aria-live="assertive" aria-atomic="true">Begin typing for results.</span></div>
    		<span class="link-btn">
    			<a class="btn-clear no-decoration">
    				<svg class="icon  icon-xs" style="" aria-hidden="true">
    		<use class="" href="#icon-close-alt"></use>
    	</svg>
    			</a>
    			<a class="btn-open no-decoration" title="Open Link">
    				<svg class="icon  icon-xs" style="" aria-hidden="true">
    		<use class="" href="#icon-arrow-right"></use>
    	</svg>
    			</a>
    		</span>
    	</div></div>
    					<div class="control-value like-disabled-input" style="display: none;"><a href="/app/activity-type/Planning" data-doctype="Activity Type" data-name="Planning" data-value="Planning">Planning</a></div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">attendance</span></div><div class="frappe-control input-max-width" data-fieldtype="Float" data-fieldname="ratio_attendance">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label" style="padding-right: 0px;">Attendance Factor</label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input" style="display: none;"></div>
    					<div class="control-value like-disabled-input" style="">0.500</div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">ratio_attendance</span></div></form>
    		</div><div class="form-column col-sm-6" data-fieldname="column_break_eknf">
    			<form>
    			<div class="frappe-control input-max-width" data-fieldtype="Link" data-fieldname="salary_structure">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label" style="padding-right: 0px;">Salary Structure</label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input" style="display: none;"></div>
    					<div class="control-value like-disabled-input" style=""><a href="/app/salary-structure/Salary%20Structure%201" data-doctype="Salary Structure" data-name="Salary Structure 1" data-value="Salary Structure 1">Salary Structure 1</a></div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">salary_structure</span></div><div class="frappe-control input-max-width" data-fieldtype="Float" data-fieldname="hour">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label" style="padding-right: 0px;">Hour</label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input"><input type="text" autocomplete="off" class="input-with-feedback form-control" data-fieldtype="Float" data-fieldname="hour" placeholder="" data-doctype="Timesheet Tool Details"></div>
    					<div class="control-value like-disabled-input" style="display: none;">0</div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">hour</span></div><div class="frappe-control input-max-width hide-control" data-fieldtype="Float" data-fieldname="total_working_hours">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label" style="padding-right: 0px;"></label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input"></div>
    					<div class="control-value like-disabled-input" style="display: none;"></div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">total_working_hours</span></div></form>
    		</div></div></div><div class="row form-section visible-section" data-fieldname="section_break_usiu"><div class="section-body"><div class="form-column col-sm-6" data-fieldname="__column_3">
    			<form>
    			<div class="frappe-control input-max-width" data-fieldtype="Float" data-fieldname="over_time_n">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label" style="padding-right: 0px;">Over Time N</label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input"><input type="text" autocomplete="off" class="input-with-feedback form-control" data-fieldtype="Float" data-fieldname="over_time_n" placeholder="" data-doctype="Timesheet Tool Details"></div>
    					<div class="control-value like-disabled-input" style="display: none;">5</div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">over_time_n</span></div><div class="frappe-control input-max-width" data-fieldtype="Float" data-fieldname="over_time_h">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label" style="padding-right: 0px;">Over Time H</label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input"><input type="text" autocomplete="off" class="input-with-feedback form-control" data-fieldtype="Float" data-fieldname="over_time_h" placeholder="" data-doctype="Timesheet Tool Details"></div>
    					<div class="control-value like-disabled-input" style="display: none;">5</div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">over_time_h</span></div></form>
    		</div><div class="form-column col-sm-6" data-fieldname="column_break_fbzv">
    			<form>
    			<div class="frappe-control input-max-width" data-fieldtype="Float" data-fieldname="deduction">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label" style="padding-right: 0px;">Deduction</label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input"><input type="text" autocomplete="off" class="input-with-feedback form-control" data-fieldtype="Float" data-fieldname="deduction" placeholder="" data-doctype="Timesheet Tool Details"></div>
    					<div class="control-value like-disabled-input" style="display: none;">5</div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">deduction</span></div><div class="frappe-control input-max-width" data-fieldtype="Currency" data-fieldname="hourly_rate">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label" style="padding-right: 0px;">Hourly Rate</label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input" style="display: none;"></div>
    					<div class="control-value like-disabled-input" style="">ل.د 100,000.000</div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">hourly_rate</span></div><div class="frappe-control input-max-width hide-control" data-fieldtype="Currency" data-fieldname="total_payment">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label" style="padding-right: 0px;"></label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input"></div>
    					<div class="control-value like-disabled-input" style="display: none;"></div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">total_payment</span></div></form>
    		</div></div></div><div class="row form-section visible-section" data-fieldname="remarks_section"><div class="section-body"><div class="form-column col-sm-12" data-fieldname="__column_4">
    			<form>
    			<div class="frappe-control" data-fieldtype="Small Text" data-fieldname="remarks">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label" style="padding-right: 0px;">Remarks</label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input"><textarea type="text" autocomplete="off" class="input-with-feedback form-control" data-fieldtype="Small Text" data-fieldname="remarks" placeholder="" data-doctype="Timesheet Tool Details" style="height: 150px;"></textarea></div>
    					<div class="control-value like-disabled-input for-description" style="display: none; white-space-collapse: preserve;"></div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">remarks</span></div></form>
    		</div></div></div></div></div></div>
    			<div class="grid-footer-toolbar hidden-xs flex justify-between">
    				<div class="grid-shortcuts">
    					<span> <svg class="icon  icon-md" style="" aria-hidden="true">
    		<use class="" href="#icon-keyboard"></use>
    	</svg> </span>
    					<span class="text-medium"> Shortcuts: </span>
    					<kbd>Ctrl + Up</kbd> . <kbd>Ctrl + Down</kbd> . <kbd>ESC</kbd>
    				</div>
    				<button class="btn btn-secondary btn-sm pull-right grid-append-row">
    					Insert Below
    				</button>
    			</div>
    		</div></div></div></div>
    						<div class="grid-empty text-center hidden">
    							<img src="/assets/frappe/images/ui-states/grid-empty-state.svg" alt="Grid Empty State" class="grid-empty-illustration">
    							No Data
    						</div>
    					</div>
    				</div>
    			</div>
    			<div class="small form-clickable-section grid-footer">
    				<div class="flex justify-between">
    					<div class="grid-buttons">
    						<button type="button" class="btn btn-xs btn-danger grid-remove-rows hidden" data-action="delete_rows" style="display: none;">
    							Delete
    						</button>
    						<button type="button" class="btn btn-xs btn-danger grid-remove-all-rows hidden" data-action="delete_all_rows">
    							Delete All
    						</button>
    						<!-- hack to allow firefox include this in tabs -->
    						<button type="button" class="btn btn-xs btn-secondary grid-add-row" style="display: none;">
    							Add Row
    						</button>
    						<button type="button" class="grid-add-multiple-rows btn btn-xs btn-secondary hidden" style="display: inline-block;">
    							Add Multiple
    						</button>
    					</div>
    					<div class="grid-pagination"></div>
    					<div class="grid-bulk-actions text-right">
    						<button type="button" class="grid-download btn btn-xs btn-secondary hidden">
    							Download
    						</button>
    						<button type="button" class="grid-upload btn btn-xs btn-secondary hidden" style="display: inline-block;">
    							Upload
    						</button>
    					</div>
    				</div>
    			</div>
    		</div></div></form>
    		</div></div></div></div></div></div></div></div>
    					<div class="layout-footer hide"></div>
    				<div><div class="form-footer">  <div class="after-save">   <div class="comment-box"><div class="comment-input-wrapper">
    			<div class="comment-input-header">
    			<span>Comments</span>
    			</div>
    			<div class="comment-input-container">
    			<span class="avatar avatar-medium" title="Administrator">
    		<div class="avatar-frame standard-image" style="background-color: var(--dark-green-avatar-bg); color: var(--dark-green-avatar-color)" title="Administrator">
    				A
    		</div>
    	</span>
    				<div class="frappe-control col" data-fieldtype="Comment" data-fieldname="comment"><span class="tooltip-content">comment</span><div class="ql-container ql-bubble" style="position: relative;"><div class="ql-editor ql-blank" data-gramm="false" contenteditable="true" data-placeholder="Type a reply / comment"><p><br></p></div><div class="ql-tooltip ql-hidden"><span class="ql-tooltip-arrow"></span><div class="ql-tooltip-editor"><input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL"><a class="ql-close"></a></div><div class="ql-toolbar"><span class="ql-formats"><button type="button" class="ql-bold"><svg viewBox="0 0 18 18"> <path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"></path> <path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"></path> </svg></button><button type="button" class="ql-italic"><svg viewBox="0 0 18 18"> <line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"></line> <line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"></line> <line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"></line> </svg></button><button type="button" class="ql-underline"><svg viewBox="0 0 18 18"> <path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"></path> <rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"></rect> </svg></button><button type="button" class="ql-strike"><svg viewBox="0 0 18 18"> <line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"></line> <path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"></path> <path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"></path> </svg></button></span><span class="ql-formats"><button type="button" class="ql-blockquote"><svg viewBox="0 0 18 18"> <rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"></rect> <rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"></rect> <path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"></path> <path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"></path> </svg></button><button type="button" class="ql-code-block"><svg viewBox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"></line> </svg></button></span><span class="ql-formats"><button type="button" class="ql-direction" value="rtl"><svg viewBox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"></line> <path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"></path> <rect class="ql-fill" height="11" width="1" x="11" y="4"></rect> <rect class="ql-fill" height="11" width="1" x="13" y="4"></rect> </svg><svg viewBox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"></line> <path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"></path> <rect class="ql-fill" height="11" width="1" x="5" y="4"></rect> <rect class="ql-fill" height="11" width="1" x="7" y="4"></rect> </svg></button></span><span class="ql-formats"><button type="button" class="ql-link"><svg viewBox="0 0 18 18"> <line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"></line> <path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"></path> <path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"></path> </svg></button><button type="button" class="ql-image"><svg viewBox="0 0 18 18"> <rect class="ql-stroke" height="10" width="12" x="3" y="4"></rect> <circle class="ql-fill" cx="6" cy="7" r="1"></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg></button></span><span class="ql-formats"><button type="button" class="ql-list" value="ordered"><svg viewBox="0 0 18 18"> <line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"></line> <line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"></line> <line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"></line> <line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"></line> <path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"></path> <path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"></path> <path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"></path> </svg></button><button type="button" class="ql-list" value="bullet"><svg viewBox="0 0 18 18"> <line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"></line> <line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"></line> <line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"></line> <line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"></line> <line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"></line> <line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"></line> </svg></button></span><span class="ql-formats"><span class="ql-align ql-picker ql-icon-picker"><span class="ql-picker-label" tabindex="0" role="button" aria-expanded="false" aria-controls="ql-picker-options-0"><svg viewBox="0 0 18 18"> <line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"></line> <line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"></line> <line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"></line> </svg></span><span class="ql-picker-options" aria-hidden="true" tabindex="-1" id="ql-picker-options-0"><span tabindex="0" role="button" class="ql-picker-item ql-selected"><svg viewBox="0 0 18 18"> <line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"></line> <line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"></line> <line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"></line> </svg></span><span tabindex="0" role="button" class="ql-picker-item" data-value="center"><svg viewBox="0 0 18 18"> <line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"></line> <line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"></line> <line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"></line> </svg></span><span tabindex="0" role="button" class="ql-picker-item" data-value="right"><svg viewBox="0 0 18 18"> <line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"></line> <line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"></line> <line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"></line> </svg></span><span tabindex="0" role="button" class="ql-picker-item" data-value="justify"><svg viewBox="0 0 18 18"> <line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"></line> <line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"></line> <line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"></line> </svg></span></span></span><select class="ql-align" style="display: none;"><option selected="selected"></option><option value="center"></option><option value="right"></option><option value="justify"></option></select></span><span class="ql-formats"><button type="button" class="ql-clean"><svg class="" viewBox="0 0 18 18"> <line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"></line> <line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"></line> <line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"></line> <line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"></line> <rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"></rect> </svg></button></span></div></div><div class="ql-mention-list-container" style="display: none; position: absolute;"><ul class="ql-mention-list"></ul></div></div></div>
    			</div>
    			<button class="btn hidden btn-comment btn-xs" style="margin-left:48px;">
    				Comment
    			</button>
    		</div></div>   <div class="new-timeline">
    			<div class="timeline-item activity-title">
    			<h4>Activity</h4>
    			<div class="timeline-items timeline-actions" style="">
    			<div class="timeline-item">
    				<div class="timeline-content action-buttons"><button class="btn btn-xs btn-secondary action-btn">
    		<svg class="es-icon es-line  icon-xs" style="" aria-hidden="true">
    		<use class="" href="#es-line-add"></use>
    	</svg>
    		New Email
    	</button></div>
    			</div>
    		</div></div>
    		<div class="timeline-items"><div class="timeline-item" data-timestamp="2024-12-22 15:36:04.113769"><div class="timeline-dot"></div><div class="timeline-content ">You last edited this<span> · <span class="frappe-timestamp " data-timestamp="2024-12-22 15:36:04.113769" title="22-12-2024 15:36:04">19 minutes ago</span></span></div></div><div class="timeline-item" data-timestamp="2024-12-21 22:48:55.833230"><div class="timeline-dot"></div><div class="timeline-content ">You created this<span> · <span class="frappe-timestamp " data-timestamp="2024-12-21 22:48:55.833230" title="21-12-2024 22:48:55">17 hours ago</span></span></div></div></div></div>  </div>  <button class="scroll-to-top btn btn-default icon-btn" onclick="frappe.utils.scroll_to(0)">   <svg class="icon icon-xs"><use href="#icon-up-line"></use></svg>  </button> </div></div></div>
    			</div></div>  </div> </div></div>
    
  12. Assistant

    شكرًا لمشاركة كود الـ HTML الذي يمثل واجهة المستخدم لنموذج Timesheet Tool. سأقوم بمساعدتك في فهم كيفية تعطيل الأزرار [Move, Duplicate, Insert Above, Insert Below] التي تظهر عند عرض بيانات جدول timesheet_tool_details.

    الخطوات لتطبيق التعديلات

    سوف تعمل التعديلات على الكود الموجود في ملف JavaScript الذي لديك (كما هو موضح قبل). سأقوم بإعادة توضيح كيفية تنفيذ هذه التعديلات واستخدام الكود اللازم.

    تعديل JavaScript لتعطيل الأزرار

    إليك الخطوات اللازمة لتعديل الكود لتعطيل الأزرار في الجدول الفرعي:

    1. تحديد موقع دالة refresh في ملف جافا سكريبت (timesheet_tool.js).
    2. إضافة كود لتعطيل الأزرار داخل دالة refresh.

    إليك كيف سيكون شكل الكود بعد التعديل:

    frappe.ui.form.on("Timesheet Tool", {
        refresh(frm) {
            // Amendment of the filter for the staff field to bring only active staff with Salary Structure Assignment
            frm.fields_dict['timesheet_tool_details'].grid.get_field('employee').get_query = function(doc, cdt, cdn) {
                return {
                    query: "time_sheet_tool.time_sheet_tool.utils.timesheet_tool.get_active_employees_with_salary"
                };
            };
    
            // Hide the addition button
            frm.fields_dict['timesheet_tool_details'].grid.wrapper.find('.grid-add-row').hide();
    
            // hide the deletion button
            frm.fields_dict['timesheet_tool_details'].grid.wrapper.find('.grid-remove-rows').hide();
    
            // Hide the selection box in each row.
            frm.fields_dict['timesheet_tool_details'].grid.wrapper.find('.grid-row-check').closest('.row-check').hide();
            
            // Disable action buttons in timesheet_tool_details
            frm.fields_dict['timesheet_tool_details'].grid.after_render = function() {
                const $grid = $(this.wrapper);
                $grid.find('.grid-move-row').remove();          // Disable Move button
                $grid.find('.grid-duplicate-row').remove();      // Disable Duplicate button
                $grid.find('.grid-insert-row').remove();         // Disable Insert Above button
                $grid.find('.grid-insert-row-below').remove();   // Disable Insert Below button
            };
    
            // Management of the "Create Attendance" button.
            if (frm.doc.docstatus === 1 && hasRole("Create Timesheet")) {
                let can_show_create_timesheet = handle_button(
                    frm,
                    "time_sheet_tool.time_sheet_tool.utils.timesheet_tool.check_missing_records",
                    "create_attendance",
                    "Create Timesheet",
                    "Timesheet records have been created successfully.",
                    "All records have already been created."
                );
    
                // Hide "Approval Attendance" button if "Create Timesheet" button is visible
                if (can_show_create_timesheet) {
                    frm.remove_custom_button("Submit Timesheet");
                }
            }
    
            // Management of "Approval Attendance"
            if (frm.doc.docstatus === 1 && hasRole("Submit Timesheet")) {
                handle_button(
                    frm,
                    "time_sheet_tool.time_sheet_tool.utils.timesheet_tool.check_missing_records_for_approval",
                    "approval_attendance",
                    "Submit Timesheet",
                    "Timesheet records have been approved successfully.",
                    "All records have already been approved."
                );
            }
            
            // Set query for project field
            frm.set_query('project', () => {
                let filters = {
                    company: frm.doc.company,
                };
                return { filters: filters };
            });
        },
    
        // باقي وظائف الكود...
    });
    

    شرح التعديلات

    • after_render: تم استخدام هذه الدالة لتعطيل الأزرار "Move"، "Duplicate"، "Insert Above"، و"Insert Below" بعد تحميل الجدول الفرعي.
    • remove(): بينما سيتم إزالة الأزرار من DOM، مما يمنع المستخدمين من التفاعل معها.

    التطبيقات والتجريب

    1. قم بنسخ ولصق الكود المعدل في ملف JavaScript الخاص بك.
    2. احفظ التعديلات وأعد تحميل كل ما يتعلق بنموذج Timesheet Tool.
    3. تحقق من الجدول الفرعي timesheet_tool_details لرؤية ما إذا تم تعطيل الأزرار بنجاح.

    إذا كان لديك أي استفسارات أخرى أو كنت بحاجة لمزيد من المساعدة، فلا تتردد في طرحها!

  13. User
    					<span class="menu-item-label" data-label="Print">Print</span>
    				</a>
    			</li><li>
    				<a class="grey-link dropdown-item" href="#" onclick="return false;">
    					
    					<span class="menu-item-label" data-label="Email"><span><span class="alt-underline">E</span>mail</span></span>
    					<kbd class="pull-right">
    						<span>Ctrl+E</span>
    					</kbd>
    				</a>
    			</li><li>
    				<a class="grey-link dropdown-item" href="#" onclick="return false;">
    					
    					<span class="menu-item-label" data-label="Jump%20to%20field"><span><span class="alt-underline">J</span>ump to field</span></span>
    					<kbd class="pull-right">
    						<span>Ctrl+J</span>
    					</kbd>
    				</a>
    			</li><li>
    				<a class="grey-link dropdown-item" href="#" onclick="return false;">
    					
    					<span class="menu-item-label" data-label="Links"><span><span class="alt-underline">L</span>inks</span></span>
    				</a>
    			</li><li>
    				<a class="grey-link dropdown-item" href="#" onclick="return false;">
    					
    					<span class="menu-item-label" data-label="Duplicate"><span><span class="alt-underline">D</span>uplicate</span></span>
    					<kbd class="pull-right">
    						<span>⇧+D</span>
    					</kbd>
    				</a>
    			</li><li>
    				<a class="grey-link dropdown-item" href="#" onclick="return false;">
    					
    					<span class="menu-item-label" data-label="Copy%20to%20Clipboard"><span><span class="alt-underline">C</span>opy to Clipboard</span></span>
    				</a>
    			</li><li>
    				<a class="grey-link dropdown-item" href="#" onclick="return false;">
    					
    					<span class="menu-item-label" data-label="Rename"><span><span class="alt-underline">R</span>ename</span></span>
    				</a>
    			</li><li>
    				<a class="grey-link dropdown-item" href="#" onclick="return false;">
    					
    					<span class="menu-item-label" data-label="Reload"><span>Rel<span class="alt-underline">o</span>ad</span></span>
    				</a>
    			</li><li>
    				<a class="grey-link dropdown-item" href="#" onclick="return false;">
    					
    					<span class="menu-item-label" data-label="Delete">Delete</span>
    					<kbd class="pull-right">
    						<span>⇧+Ctrl+D</span>
    					</kbd>
    				</a>
    			</li><li>
    				<a class="grey-link dropdown-item" href="#" onclick="return false;">
    					
    					<span class="menu-item-label" data-label="Remind%20Me">Remind Me</span>
    					<kbd class="pull-right">
    						<span>⇧+R</span>
    					</kbd>
    				</a>
    			</li><li>
    				<a class="grey-link dropdown-item" href="#" onclick="return false;">
    					
    					<span class="menu-item-label" data-label="Undo">Undo</span>
    					<kbd class="pull-right">
    						<span>Ctrl+Z</span>
    					</kbd>
    				</a>
    			</li><li>
    				<a class="grey-link dropdown-item" href="#" onclick="return false;">
    					
    					<span class="menu-item-label" data-label="Redo">Redo</span>
    					<kbd class="pull-right">
    						<span>Ctrl+Y</span>
    					</kbd>
    				</a>
    			</li><li>
    				<a class="grey-link dropdown-item" href="#" onclick="return false;">
    					
    					<span class="menu-item-label" data-label="Customize"><span>Custom<span class="alt-underline">i</span>ze</span></span>
    				</a>
    			</li><li>
    				<a class="grey-link dropdown-item" href="#" onclick="return false;">
    					
    					<span class="menu-item-label" data-label="Edit%20DocType">Edit DocType</span>
    				</a>
    			</li><li>
    				<a class="grey-link dropdown-item" href="#" onclick="return false;">
    					
    					<span class="menu-item-label" data-label="New%20Timesheet%20Tool"><span><span class="alt-underline">N</span>ew Timesheet Tool</span></span>
    					<kbd class="pull-right">
    						<span>Ctrl+B</span>
    					</kbd>
    				</a>
    			</li></ul>      </div>      <button class="btn btn-secondary btn-default btn-sm hide"></button>      <div class="actions-btn-group hide">       <button type="button" class="btn btn-primary btn-sm" data-toggle="dropdown" aria-expanded="false">        <span>         <span class="hidden-xs actions-btn-group-label" data-label="Actions"><span><span class="alt-underline">A</span>ctions</span></span>         <svg class="icon icon-xs">          <use href="#icon-select">          </use>         </svg>        </span>       </button>       <ul class="dropdown-menu dropdown-menu-right" role="menu">       </ul>      </div>      <button class="btn btn-primary btn-sm primary-action" data-label="Submit"><span>S<span class="alt-underline">u</span>bmit</span></button>     </div>    </div>   </div>  </div> </div> <div class="container page-body">  <div class="page-toolbar hide">   <div class="container">   </div>  </div>  <div class="page-wrapper">   <div class="page-content">    <div class="workflow-button-area btn-group pull-right hide"></div>    <div class="clearfix"></div>   <div class="row layout-main">
    				<div class="col-lg-2 layout-side-section"><div class="form-sidebar overlay-sidebar hidden-xs hidden-sm"><ul class="list-unstyled sidebar-menu user-actions hidden"></ul> <ul class="list-unstyled sidebar-menu sidebar-image-section hide">  <li class="sidebar-image-wrapper">   <img class="sidebar-image">   <div class="sidebar-standard-image">    <div class="standard-image"></div>   </div>      <div class="sidebar-image-actions">    <div class="dropdown">     <a href="#" class="dropdown-toggle" data-toggle="dropdown">Change</a>     <div class="dropdown-menu" role="menu">      <a class="dropdown-item sidebar-image-change">Upload</a>      <a class="dropdown-item sidebar-image-remove">Remove</a>     </div>    </div>   </div>     </li> </ul>  <ul class="list-unstyled sidebar-menu sidebar-rating hide">  <li style="position: relative;">   <a class="strong badge-hover">    <span>Feedback</span>   </a>  </li>  <li class="rating-icons"></li> </ul> <ul class="list-unstyled sidebar-menu hidden">   </ul> <ul class="list-unstyled sidebar-menu form-assignments">  <li>   <span class="form-sidebar-items">    <span class="add-assignment-label">     <svg class="es-icon ml-0 icon-sm"><use href="#es-line-add-people"></use></svg>     <span class="ellipsis">Assigned To</span>    </span>    <button class="add-assignment-btn btn btn-link icon-btn">     <svg class="es-icon icon-sm"><use href="#es-line-add"></use></svg>    </button>   </span>   <div class="assignments" style="display: none;"></div>  </li> </ul> <ul class="list-unstyled sidebar-menu form-attachments">  <li class="attachments-actions">   <span class="form-sidebar-items">    <span>     <svg class="es-icon ml-0 icon-sm">      <use href="#es-line-attachment"></use>     </svg>     <a class="pill-label ellipsis explore-link">      Attachments     </a>    </span>    <button class="add-attachment-btn btn btn-link icon-btn">     <svg class="es-icon icon-sm"><use href="#es-line-add"></use></svg>    </button>   </span>  </li>  <a class="show-all-btn hidden" href="">   <svg class="es-icon icon-sm">    <use href="#es-line-preview"></use>   </svg>   <span class="pill-label ellipsis">    Show All   </span>  </a> </ul>  <ul class="list-unstyled sidebar-menu form-tags">   <li>    <span class="form-sidebar-items">     <span>      <svg class="es-icon ml-0 icon-sm"><use href="#es-line-tag"></use></svg>      <span class="tags-label ellipsis">Tags</span>     </span>    <button class="add-tags-btn text-muted btn btn-link icon-btn" id="add_tags">
    			<svg class="es-icon icon-sm"><use href="#es-line-add"></use></svg>
    		</button></span>   </li> <li class="" style="display: none;"><div class="awesomplete"><input class="tags-input form-control" autocomplete="off" aria-expanded="false" aria-owns="awesomplete_list_2" role="combobox"><ul hidden="" role="listbox" id="awesomplete_list_2"></ul><span class="visually-hidden" role="status" aria-live="assertive" aria-atomic="true">Begin typing for results.</span></div></li></ul> <ul class="list-unstyled sidebar-menu form-shared">  <li>   <span class="form-sidebar-items">    <span class="share-label">     <svg class="es-icon ml-0 icon-sm"><use href="#es-line-add-people"></use></svg>     <span class="ellipsis">Share</span>    </span>    <button class="share-doc-btn btn btn-link icon-btn">     <svg class="es-icon icon-sm"><use href="#es-line-add"></use></svg>    </button>   </span>   <div class="shares" style="display: none;"></div>  </li> </ul> <ul class="list-unstyled sidebar-menu followed-by-section">  <li class="sidebar-label followed-by-label hidden">   <svg class="icon icon-sm">    <use href="#icon-link-url" class="like-icon"></use>   </svg>   Followed by  </li>  <li class="followed-by"></li>  <li class="document-follow">   <a class="badge-hover follow-document-link hidden">    Follow   </a>   <a class="badge-hover unfollow-document-link hidden">    Unfollow   </a>  </li> </ul> <ul class="list-unstyled sidebar-menu">  <a><li class="auto-repeat-status"></li></a><li><a></a> </li></ul> <ul class="list-unstyled sidebar-menu form-sidebar-stats">  <li class="flex">   <div class="form-stats d-flex">    <span class="form-stats-likes">     <span class="liked-by like-action d-flex align-items-center not-liked" data-doctype="Timesheet Tool" data-name="TT-2024-12-31-0029">      <svg class="es-icon icon-sm">       <use href="#es-solid-heart" class="like-icon" data-original-title="" title=""></use>      </svg>      <span class="like-count ml-2">0</span>     </span>    </span>    <span class="mx-2">·</span>    <a class="comments d-flex align-items-center">     <svg class="es-icon icon-sm">      <use href="#es-line-chat-alt" class="comment-icon"></use>     </svg>     <span class="comments-count ml-2">0</span>    </a>   </div>   <a class="form-follow text-sm">Follow</a>  </li> </ul> <hr> <ul class="list-unstyled sidebar-menu text-muted">  <li class="pageview-count"></li>  <li class="modified-by">You last edited this · <span class="frappe-timestamp " data-timestamp="2024-12-22 15:36:04.113769" title="22-12-2024 15:36:04">20 minutes ago</span></li>  <li class="created-by">You created this · <span class="frappe-timestamp " data-timestamp="2024-12-21 22:48:55.833230" title="21-12-2024 22:48:55">17 hours ago</span></li> </ul>  </div></div>
    				<div class="col layout-main-section-wrapper">
    					<div class="layout-main-section"><div class="page-form row hide"></div><div><div class="std-form-layout"><div class="form-layout"><div class="form-message blue"><div>Submit this document to confirm</div><div class="close-message"><svg class="icon  icon-sm" style="" aria-hidden="true">
    		<use class="" href="#icon-close"></use>
    	</svg></div></div><div class="form-page"><div class="form-dashboard visible-section"><div class="row form-dashboard-section progress-area hide-control" data-fieldname="undefined"><div class="section-body"></div></div><div class="row form-dashboard-section form-heatmap hide-control" data-fieldname="undefined"><div class="section-head collapsible">
    			Activity
    			<span class="ml-2 collapse-indicator mb-1" style=""><svg class="es-icon es-line  icon-sm" style="" aria-hidden="true">
    		<use class="mb-1" href="#es-line-up"></use>
    	</svg></span>
    		</div><div class="section-body">
    			<div id="heatmap-timesheet_tool" class="heatmap"></div>
    			<div class="text-muted small heatmap-message hidden"></div>
    		</div></div><div class="row form-dashboard-section form-graph hide-control" data-fieldname="undefined"><div class="section-head collapsible">
    			Graph
    			<span class="ml-2 collapse-indicator mb-1" style=""><svg class="es-icon es-line  icon-sm" style="" aria-hidden="true">
    		<use class="mb-1" href="#es-line-up"></use>
    	</svg></span>
    		</div><div class="section-body"></div></div><div class="row form-dashboard-section form-stats hide-control" data-fieldname="undefined"><div class="section-head collapsible">
    			Stats
    			<span class="ml-2 collapse-indicator mb-1" style=""><svg class="es-icon es-line  icon-sm" style="" aria-hidden="true">
    		<use class="mb-1" href="#es-line-up"></use>
    	</svg></span>
    		</div><div class="section-body"><div class="row"></div></div></div><div class="row form-dashboard-section form-links" data-fieldname="undefined"><div class="section-head collapsible">
    			Connections
    			<span class="ml-2 collapse-indicator mb-1" style=""><svg class="es-icon es-line  icon-sm" style="" aria-hidden="true">
    		<use class="mb-1" href="#es-line-up"></use>
    	</svg></span>
    		</div><div class="section-body"><div class="transactions"><div class="form-documents">        <div class="row">       <div class="col-md-4">     <div class="form-link-title">      <span>Timesheet</span>     </div>                 <div class="document-link" data-doctype="Timesheet">       <div class="document-link-badge" data-doctype="Timesheet">        <span class="count hidden"></span>        <a class="badge-link">Timesheet</a>       </div>       <span class="open-notification hidden" title="Open Timesheet">       </span>               <button class="btn btn-new btn-secondary btn-xs icon-btn hidden" data-doctype="Timesheet">         <svg class="icon icon-sm"><use href="#icon-add"></use></svg>        </button>             </div>         </div>            <div class="col-md-4">     <div class="form-link-title">      <span>Additional Salary</span>     </div>                 <div class="document-link" data-doctype="Additional Salary">       <div class="document-link-badge" data-doctype="Additional Salary">        <span class="count hidden"></span>        <a class="badge-link">Additional Salary</a>       </div>       <span class="open-notification hidden" title="Open Additional Salary">       </span>               <button class="btn btn-new btn-secondary btn-xs icon-btn hidden" data-doctype="Additional Salary">         <svg class="icon icon-sm"><use href="#icon-add"></use></svg>        </button>             </div>         </div>      </div>      </div></div></div></div></div><div class="row form-section card-section empty-section" data-fieldname="__section_1"><div class="section-body"><div class="form-column col-sm-12" data-fieldname="__column_1">
    			<form>
    			<div class="frappe-control input-max-width hide-control" data-fieldtype="Data" data-fieldname="__newname">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label" style="padding-right: 0px;"></label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input"></div>
    					<div class="control-value like-disabled-input" style="display: none;"></div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">__newname</span></div></form>
    		</div></div></div><div class="row form-section card-section visible-section" data-fieldname="section_break_d92t"><div class="section-body"><div class="form-column col-sm-4" data-fieldname="__column_2">
    			<form>
    			<div class="frappe-control input-max-width" data-fieldtype="Link" data-fieldname="project">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label reqd" style="padding-right: 0px;">Project</label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input"><div class="link-field ui-front" style="position: relative;">
    		<div class="awesomplete"><input type="text" class="input-with-feedback form-control bold" maxlength="140" data-fieldtype="Link" data-fieldname="project" placeholder="" data-doctype="Timesheet Tool" data-target="Project" autocomplete="off" aria-expanded="false" aria-owns="awesomplete_list_3" role="combobox"><ul hidden="" role="listbox" id="awesomplete_list_3"></ul><span class="visually-hidden" role="status" aria-live="assertive" aria-atomic="true">Begin typing for results.</span></div>
    		<span class="link-btn">
    			<a class="btn-clear no-decoration">
    				<svg class="icon  icon-xs" style="" aria-hidden="true">
    		<use class="" href="#icon-close-alt"></use>
    	</svg>
    			</a>
    			<a class="btn-open no-decoration" title="Open Link">
    				<svg class="icon  icon-xs" style="" aria-hidden="true">
    		<use class="" href="#icon-arrow-right"></use>
    	</svg>
    			</a>
    		</span>
    	</div></div>
    					<div class="control-value like-disabled-input bold" style="display: none;"><a href="/app/project/PROJ-0002" data-doctype="Project" data-name="PROJ-0002" data-value="PROJ-0002">PROJ-0002</a></div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">project</span></div><div class="frappe-control input-max-width hide-control" data-fieldtype="Link" data-fieldname="amended_from">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label" style="padding-right: 0px;"></label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input"></div>
    					<div class="control-value like-disabled-input" style="display: none;"></div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">amended_from</span></div></form>
    		</div><div class="form-column col-sm-4" data-fieldname="column_break_fyyw">
    			<form>
    			<div class="frappe-control input-max-width" data-fieldtype="Link" data-fieldname="company">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label reqd" style="padding-right: 0px;">Company</label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input"><div class="link-field ui-front" style="position: relative;">
    		<div class="awesomplete"><input type="text" class="input-with-feedback form-control bold" maxlength="140" data-fieldtype="Link" data-fieldname="company" placeholder="" data-doctype="Timesheet Tool" data-target="Company" autocomplete="off" aria-expanded="false" aria-owns="awesomplete_list_4" role="combobox"><ul hidden="" role="listbox" id="awesomplete_list_4"></ul><span class="visually-hidden" role="status" aria-live="assertive" aria-atomic="true">Begin typing for results.</span></div>
    		<span class="link-btn">
    			<a class="btn-clear no-decoration">
    				<svg class="icon  icon-xs" style="" aria-hidden="true">
    		<use class="" href="#icon-close-alt"></use>
    	</svg>
    			</a>
    			<a class="btn-open no-decoration" title="Open Link">
    				<svg class="icon  icon-xs" style="" aria-hidden="true">
    		<use class="" href="#icon-arrow-right"></use>
    	</svg>
    			</a>
    		</span>
    	</div></div>
    					<div class="control-value like-disabled-input bold" style="display: none;"><a href="/app/company/Ebkar%20(Demo)" data-doctype="Company" data-name="Ebkar (Demo)" data-value="Ebkar (Demo)">Ebkar (Demo)</a></div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">company</span></div></form>
    		</div><div class="form-column col-sm-4" data-fieldname="column_break_qgiv">
    			<form>
    			<div class="frappe-control input-max-width" data-fieldtype="Date" data-fieldname="day">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label reqd" style="padding-right: 0px;">Timesheet Day </label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input"><input type="text" autocomplete="off" class="input-with-feedback form-control bold" data-fieldtype="Date" data-fieldname="day" placeholder="" data-doctype="Timesheet Tool"></div>
    					<div class="control-value like-disabled-input bold" style="display: none;">31-12-2024</div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">day</span></div></form>
    		</div></div></div><div class="row form-section card-section visible-section" data-fieldname="section_break_jssf"><div class="section-body"><div class="form-column col-sm-12" data-fieldname="__column_3">
    			<form>
    			<div class="frappe-control input-max-width" data-fieldtype="Button" data-fieldname="get_employee">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label hide" style="padding-right: 0px;">&nbsp;</label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input"><button class="btn btn-xs btn-default" data-fieldtype="Button" data-fieldname="get_employee" placeholder="" data-doctype="Timesheet Tool" value="">Get Project Team</button></div>
    					<div class="hide" style="display: none;"></div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">get_employee</span></div><div class="frappe-control form-group" data-fieldtype="Table" data-fieldname="timesheet_tool_details"><span class="tooltip-content">timesheet_tool_details</span><div class="grid-field">
    			<label class="control-label">Timesheet Tool Details</label>
    			<span class="help"></span>
    			<p class="text-muted small grid-description" style="display: none;"></p>
    			<div class="grid-custom-buttons"></div>
    			<div class="form-grid-container">
    				<div class="form-grid">
    					<div class="grid-heading-row"><div class="grid-row"><div class="data-row row"><div class="row-check sortable-handle col" style="display: none;">
    				<input type="checkbox" class="grid-row-check">
    			</div><div class="row-index sortable-handle col">
    				<span>No.</span>
    			</div><div class="col grid-static-col col-xs-2 " data-fieldname="employee" data-fieldtype="Link" title="Team Member"><div class="field-area" style="display: none;"></div><div class="static-area ellipsis reqd">Team Member</div></div><div class="col grid-static-col col-xs-2 " data-fieldname="employee_name" data-fieldtype="Read Only" title="Employee Name"><div class="field-area" style="display: none;"></div><div class="static-area ellipsis">Employee Name</div></div><div class="col grid-static-col col-xs-2 " data-fieldname="attendance" data-fieldtype="Link" title="Attendance"><div class="field-area" style="display: none;"></div><div class="static-area ellipsis">Attendance</div></div><div class="col grid-static-col col-xs-2  text-right" data-fieldname="ratio_attendance" data-fieldtype="Float" title="Attendance Factor"><div class="field-area" style="display: none;"></div><div class="static-area ellipsis">Attendance Factor</div></div><div class="col grid-static-col col-xs-2 " data-fieldname="salary_structure" data-fieldtype="Link" title="Salary Structure"><div class="field-area" style="display: none;"></div><div class="static-area ellipsis">Salary Structure</div></div><div class="col grid-static-col d-flex justify-content-center" style="cursor: pointer;">
    				<a><svg class="icon  icon-sm" style="filter: opacity(0.5)" aria-hidden="true">
    		<use class="" href="#icon-setting-gear"></use>
    	</svg></a>
    			</div></div></div></div>
    					<div class="grid-body">
    						<div class="rows"><div class="grid-row" data-name="gtq07o7se0" data-idx="1"><div class="data-row row" style=""><div class="row-check sortable-handle col" style="display: none;">
    				<input type="checkbox" class="grid-row-check">
    			</div><div class="row-index sortable-handle col">
    				<span>1</span>
    			</div><div class="col grid-static-col col-xs-2 bold" data-fieldname="employee" data-fieldtype="Link"><div class="field-area" style="display: none;"></div><div class="static-area ellipsis reqd"><a href="/app/employee/HR-EMP-00001" data-doctype="Employee" data-name="HR-EMP-00001" data-value="HR-EMP-00001">HR-EMP-00001: تجريبي</a></div></div><div class="col grid-static-col col-xs-2 " data-fieldname="employee_name" data-fieldtype="Read Only"><div class="field-area" style="display: none;"></div><div class="static-area ellipsis">تجريبي</div></div><div class="col grid-static-col col-xs-2 " data-fieldname="attendance" data-fieldtype="Link"><div class="field-area" style="display: none;"></div><div class="static-area ellipsis"><a href="/app/activity-type/Planning" data-doctype="Activity Type" data-name="Planning" data-value="Planning">Planning</a></div></div><div class="col grid-static-col col-xs-2  text-right" data-fieldname="ratio_attendance" data-fieldtype="Float"><div class="field-area" style="display: none;"></div><div class="static-area ellipsis"><div style="text-align: right">0.500</div></div></div><div class="col grid-static-col col-xs-2 " data-fieldname="salary_structure" data-fieldtype="Link"><div class="field-area" style="display: none;"></div><div class="static-area ellipsis"><a href="/app/salary-structure/Salary%20Structure%201" data-doctype="Salary Structure" data-name="Salary Structure 1" data-value="Salary Structure 1">Salary Structure 1</a></div></div><div class="col"><div class="btn-open-row" data-toggle="tooltip" data-placement="right" title="" data-original-title="Edit">
    						<a><svg class="icon  icon-xs" style="" aria-hidden="true">
    		<use class="" href="#icon-edit"></use>
    	</svg></a>
    					</div></div></div><div class="form-in-grid"><div class="grid-form-heading">
    			<div class="toolbar grid-header-toolbar">
    				<span class="panel-title">
    					Editing Row #<span class="grid-form-row-index">1</span></span>
    				<span class="row-actions">
    					<button class="btn btn-secondary btn-sm pull-right grid-collapse-row">
    						<svg class="icon  icon-sm" style="" aria-hidden="true">
    		<use class="" href="#icon-down"></use>
    	</svg>
    					</button>
    					<button class="btn btn-secondary btn-sm pull-right grid-move-row hidden-xs">
    						Move</button>
    					<button class="btn btn-secondary btn-sm pull-right grid-duplicate-row hidden-xs">
    						<svg class="icon  icon-sm" style="" aria-hidden="true">
    		<use class="" href="#icon-duplicate"></use>
    	</svg>
    						Duplicate
    					</button>
    					<button class="btn btn-secondary btn-sm pull-right grid-insert-row hidden-xs">
    						Insert Above</button>
    					<button class="btn btn-secondary btn-sm pull-right grid-insert-row-below hidden-xs">
    						Insert Below</button>
    					<button class="btn btn-danger btn-sm pull-right grid-delete-row">
    						<svg class="icon  icon-sm" style="" aria-hidden="true">
    		<use class="" href="#icon-delete"></use>
    	</svg>
    					</button>
    				</span>
    			</div>
    		</div>
    		<div class="grid-form-body">
    			<div class="form-area"><div class="form-layout"><div class="form-message hidden"></div><div class="form-page"><div class="row form-section visible-section" data-fieldname="__section_1"><div class="section-body"><div class="form-column col-sm-6" data-fieldname="__column_1">
    			<form>
    			<div class="frappe-control input-max-width" data-fieldtype="Link" data-fieldname="employee">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label reqd" style="padding-right: 0px;">Team Member</label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input"><div class="link-field ui-front" style="position: relative;">
    		<div class="awesomplete"><input type="text" class="input-with-feedback form-control bold" maxlength="140" data-fieldtype="Link" data-fieldname="employee" placeholder="" data-doctype="Timesheet Tool Details" data-target="Employee" autocomplete="off" aria-expanded="false" aria-owns="awesomplete_list_5" role="combobox" data-listener-added_a1a90814="true"><ul hidden="" role="listbox" id="awesomplete_list_5"></ul><span class="visually-hidden" role="status" aria-live="assertive" aria-atomic="true">Begin typing for results.</span></div>
    		<span class="link-btn" style="display: none;">
    			<a class="btn-clear no-decoration">
    				<svg class="icon  icon-xs" style="" aria-hidden="true">
    		<use class="" href="#icon-close-alt"></use>
    	</svg>
    			</a>
    			<a class="btn-open no-decoration" title="Open Link" href="/app/employee/HR-EMP-00001">
    				<svg class="icon  icon-xs" style="" aria-hidden="true">
    		<use class="" href="#icon-arrow-right"></use>
    	</svg>
    			</a>
    		</span>
    	</div></div>
    					<div class="control-value like-disabled-input bold" style="display: none;"><a href="/app/employee/HR-EMP-00001" data-doctype="Employee" data-name="HR-EMP-00001" data-value="HR-EMP-00001">HR-EMP-00001: تجريبي</a></div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">employee</span></div></form>
    		</div><div class="form-column col-sm-6" data-fieldname="column_break_vyzm">
    			<form>
    			<div class="frappe-control input-max-width" data-fieldtype="Read Only" data-fieldname="employee_name">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label" style="padding-right: 0px;">Employee Name</label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input" style="display: none;"></div>
    					<div class="control-value like-disabled-input" style="">تجريبي</div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">employee_name</span></div></form>
    		</div></div></div><div class="row form-section visible-section" data-fieldname="section_break_rqxm"><div class="section-body"><div class="form-column col-sm-6" data-fieldname="__column_2">
    			<form>
    			<div class="frappe-control input-max-width" data-fieldtype="Link" data-fieldname="attendance">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label" style="padding-right: 0px;">Attendance</label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input"><div class="link-field ui-front" style="position: relative;">
    		<div class="awesomplete"><input type="text" class="input-with-feedback form-control" maxlength="140" data-fieldtype="Link" data-fieldname="attendance" placeholder="" data-doctype="Timesheet Tool Details" data-target="Activity Type" autocomplete="off" aria-expanded="false" aria-owns="awesomplete_list_6" role="combobox"><ul hidden="" role="listbox" id="awesomplete_list_6"></ul><span class="visually-hidden" role="status" aria-live="assertive" aria-atomic="true">Begin typing for results.</span></div>
    		<span class="link-btn">
    			<a class="btn-clear no-decoration">
    				<svg class="icon  icon-xs" style="" aria-hidden="true">
    		<use class="" href="#icon-close-alt"></use>
    	</svg>
    			</a>
    			<a class="btn-open no-decoration" title="Open Link">
    				<svg class="icon  icon-xs" style="" aria-hidden="true">
    		<use class="" href="#icon-arrow-right"></use>
    	</svg>
    			</a>
    		</span>
    	</div></div>
    					<div class="control-value like-disabled-input" style="display: none;"><a href="/app/activity-type/Planning" data-doctype="Activity Type" data-name="Planning" data-value="Planning">Planning</a></div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">attendance</span></div><div class="frappe-control input-max-width" data-fieldtype="Float" data-fieldname="ratio_attendance">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label" style="padding-right: 0px;">Attendance Factor</label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input" style="display: none;"></div>
    					<div class="control-value like-disabled-input" style="">0.500</div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">ratio_attendance</span></div></form>
    		</div><div class="form-column col-sm-6" data-fieldname="column_break_eknf">
    			<form>
    			<div class="frappe-control input-max-width" data-fieldtype="Link" data-fieldname="salary_structure">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label" style="padding-right: 0px;">Salary Structure</label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input" style="display: none;"></div>
    					<div class="control-value like-disabled-input" style=""><a href="/app/salary-structure/Salary%20Structure%201" data-doctype="Salary Structure" data-name="Salary Structure 1" data-value="Salary Structure 1">Salary Structure 1</a></div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">salary_structure</span></div><div class="frappe-control input-max-width" data-fieldtype="Float" data-fieldname="hour">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label" style="padding-right: 0px;">Hour</label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input"><input type="text" autocomplete="off" class="input-with-feedback form-control" data-fieldtype="Float" data-fieldname="hour" placeholder="" data-doctype="Timesheet Tool Details"></div>
    					<div class="control-value like-disabled-input" style="display: none;">0</div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">hour</span></div><div class="frappe-control input-max-width hide-control" data-fieldtype="Float" data-fieldname="total_working_hours">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label" style="padding-right: 0px;"></label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input"></div>
    					<div class="control-value like-disabled-input" style="display: none;"></div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">total_working_hours</span></div></form>
    		</div></div></div><div class="row form-section visible-section" data-fieldname="section_break_usiu"><div class="section-body"><div class="form-column col-sm-6" data-fieldname="__column_3">
    			<form>
    			<div class="frappe-control input-max-width" data-fieldtype="Float" data-fieldname="over_time_n">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label" style="padding-right: 0px;">Over Time N</label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input"><input type="text" autocomplete="off" class="input-with-feedback form-control" data-fieldtype="Float" data-fieldname="over_time_n" placeholder="" data-doctype="Timesheet Tool Details"></div>
    					<div class="control-value like-disabled-input" style="display: none;">5</div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">over_time_n</span></div><div class="frappe-control input-max-width" data-fieldtype="Float" data-fieldname="over_time_h">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label" style="padding-right: 0px;">Over Time H</label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input"><input type="text" autocomplete="off" class="input-with-feedback form-control" data-fieldtype="Float" data-fieldname="over_time_h" placeholder="" data-doctype="Timesheet Tool Details"></div>
    					<div class="control-value like-disabled-input" style="display: none;">5</div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">over_time_h</span></div></form>
    		</div><div class="form-column col-sm-6" data-fieldname="column_break_fbzv">
    			<form>
    			<div class="frappe-control input-max-width" data-fieldtype="Float" data-fieldname="deduction">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label" style="padding-right: 0px;">Deduction</label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input"><input type="text" autocomplete="off" class="input-with-feedback form-control" data-fieldtype="Float" data-fieldname="deduction" placeholder="" data-doctype="Timesheet Tool Details"></div>
    					<div class="control-value like-disabled-input" style="display: none;">5</div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">deduction</span></div><div class="frappe-control input-max-width" data-fieldtype="Currency" data-fieldname="hourly_rate">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label" style="padding-right: 0px;">Hourly Rate</label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input" style="display: none;"></div>
    					<div class="control-value like-disabled-input" style="">ل.د 100,000.000</div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">hourly_rate</span></div><div class="frappe-control input-max-width hide-control" data-fieldtype="Currency" data-fieldname="total_payment">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label" style="padding-right: 0px;"></label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input"></div>
    					<div class="control-value like-disabled-input" style="display: none;"></div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">total_payment</span></div></form>
    		</div></div></div><div class="row form-section visible-section" data-fieldname="remarks_section"><div class="section-body"><div class="form-column col-sm-12" data-fieldname="__column_4">
    			<form>
    			<div class="frappe-control" data-fieldtype="Small Text" data-fieldname="remarks">
    			<div class="form-group">
    				<div class="clearfix">
    					<label class="control-label" style="padding-right: 0px;">Remarks</label>
    					<span class="help"></span>
    				</div>
    				<div class="control-input-wrapper">
    					<div class="control-input"><textarea type="text" autocomplete="off" class="input-with-feedback form-control" data-fieldtype="Small Text" data-fieldname="remarks" placeholder="" data-doctype="Timesheet Tool Details" style="height: 150px;"></textarea></div>
    					<div class="control-value like-disabled-input for-description" style="display: none; white-space-collapse: preserve;"></div>
    					<p class="help-box small text-muted"></p>
    				</div>
    			</div>
    		<span class="tooltip-content">remarks</span></div></form>
    		</div></div></div></div></div></div>
    			<div class="grid-footer-toolbar hidden-xs flex justify-between">
    				<div class="grid-shortcuts">
    					<span> <svg class="icon  icon-md" style="" aria-hidden="true">
    		<use class="" href="#icon-keyboard"></use>
    	</svg> </span>
    					<span class="text-medium"> Shortcuts: </span>
    					<kbd>Ctrl + Up</kbd> . <kbd>Ctrl + Down</kbd> . <kbd>ESC</kbd>
    				</div>
    				<button class="btn btn-secondary btn-sm pull-right grid-append-row">
    					Insert Below
    				</button>
    			</div>
    		</div></div></div></div>
    						<div class="grid-empty text-center hidden">
    							<img src="/assets/frappe/images/ui-states/grid-empty-state.svg" alt="Grid Empty State" class="grid-empty-illustration">
    							No Data
    						</div>
    					</div>
    				</div>
    			</div>
    			<div class="small form-clickable-section grid-footer">
    				<div class="flex justify-between">
    					<div class="grid-buttons">
    						<button type="button" class="btn btn-xs btn-danger grid-remove-rows hidden" data-action="delete_rows" style="display: none;">
    							Delete
    						</button>
    						<button type="button" class="btn btn-xs btn-danger grid-remove-all-rows hidden" data-action="delete_all_rows">
    							Delete All
    						</button>
    						<!-- hack to allow firefox include this in tabs -->
    						<button type="button" class="btn btn-xs btn-secondary grid-add-row" style="display: none;">
    							Add Row
    						</button>
    						<button type="button" class="grid-add-multiple-rows btn btn-xs btn-secondary hidden" style="display: inline-block;">
    							Add Multiple
    						</button>
    					</div>
    					<div class="grid-pagination"></div>
    					<div class="grid-bulk-actions text-right">
    						<button type="button" class="grid-download btn btn-xs btn-secondary hidden">
    							Download
    						</button>
    						<button type="button" class="grid-upload btn btn-xs btn-secondary hidden" style="display: inline-block;">
    							Upload
    						</button>
    					</div>
    				</div>
    			</div>
    		</div></div></form>
    		</div></div></div></div></div></div></div></div>
    					<div class="layout-footer hide"></div>
    				<div><div class="form-footer">  <div class="after-save">   <div class="comment-box"><div class="comment-input-wrapper">
    			<div class="comment-input-header">
    			<span>Comments</span>
    			</div>
    			<div class="comment-input-container">
    			<span class="avatar avatar-medium" title="Administrator">
    		<div class="avatar-frame standard-image" style="background-color: var(--dark-green-avatar-bg); color: var(--dark-green-avatar-color)" title="Administrator">
    				A
    		</div>
    	</span>
    				<div class="frappe-control col" data-fieldtype="Comment" data-fieldname="comment"><span class="tooltip-content">comment</span><div class="ql-container ql-bubble" style="position: relative;"><div class="ql-editor ql-blank" data-gramm="false" contenteditable="true" data-placeholder="Type a reply / comment"><p><br></p></div><div class="ql-tooltip ql-hidden"><span class="ql-tooltip-arrow"></span><div class="ql-tooltip-editor"><input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL"><a class="ql-close"></a></div><div class="ql-toolbar"><span class="ql-formats"><button type="button" class="ql-bold"><svg viewBox="0 0 18 18"> <path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"></path> <path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"></path> </svg></button><button type="button" class="ql-italic"><svg viewBox="0 0 18 18"> <line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"></line> <line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"></line> <line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"></line> </svg></button><button type="button" class="ql-underline"><svg viewBox="0 0 18 18"> <path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"></path> <rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"></rect> </svg></button><button type="button" class="ql-strike"><svg viewBox="0 0 18 18"> <line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"></line> <path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"></path> <path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"></path> </svg></button></span><span class="ql-formats"><button type="button" class="ql-blockquote"><svg viewBox="0 0 18 18"> <rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"></rect> <rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"></rect> <path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"></path> <path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"></path> </svg></button><button type="button" class="ql-code-block"><svg viewBox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"></line> </svg></button></span><span class="ql-formats"><button type="button" class="ql-direction" value="rtl"><svg viewBox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"></line> <path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"></path> <rect class="ql-fill" height="11" width="1" x="11" y="4"></rect> <rect class="ql-fill" height="11" width="1" x="13" y="4"></rect> </svg><svg viewBox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"></line> <path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"></path> <rect class="ql-fill" height="11" width="1" x="5" y="4"></rect> <rect class="ql-fill" height="11" width="1" x="7" y="4"></rect> </svg></button></span><span class="ql-formats"><button type="button" class="ql-link"><svg viewBox="0 0 18 18"> <line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"></line> <path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"></path> <path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"></path> </svg></button><button type="button" class="ql-image"><svg viewBox="0 0 18 18"> <rect class="ql-stroke" height="10" width="12" x="3" y="4"></rect> <circle class="ql-fill" cx="6" cy="7" r="1"></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg></button></span><span class="ql-formats"><button type="button" class="ql-list" value="ordered"><svg viewBox="0 0 18 18"> <line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"></line> <line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"></line> <line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"></line> <line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"></line> <path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"></path> <path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"></path> <path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"></path> </svg></button><button type="button" class="ql-list" value="bullet"><svg viewBox="0 0 18 18"> <line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"></line> <line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"></line> <line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"></line> <line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"></line> <line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"></line> <line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"></line> </svg></button></span><span class="ql-formats"><span class="ql-align ql-picker ql-icon-picker"><span class="ql-picker-label" tabindex="0" role="button" aria-expanded="false" aria-controls="ql-picker-options-0"><svg viewBox="0 0 18 18"> <line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"></line> <line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"></line> <line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"></line> </svg></span><span class="ql-picker-options" aria-hidden="true" tabindex="-1" id="ql-picker-options-0"><span tabindex="0" role="button" class="ql-picker-item ql-selected"><svg viewBox="0 0 18 18"> <line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"></line> <line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"></line> <line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"></line> </svg></span><span tabindex="0" role="button" class="ql-picker-item" data-value="center"><svg viewBox="0 0 18 18"> <line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"></line> <line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"></line> <line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"></line> </svg></span><span tabindex="0" role="button" class="ql-picker-item" data-value="right"><svg viewBox="0 0 18 18"> <line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"></line> <line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"></line> <line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"></line> </svg></span><span tabindex="0" role="button" class="ql-picker-item" data-value="justify"><svg viewBox="0 0 18 18"> <line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"></line> <line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"></line> <line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"></line> </svg></span></span></span><select class="ql-align" style="display: none;"><option selected="selected"></option><option value="center"></option><option value="right"></option><option value="justify"></option></select></span><span class="ql-formats"><button type="button" class="ql-clean"><svg class="" viewBox="0 0 18 18"> <line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"></line> <line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"></line> <line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"></line> <line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"></line> <rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"></rect> </svg></button></span></div></div><div class="ql-mention-list-container" style="display: none; position: absolute;"><ul class="ql-mention-list"></ul></div></div></div>
    			</div>
    			<button class="btn hidden btn-comment btn-xs" style="margin-left:48px;">
    				Comment
    			</button>
    		</div></div>   <div class="new-timeline">
    			<div class="timeline-item activity-title">
    			<h4>Activity</h4>
    			<div class="timeline-items timeline-actions" style="">
    			<div class="timeline-item">
    				<div class="timeline-content action-buttons"><button class="btn btn-xs btn-secondary action-btn">
    		<svg class="es-icon es-line  icon-xs" style="" aria-hidden="true">
    		<use class="" href="#es-line-add"></use>
    	</svg>
    		New Email
    	</button></div>
    			</div>
    		</div></div>
    		<div class="timeline-items"><div class="timeline-item" data-timestamp="2024-12-22 15:36:04.113769"><div class="timeline-dot"></div><div class="timeline-content ">You last edited this<span> · <span class="frappe-timestamp " data-timestamp="2024-12-22 15:36:04.113769" title="22-12-2024 15:36:04">20 minutes ago</span></span></div></div><div class="timeline-item" data-timestamp="2024-12-21 22:48:55.833230"><div class="timeline-dot"></div><div class="timeline-content ">You created this<span> · <span class="frappe-timestamp " data-timestamp="2024-12-21 22:48:55.833230" title="21-12-2024 22:48:55">17 hours ago</span></span></div></div></div></div>  </div>  <button class="scroll-to-top btn btn-default icon-btn" onclick="frappe.utils.scroll_to(0)">   <svg class="icon icon-xs"><use href="#icon-up-line"></use></svg>  </button> </div></div></div>
    			</div></div>  </div> </div></div>
    
  14. Assistant

    شكرًا لمشاركة كود الـ HTML لنموذج "Timesheet Tool". تهدف هذه الصفحة إلى تقديم واجهة تفاعلية للمستخدم لإدارة سجلات التوقيت. لنراجع كيفية تعطيل الأزرار [Move, Duplicate, Insert Above, Insert Below] التي تظهر عند عرض بيانات الجدول الفرعي timesheet_tool_details.

    1. تعديل JavaScript لتعطيل الأزرار

    سأقدم لك كود JavaScript يمكن إضافته إلى ملف timesheet_tool.js لتعطيل الأزرار المذكورة. هذا الكود سيتضمن عبارة refresh التي تتأكد من تعطيل الأزرار عند كل تحميل للنموذج.

    الكود المعدل

    frappe.ui.form.on("Timesheet Tool", {
        refresh(frm) {
            // تحديد استعلام حقل الموظف
            frm.fields_dict['timesheet_tool_details'].grid.get_field('employee').get_query = function(doc, cdt, cdn) {
                return {
                    query: "time_sheet_tool.time_sheet_tool.utils.timesheet_tool.get_active_employees_with_salary"
                };
            };
    
            // إخفاء أزرار إضافة الصفوف وحذفه
            frm.fields_dict['timesheet_tool_details'].grid.wrapper.find('.grid-add-row').hide();
            frm.fields_dict['timesheet_tool_details'].grid.wrapper.find('.grid-remove-rows').hide();
    
            // إخفاء مربع الاختيار لكل صف
            frm.fields_dict['timesheet_tool_details'].grid.wrapper.find('.grid-row-check').closest('.row-check').hide();        
    
            // تعطيل أزرار 'Move', 'Duplicate', 'Insert Above', 'Insert Below'
            frm.fields_dict['timesheet_tool_details'].grid.after_render = function() {
                const $grid = $(this.wrapper);
                $grid.find('.grid-move-row').remove();          // تعطيل زر Move
                $grid.find('.grid-duplicate-row').remove();      // تعطيل زر Duplicate
                $grid.find('.grid-insert-row').remove();         // تعطيل زر Insert Above
                $grid.find('.grid-insert-row-below').remove();   // تعطيل زر Insert Below
            };
    
            // إدارة الزر "Create Attendance"
            if (frm.doc.docstatus === 1 && hasRole("Create Timesheet")) {
                let can_show_create_timesheet = handle_button(
                    frm,
                    "time_sheet_tool.time_sheet_tool.utils.timesheet_tool.check_missing_records",
                    "create_attendance",
                    "Create Timesheet",
                    "Timesheet records have been created successfully.",
                    "All records have already been created."
                );
    
                // إخفاء زر "Approval Attendance" إذا كان زر "Create Timesheet" ظاهرًا
                if (can_show_create_timesheet) {
                    frm.remove_custom_button("Submit Timesheet");
                }
            }
    
            // إدارة زر "Approval Attendance"
            if (frm.doc.docstatus === 1 && hasRole("Submit Timesheet")) {
                handle_button(
                    frm,
                    "time_sheet_tool.time_sheet_tool.utils.timesheet_tool.check_missing_records_for_approval",
                    "approval_attendance",
                    "Submit Timesheet",
                    "Timesheet records have been approved successfully.",
                    "All records have already been approved."
                );
            }
    
            // إعداد استعلام لحقل المشروع
            frm.set_query('project', () => {
                let filters = {
                    company: frm.doc.company,
                };
                return { filters: filters };
            });
        },
    
        // باقي الكود كما هو...
    });
    

    2. شرح الكود

    • تعطيل الأزرار:

      • remove(): تُستخدم هذه الدالة لإزالة الأزرار من DOM، مما يجعلها غير متاحة للمستخدمين. لقد تم استخدام هذه الدالة على الأزرار "Move"، "Duplicate"، "Insert Above"، و"Insert Below".
    • إدارة الأزرار الأخرى: لم يتم تعديل أي شيء آخر يتعلق بالأزرار التي تدير عمليات "إضافة" و"حذف"، حيث تم إخفاؤها أو تعطيلها وفقًا لما تم تحديده.

    3. خطوات التطبيق

    1. تحديث الكود: انسخ الكود المعدل وأضفها إلى ملف timesheet_tool.js.
    2. الحفظ وإعادة التحميل: بعد حفظ التعديلات، تأكد من إعادة تحميل نموذج "Timesheet Tool" لتطبيق التغييرات.
    3. التحقق: تأكد من أن الأزرار المعنية لم تعد ظاهرة في الجدول الفرعي.

    إذا كان لديك أي استفسارات إضافية أو تحتاج إلى مزيد من المساعدة، فلا تتردد في طرحها.

  15. User

    #page-Timesheet\ Tool > div.container.page-body > div.page-wrapper > div > div.row.layout-main > div.col.layout-main-section-wrapper > div.layout-main-section > div:nth-child(2) > div > div > div.form-page > div:nth-child(4) > div > div > form > div.frappe-control.form-group > div > div.form-grid-container > div > div.grid-body > div.rows > div > div.form-in-grid > div.grid-form-heading > div > span.row-actions

  16. Assistant

    إنك تشير إلى مسار شجرة الـ DOM (DOM tree path) لعناصر معينة ضمن واجهة نموذج "Timesheet Tool" في إطار عمل Frappe. المسار الذي قدمته يستهدف جزءًا معينًا من واجهة المستخدم، وخاصة جزء الرسوميات الخاصة بالجدول الفرعي.

    تحليل المسار

    هذا هو ما يمثل مسار DOM الذي قدمته:

    • #page-Timesheet Tool: هذا هو معرف العنصر (ID) للنموذج.
    • .container.page-body: يشير إلى حاوية الصفحة.
    • .page-wrapper: يمثل الحاوية العامة لمحتوى الصفحة.
    • .layout-main: يؤدي إلى القسم الرئيسي الذي يحتوي على المحتوى.
    • .layout-main-section: يحتوي على جزء المحتوى الرئيسي.
    • div:nth-child(2): يشير إلى الطفل الثاني من العنصر.
    • .form-page: يمثل الصفحة التي تحتوي على النموذج.
    • .grid-body: يحتوي على جسم الجدول.
    • .rows: يشير إلى الصفوف داخل الجدول.
    • .form-in-grid: يمثل شكل الصف داخل الجدول.
    • .grid-form-heading: يحتوي على العنوان الخاص بالصف.
    • .row-actions: تشير إلى قسم الإجراءات الخاصة بالصف (مثل الأزرار مثل Move و Duplicate).

    استخدام المسار لمزيد من التعديلات

    إذا كنت ترغب في تعديل التخطيط أو الوظائف التي يقدّمها هذا العنصر، فإليك بعض الأشياء التي يمكنك تجربتها:

    1. تغيير الأزرار: يمكنك استخدام jQuery أو JavaScript لإجراء تغييرات على الأزرار الموجودة في قسم .row-actions عن طريق استهدافه مباشرة باستخدام المسار المذكور.

      على سبيل المثال:

      $(document).ready(function() {
          $('#page-Timesheet Tool .row-actions .grid-move-row').remove(); // إزالة زر Move
          $('#page-Timesheet Tool .row-actions .grid-duplicate-row').remove(); // إزالة زر Duplicate
          $('#page-Timesheet Tool .row-actions .grid-insert-row').remove(); // إزالة زر Insert Above
          $('#page-Timesheet Tool .row-actions .grid-insert-row-below').remove(); // إزالة زر Insert Below
      });
      
    2. إخفاء الأزرار: إذا كنت ترغب في إخفاء الأزرار فقط بدلاً من إزالتها تمامًا، يمكنك استخدام .hide() بدلاً من .remove().

    3. تعديل وظيفة الأزرار: إذا كنت تريد أن تظل الأزرار مرئية ولكن بتعطيلها، يمكنك استخدام .prop("disabled", true) إذا كانت الأزرار تدخل في نوع إدخال (input) أو استخدام طرق CSS لإخفائها من العرض.

    خطوات إضافية

    • تنفيذ التعديلات: تعتمد الخطوة التالية على ما تحتاجه بالضبط من التعديلات. إذا كنت بحاجة إلى شىء محدد، يرجى توضيح ذلك.
    • إعادة تحميل النموذج: تأكد من إعادة تحميل النموذج في واجهة المستخدم لتطبيق التعديلات.

    يرجى إعلامي إذا كان لديك أي استفسارات إضافية أو تحتاج إلى مزيد من التوضيح حول أي نقطة!

  17. User

    #page-Timesheet\ Tool > div.container.page-body > div.page-wrapper > div > div.row.layout-main > div.col.layout-main-section-wrapper > div.layout-main-section > div:nth-child(2) > div > div > div.form-page > div:nth-child(4) > div > div > form > div.frappe-control.form-group > div > div.form-grid-container > div > div.grid-body > div.rows > div > div.form-in-grid > div.grid-form-heading > div > span.row-actions > button.btn.btn-secondary.btn-sm.pull-right.grid-duplicate-row.hidden-xs

  18. Assistant

    أنت تشير إلى مسار DOM لنموذج معين في واجهة المستخدم الخاصة بك، والذي يتضمن زر "Duplicate" في الجدول الفرعي. سأساعدك في فهم كيفية استهداف هذا الزر باستخدام JavaScript أو jQuery، بالإضافة إلى كيفية تعطيل هذا الزر أو تغييره وفقًا لاحتياجاتك.

    هيكل المسار

    المسار الذي قدمته يهدف إلى الوصول إلى زر "Duplicate" الموجود في قسم row-actions داخل نموذج Timesheet Tool. إليك تفاصيل المسار:

    1. #page-Timesheet Tool: معرف الصفحة.
    2. .container.page-body: تحتوي على المحتوى الرئيسي.
    3. .page-wrapper: حاوية تحتوى على الصفحة.
    4. .layout-main: القسم الرئيسي للعرض.
    5. div:nth-child(2): العنصر الثاني في هذا القسم، والذي قد يمثل الجداول أو النماذج.
    6. .form-page: حاوية النموذج.
    7. .grid-body: يحتوي على الصفوف داخل الجدول.
    8. .rows: تشير إلى الصفوف في الجدول.
    9. .form-in-grid: استخدام تصميم جدول للإضافة والتعديل.
    10. .grid-form-heading: عنوان هذا القسم.
    11. .row-actions: يحتوي على الأزرار ذات الصلة، بما في ذلك زر "Duplicate".
    12. .btn.grid-duplicate-row: زر "Duplicate" الذي تريد الوصول إليه.

    كيفية استهداف الزر باستخدام jQuery

    يمكنك استهداف الزر المحدد في سؤالك واستخدامه إما لإخفائه أو لتعطيله باستخدام jQuery. إليك كيفية القيام بذلك:

    لطريقة إزالة الزر:

    $(document).ready(function() {
        $('#page-Timesheet\\ Tool .grid-duplicate-row').remove(); // إزالة زر Duplicate
    });
    

    لطريقة إخفاء الزر:

    $(document).ready(function() {
        $('#page-Timesheet\\ Tool .grid-duplicate-row').hide(); // إخفاء زر Duplicate
    });
    

    لتعطيل الزر:

    إذا كنت ترغب في أن تظل الزر مرئيًا ولكن غير قابل للاستخدام، يمكنك تعطيله بالشكل التالي:

    $(document).ready(function() {
        $('#page-Timesheet\\ Tool .grid-duplicate-row').prop('disabled', true); // تعطيل زر Duplicate
    });
    

    ملاحظة: تأكد من استخدام \\ عند وضع علامة #page-Timesheet Tool في _querySelector_ أو jQuery لأن هناك مسافة في اسم المعرف قد تسبب في مسائل.

    تطبيق التعديلات

    بعد إدراج الكود إلى ملف JavaScript الخاص بك:

    1. احفظ التغييرات.
    2. أعد تحميل صفحة النموذج لمعرفة التغييرات في واجهة المستخدم.

    إذا كان لديك أي استفسارات أخرى أو تحتاج إلى مزيد من المساعدة، فلا تتردد في إخباري!