<?xml version="1.0" encoding="UTF-8"?>
<odoo>

    <record id="view_ielts_review_form" model="ir.ui.view">
        <field name="name">encoach.ai.ielts.generation.log.review.form</field>
        <field name="model">encoach.ai.ielts.generation.log</field>
        <field name="arch" type="xml">
            <form string="IELTS Content Review">
                <header>
                    <field name="review_status" widget="statusbar" statusbar_visible="draft,pending_review,approved"/>
                </header>
                <sheet>
                    <group>
                        <group>
                            <field name="skill" readonly="1"/>
                            <field name="review_status"/>
                        </group>
                        <group>
                            <field name="examiner_id"/>
                            <field name="reviewed_at"/>
                        </group>
                    </group>
                    <group string="Examiner Notes">
                        <field name="examiner_notes" nolabel="1"/>
                    </group>
                </sheet>
            </form>
        </field>
    </record>

    <record id="view_ielts_review_list" model="ir.ui.view">
        <field name="name">encoach.ai.ielts.generation.log.review.list</field>
        <field name="model">encoach.ai.ielts.generation.log</field>
        <field name="arch" type="xml">
            <list string="IELTS Content Review Queue">
                <field name="skill"/>
                <field name="review_status" widget="badge" decoration-info="review_status == 'pending_review'" decoration-success="review_status == 'approved'" decoration-danger="review_status == 'rejected'" decoration-warning="review_status == 'revision_needed'"/>
                <field name="examiner_id"/>
                <field name="reviewed_at"/>
                <field name="create_date"/>
            </list>
        </field>
    </record>

    <record id="action_ielts_review_queue" model="ir.actions.act_window">
        <field name="name">IELTS Content Review</field>
        <field name="res_model">encoach.ai.ielts.generation.log</field>
        <field name="view_mode">list,form</field>
        <field name="domain">[('review_status', '\!=', 'draft')]</field>
    </record>

</odoo>
