@using System.Text.RegularExpressions
@using wispro.sp.web.Components

@page "/Home"
@attribute [Authorize]
<PageContainer>
    <Breadcrumb>
        <Breadcrumb>
            <BreadcrumbItem><Icon Type="home" />首页</BreadcrumbItem>
        </Breadcrumb>
    </Breadcrumb>
    <Content>
        <div class="pageHeaderContent__b__0">
            <div class="avatar">
                <Avatar size="large" src="https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png" />
            </div>
            <div class="content">
                <div class="contentTitle">
                    上午好,@(_CurrentUser.Name). 祝您一天愉快!
                </div>
                <div>
                    合伙人 | 深圳威世博代理事务所 | 工作地：深圳
                </div>
            </div>
        </div>
    </Content>
    <ExtraContent>
        <div class="extraContent">
            <div class="statItem">
                <Statistic Title="@("当月绩效数据")" Value="12" />
            </div>
            <div class="statItem">
                <Statistic Title="@("本月绩效排名")" Value="3" Suffix="@("/ 280")" />
            </div>
            <div class="statItem">
                <Statistic Title="@("总绩效数据")" Value="2223" />
            </div>
        </div>
    </ExtraContent>
    <ChildContent>
        <Row Gutter="24">
            <AntDesign.Col Xl="16" Lg="24" Md="24" Sm="24" Xs="24">
                <Card BodyStyle="padding: 0px;"
                      Class="activeCard"
                      Title="信息动态">
                    <AntList TItem="AppealRecord"
                             DataSource="@AppealRecords"
                             Class="activitiesList"
                             Size="large"
                             ItemLayout="ListItemLayout.Horizontal"
                             >
                        <ListItem>
                            <ListItemMeta Avatar="@context.Creater.Name" Description="@(context.ReviewTime.HasValue?context.ReviewTime.Value.ToFriendlyDisplay():context.CreateTime.ToFriendlyDisplay())">
                                <TitleTemplate>
                                    <span>
                                        <span class="event">
                                            @if (context.ReviewTime.HasValue)
                                            {
                                                if (context.CreaterId == _CurrentUser.Userid)
                                                {
                                                    <span>(@context.Reviewer.Name 在 @context.ReviewTime.Value.ToFriendlyDisplay() 审核了你提交的 @context.Item.CaseNo @context.Type.Name")</span> }
                                                else
                                                {
                                                    if (context.ReviewerId != _CurrentUser.Userid)
                                                    {
                                                    <span>(您在 @context.CreateTime.ToFriendlyDisplay()提交的 @context.Item.CaseNo @context.Type.Name,@context.Reviewer.Name 已于 @context.ReviewTime.Value.ToFriendlyDisplay() 审核完成"</span> 
                                                    }
                                                }
                                            }
                                            else
                                            {
                                                if (context.CreaterId == _CurrentUser.Userid)
                                                {
                                                    <span>您在 @context.CreateTime.ToFriendlyDisplay() 提交的 @context.Item.CaseNo @context.Type.Name ，正在等待 @context.Reviewer.Name 审核！"</span>}
                                                else
                                                {
                                                    <span>@context.Creater.Name 在 @context.CreateTime.ToFriendlyDisplay() 提交的 @context.Item.CaseNo @context.Type.Name ,请您尽快<Button Danger Type="@ButtonType.Link" OnClick="()=>ShowModel(context)">审核</Button>！</span>
                                                }
                                                                                
                                            }
                                        </span>
                                    </span>
                                </TitleTemplate>
                            </ListItemMeta>
                        </ListItem>
                    </AntList>
                </Card>
            </AntDesign.Col>
            <AntDesign.Col Xl="8" Lg="24" Md="24" Sm="24" Xs="24">


                <Card Style="margin-bottom: 24px;"
                      Title="绩效数据统计">
                    <div class="chart">
                        <wispro.sp.web.Components.Radar HasLegend="false" />
                    </div>
                </Card>

            </AntDesign.Col>
        </Row>
    </ChildContent>
</PageContainer>
