{"title":
    "Leave Management",
    "modulePath":"modules/leave/leaveManagement",
    
  "header":[
    {"type":
      "button",
      "label":"Apply for Leave",
      "formId":1
    },
    
    {"type":"filter-select",
      "options":{
        "data_column":"status",
      
      "options":[
        {"label":"All",
        "value":""
        },
        
    {"label":"Pending",
      "value":"Pending"
    },
    
    {"label":"Approved",
      "value":"Approved"
    },
      
    {"label":"Rejected",
      "value":"Rejected"
    }
      ]
        }
          },
          
    {"type":
      "filter-date-range",
    
    "options":{
      "data_column":"startdate"
    }
      }
        ],
        
    "body":[
      {"type":
        "table",
        "id":"leaveRequestsTable",
        "options":{"tableName":"leave_requests",

        "columnsToShow":
          ["leavetype",
            "startdate",
            "enddate",
            "reason",
            "status",
            "approvedAt",
            "approvedBy",
            "user_name"
          ],

        "columnLabels":
          {"leavetype":
            "Type",
            "startdate":"Start Date",
            "enddate":"End Date",
            "reason":"Reason",
            "status":"Status"
          },
          
        "showGlobalSearch":false,
          "rowActions":[
            {"label":"Approve",
              "type":"Confirm",
              "prompt":"Do you want to Approve the Leave",
              "columns":{
                "status":"approved"
              }
            }
              ]
                }
                  }
                    ],
                    
          "footer":[
            {"type":
                "button",
                "label":"Close",
                "onClick":"closeModal"
            }
              ]
                }