package cc.smtweb.system.bpm.web.design.form.model.flow;

import cc.smtweb.framework.core.common.SwEnum;
import cc.smtweb.framework.core.util.StringUtil;
import cc.smtweb.system.bpm.web.design.form.ModelForm;
import cc.smtweb.system.bpm.web.design.form.model.LcMsWorker;

/**
 * @Author:lip
 * @Date : 2022/9/15 16:49
 * 左树-主子列表（含编辑卡片、工作流）
 */
public class FlowLtMsWorker extends LcMsWorker {
    private final static String templateList = "model_tree_list";
    private final static String templateCard = "model_card_flow_lms";

    @Override
    protected String getTmplId(ModelForm bean) {
        if (bean.getName().endsWith(StringUtil.upFirst(SwEnum.PageType.LIST.value))) {
            return templateList;
        }
        if (bean.getName().endsWith(StringUtil.upFirst(SwEnum.PageType.CARD.value))) {
            return templateCard;
        }
        return super.getTmplId(bean);
    }
}
