fix(project): fit meeting rows and inline badges
This commit is contained in:
@@ -104,6 +104,22 @@ def meeting_ctx(admin: bool, err: bool, can_sync: bool = True) -> dict:
|
||||
}
|
||||
|
||||
|
||||
def meeting_layout_ctx(admin: bool) -> dict:
|
||||
ctx = meeting_ctx(admin, False, can_sync=False)
|
||||
meeting = ctx["meeting"]
|
||||
product = meeting["sections"][0]["rows"][0]
|
||||
product["content"] = "첫 번째 줄\n두 번째 줄\n세 번째 줄"
|
||||
product["prev"]["content"] = "첫 번째 줄\n두 번째 줄"
|
||||
inactive = copy.deepcopy(meeting["sections"][1]["rows"][0])
|
||||
inactive.update(id=4, label="네이버", section="마케팅", content="한 줄", marketplace_code="naver",
|
||||
market_name="네이버 스마트스토어", market_off=True, week_auto=None)
|
||||
inactive["prev"].update(id=904, content="한 줄", auto_result=None, market_off=True,
|
||||
marketplace_code="naver", market_name="네이버 스마트스토어")
|
||||
meeting["items"].append(inactive)
|
||||
meeting["sections"].append({"name": "마케팅", "color": "", "rows": [inactive]})
|
||||
return ctx
|
||||
|
||||
|
||||
def main() -> None:
|
||||
env = jinja2.Environment(loader=jinja2.ChoiceLoader([
|
||||
jinja2.DictLoader({"erp_base.html": BASE_STUB}),
|
||||
@@ -117,6 +133,8 @@ def main() -> None:
|
||||
"meeting_admin.html": ("project/goal_meeting.html", meeting_ctx(True, False)),
|
||||
"meeting_err.html": ("project/goal_meeting.html", meeting_ctx(True, True)),
|
||||
"meeting_ro.html": ("project/goal_meeting.html", meeting_ctx(False, False, can_sync=False)),
|
||||
"meeting_layout_admin.html": ("project/goal_meeting.html", meeting_layout_ctx(True)),
|
||||
"meeting_layout_ro.html": ("project/goal_meeting.html", meeting_layout_ctx(False)),
|
||||
}
|
||||
for name, (tpl, ctx) in pages.items():
|
||||
html = env.get_template(tpl).render(**ctx)
|
||||
|
||||
Reference in New Issue
Block a user