import Api,{ HttpResponse, Result } from './../utils/request';


class OrgService{

    static async GetTreeDepartmentsAsync():Promise<HttpResponse>{
        let msg = {}
        return Api.Post("app_get_GetCompanyDepartmentListTree",msg)
    }

    static async GetAllBranchsAsync():Promise<HttpResponse>{
        let msg = {Status: 0, is_show: 0, RB_Group_Id: 2}
        return Api.Post("admin_get_BranchGetList",msg)
    }

    static async GetAllEmployerAsync():Promise<HttpResponse>{
        let msg = {RB_Group_id: "0", RB_Branch_id: "-1", departmentId: "0", IsLeave: "0"}
        return Api.Post("app_get_employeeInfo_v2",msg)
    }
    
    static async GetMembersAsync(params:any):Promise<HttpResponse>{
        return Api.Post("travel_manager_members",params)
    }

    static async GetMembersUsedStatusAsync():Promise<HttpResponse>{
        return Api.Post("travel_manager_member_used",{})
    }

    //
    static async SetTenantInfoAsync(logo:string,name:string):Promise<HttpResponse>{
        const msg={logo,name}
        return Api.Post("travel_set_tenant_info",msg)
    }

    static async DissTenantAsync(r:string,p:string):Promise<HttpResponse>{
        const msg={r,p}
        return Api.Post("travel_diss_tenant", msg)
    }
}
export default OrgService;