@using GheyasPlusShop.Utils;
@using GheyasPlusShop.Controllers
@using Utils;
@model GheyasPlusShop.Models.Home.ViewProfileModel

@if (ViewBag.DesktopSection)
{
    <div style="padding:20px 20px;">
        <input type="hidden" value="@(StaticManager.WebsiteSetting[ConfigManager.NickName].WebsiteColor)" id="colorSite" />
        <div class="form-card rb d-flex align-items-center justify-content-between" style="padding:15px;line-height:36px;margin-bottom:20px!important;">
            <div>
                <img src="~/App_Images/index/avetar.svg">
                <span style="font-size:16px;font-weight:700;margin-right: 10px;">@Model.WebUser.FullName</span>
            </div>
            <div class="section-view exitUser">خروج از حساب</div>
        </div>
        <div class="container-fluid" style="padding: 0 35px">
            <div class="row">
                <div class="col-2 no-padding">
                    <a href="#profile" class="menu-item">
                        <img src="~/App_Images/Profile/profile.svg" class="svg" />
                        <span>پروفایل</span>
                    </a>
                    <a href="#order" class="menu-item">
                        <img src="~/App_Images/Profile/order.svg" class="svg" />
                        <span>سفارش‌های من</span>
                    </a>
                    <a href="#interest" class="menu-item">
                        <img src="~/App_Images/Profile/Like.svg" class="svg" />
                        <span>لیست علاقه‌مندی‌ها</span>
                    </a>
                    <a href="#address" class="menu-item" style="display:none;">
                        <img src="~/App_Images/Profile/address.svg" class="svg">
                        <span>آدرس ها</span>
                    </a>
                    <a href="#comment" class="menu-item" style="display:none;">
                        <img src="~/App_Images/Profile/comments.svg" class="svg">
                        <span>نقد و نظرات</span>
                    </a>
                    <a href="#password" class="menu-item">
                        <img src="~/App_Images/Profile/Pass.svg" class="svg">
                        <span>تغییر رمز</span>
                    </a>
                </div>
                <div class="col-10 form-card no-margin" style="padding:22px;">
                    @*پروفایل*@
                    <div class="content div-profile">
                        <div class="div-profile-show">
                            <div class="form-card no-margin no-padding" style="margin-bottom: 20px !important;">
                                <div class="p-3 d-flex justify-content-between" style="line-height: 34px;border-bottom:1px solid #ccc;background-color:#eaf1f2;">
                                    <span style="font-size:12px;font-weight:700;">اطلاعات شخصی</span>
                                    <span class="float-left section-view" onclick="showProfileEdit()">ویرایش اطلاعات</span>
                                </div>
                                <div class="col-12" style="padding:30px 20px 0;">
                                    <div class="row">
                                        <div class="col-9 no-padding">
                                            <div class="col-12 no-padding" style="margin-bottom:20px;">
                                                <div class="row">
                                                    <div class="col-6 has-float-label">
                                                        <span class="label-value-readonly">@Model.WebUser.FullName</span>
                                                        <span>نام و نام خانوادگی</span>
                                                    </div>
                                                    <div class="col-6 has-float-label">
                                                        <span class="label-value-readonly">@(Model.WebUser.PassNo.IsNotEmpty() ? Model.WebUser.PassNo : "-")</span>
                                                        <span>کد ملی</span>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-12 no-padding">
                                                <div class="row">
                                                    <div class="col-6 has-float-label">
                                                        <span class="label-value-readonly">@(Model.WebUser.PassNo.IsNotEmpty() ? Model.WebUser.MobileNo : Model.WebUser.TelNo)</span>
                                                        <span>شماره تلفن</span>
                                                    </div>
                                                    <div class="col-6 has-float-label">
                                                        <span class="label-value-readonly">@(Model.WebUser.PassNo.IsNotEmpty() ? Model.WebUser.Email : "")</span>
                                                        <span>پست الکترونیک</span>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-3">

                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="container-fluid">
                                <div class="row">
                                    <div class="col-7 no-padding-right">
                                        <div class="form-card no-margin no-padding">
                                            <div class="p-2 d-flex justify-content-between" style="line-height: 34px;border-bottom:1px solid #ccc;background-color:#eaf1f2;">
                                                <span style="font-size:12px;font-weight:700;">آخرین سفارش‌ها</span>
                                                <a id="lnkViewOrder" href="#order">
                                                    <span class="float-left section-view">مشاهده همه</span>
                                                </a>
                                            </div>
                                            <div class="col-12 no-padding" style="background-color:#ced8d9;font-size: 10px;font-weight: 700;line-height: 26px;">
                                                <div class="row">
                                                    <div class="col-4">شماره سفارش</div>
                                                    <div class="col-4">تاریخ سفارش</div>
                                                    <div class="col-4">مبلغ قابل پرداخت (ریال)</div>
                                                </div>
                                            </div>
                                            <div class="col-12 no-padding" style="min-height:130px;">
                                                @*تکرار میشود*@
                                                @for (var i = 0; i < Model.Factor.Count && i < 3; i++)
                                                {
                                                    <div class="col-12 no-padding" style="border-bottom:1px solid #ccc;line-height:44px;">
                                                        <div class="row">
                                                            <div class="col-4">@Model.Factor[i].FactorCode</div>
                                                            <div class="col-4">@Model.Factor[i].FactorDate</div>
                                                            <div class="col-4">@Model.Factor[i].FactorMablagh.ToNumber()</div>
                                                        </div>
                                                    </div>
                                                }
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-5 no-padding-left">
                                        <div class="form-card no-margin no-padding">
                                            <div class="p-2 d-flex justify-content-between" style="line-height: 34px;border-bottom:1px solid #ccc;background-color:#eaf1f2;">
                                                <span style="font-size:12px;font-weight:700;">آخرین علاقه‌مندی‌ها</span>
                                                <a id="lnkViewInterest" href="#interest">
                                                    <span class="float-left section-view">مشاهده همه</span>
                                                </a>
                                            </div>
                                            <div class="col-12 no-padding" style="min-height:156px;">
                                                @*تکرار میشود*@
                                                @for (var i = 0; i < Model.KalaPart.Count && i < 3; i++)
                                                {
                                                    <div class="col-12 no-padding">
                                                        <div class="col-12" style="display:flex;padding:6px;border-bottom:1px solid #ccc;">
                                                            <img src="@Model.KalaPart[i].PicThumb.ToBase64File()" style="width:58px;height:58px;border-radius:50%;border:1px solid #ccc;" />
                                                            <div style="width:calc(100% - 66px);margin-right:8px;font-weight: 700;">
                                                                <div style="margin:12px 0 3px;">@Model.KalaPart[i].Name</div>
                                                                <div>
                                                                    @if (Model.KalaPart[i].Mojodi > 0)
                                                                    {
                                                                        if (Model.KalaPart[i].DisplayKalaPrice(Model.Avarez, Model.Maliyat) == 0)
                                                                        {
                                                                            <span style="color:#546E7A!important;">تماس بگیرید</span>
                                                                        }
                                                                        else
                                                                        {
                                                                            <div class="product-price-new" style="display:inline-block;">
                                                                                <span>@((Model.KalaPart[i].KalaTakhfifPersent > 0 ? Model.KalaPart[i].DisplayKalaNewPrice(Model.Avarez, Model.Maliyat) : Model.KalaPart[i].DisplayKalaPrice(Model.Avarez, Model.Maliyat)).ToNumber())</span><span style="margin-right:3px;">ریال</span>
                                                                            </div>
                                                                            if (Model.KalaPart[i].KalaTakhfifPersent > 0)
                                                                            {
                                                                                <div style="display:inline-block;text-decoration: line-through;margin-right:5px;">
                                                                                    <span>@(Model.KalaPart[i].DisplayKalaPrice(Model.Avarez, Model.Maliyat).ToNumber())</span><span style="margin-right:3px;">ریال</span>
                                                                                </div>
                                                                            }
                                                                        }
                                                                    }
                                                                    else
                                                                    {
                                                                        <span style="color:#546E7A!important;">ناموجود</span>
                                                                    }
                                                                    <img src='~/App_Images/index/deleteProduct.svg' style="float: left;cursor: pointer;" title='حذف از علاقه‌مندی‌ها' data-id="@Model.KalaPart[i].Code" data-part="@Model.KalaPart[i].CodePartProperty" onclick="deleteLikeProduct(this)" />
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                }
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="div-profile-edit" style="display:none;">
                            <div class="form-card no-margin no-padding" style="margin-bottom:20px!important;">
                                <div class="d-flex justify-content-between p-2" style="line-height: 34px;border-bottom:1px solid #ccc;background-color:#eaf1f2;">
                                    <span style="font-size:12px;font-weight:700;">ویرایش اطلاعات شخصی</span>
                                    <span class="section-view" onclick="showProfile()">بازگشت</span>
                                </div>
                                <div class="col-12" style="padding:35px 25px 0;">
                                    <div class="row">
                                        <div class="col-6 position-relative div-person-edit" style="border-left:1px dotted #ccc;padding-left: 50px;">
                                            <div class="col-12 no-padding text-center deActive-side personel" style="display:none;">
                                                <img src="~/App_Images/shoping/personelInfo.svg" />
                                                <button class="button-accept deActive-side-btn" data-id="personel">ثبت اشخاص حقیقی</button>
                                            </div>
                                            <div class="col-12 no-padding" style="font-size:14px;font-weight:700;margin-bottom:30px;">
                                                اطلاعات شخص حقیقی
                                            </div>
                                            <div class="col-12 has-float-label">
                                                <input type="text" class="text-control" id="txtPersonName" value="@(Model.WebUser.PassNo.IsNotEmpty() ? Model.WebUser.FullName : "")" />
                                                <span>نام و نام خانوادگی</span>
                                            </div>
                                            <div class="col-12 no-padding" style="font-weight:700;color:#909090;margin:18px 0 12px;">تاریخ تولد</div>
                                            <div class="col-12 no-padding">
                                                <div class="row">
                                                    <div class="col-3 has-float-label">
                                                        <input type="text" class="text-control" id="day" maxlength="2" value="@(Model.WebUser.BirthDate.IsNotEmpty() ? Model.WebUser.BirthDate.Split('/')[2] : "")" />
                                                        <span>روز</span>
                                                    </div>
                                                    <div class="col-6 has-float-label">
                                                        <select class="text-control" id="month" value="@(Model.WebUser.BirthDate.IsNotEmpty() ? Model.WebUser.BirthDate.Split('/')[1] : "")">
                                                            <option value="00"></option>
                                                            <option value="01" @(Model.WebUser.BirthDate.IsNotEmpty() && Model.WebUser.BirthDate.Split('/')[1] == "01" ? "selected=selected" : "")>فروردین</option>
                                                            <option value="02" @(Model.WebUser.BirthDate.IsNotEmpty() && Model.WebUser.BirthDate.Split('/')[1] == "02" ? "selected=selected" : "")>اردیبهشت</option>
                                                            <option value="03" @(Model.WebUser.BirthDate.IsNotEmpty() && Model.WebUser.BirthDate.Split('/')[1] == "03" ? "selected=selected" : "")>خرداد</option>
                                                            <option value="04" @(Model.WebUser.BirthDate.IsNotEmpty() && Model.WebUser.BirthDate.Split('/')[1] == "04" ? "selected=selected" : "")>تیر</option>
                                                            <option value="05" @(Model.WebUser.BirthDate.IsNotEmpty() && Model.WebUser.BirthDate.Split('/')[1] == "05" ? "selected=selected" : "")>مرداد</option>
                                                            <option value="06" @(Model.WebUser.BirthDate.IsNotEmpty() && Model.WebUser.BirthDate.Split('/')[1] == "06" ? "selected=selected" : "")>شهریور</option>
                                                            <option value="07" @(Model.WebUser.BirthDate.IsNotEmpty() && Model.WebUser.BirthDate.Split('/')[1] == "07" ? "selected=selected" : "")>مهر</option>
                                                            <option value="08" @(Model.WebUser.BirthDate.IsNotEmpty() && Model.WebUser.BirthDate.Split('/')[1] == "08" ? "selected=selected" : "")>آبان</option>
                                                            <option value="09" @(Model.WebUser.BirthDate.IsNotEmpty() && Model.WebUser.BirthDate.Split('/')[1] == "09" ? "selected=selected" : "")>آذر</option>
                                                            <option value="10" @(Model.WebUser.BirthDate.IsNotEmpty() && Model.WebUser.BirthDate.Split('/')[1] == "10" ? "selected=selected" : "")>دی</option>
                                                            <option value="11" @(Model.WebUser.BirthDate.IsNotEmpty() && Model.WebUser.BirthDate.Split('/')[1] == "11" ? "selected=selected" : "")>بهمن</option>
                                                            <option value="12" @(Model.WebUser.BirthDate.IsNotEmpty() && Model.WebUser.BirthDate.Split('/')[1] == "12" ? "selected=selected" : "")>اسفند</option>
                                                        </select>
                                                        <span>ماه</span>
                                                    </div>
                                                    <div class="col-3 has-float-label">
                                                        <input type="text" class="text-control" id="txtYear" maxlength="4" value="@(Model.WebUser.BirthDate.IsNotEmpty() ? Model.WebUser.BirthDate.Split('/')[0] : "")" />
                                                        <span>سال</span>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-12 no-padding" style="margin:15px 0;">
                                                <div class="row">
                                                    <div class="col-6 has-float-label">
                                                        <input type="text" class="text-control" id="txtPassNo" data-required="true" value="@Model.WebUser.PassNo" />
                                                        <span>کد ملی</span>
                                                    </div>
                                                    <div class="col-6 has-float-label">
                                                        <input type="text" class="text-control" id="txtPersonEmail" value="@Model.WebUser.Email" />
                                                        <span>آدرس ایمیل</span>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-12 has-float-label" style="margin-bottom:25px;">
                                                <textarea type="text" class="textarea-control" style="height:50px;" id="txtPersonAddress">@(Model.WebUser.PassNo.IsNotEmpty() ? Model.WebUser.Address : "")</textarea>
                                                <span>آدرس</span>
                                            </div>
                                            <div class="col-12 no-padding-right save personel">
                                                <button type="button" class="button-accept" onclick="savePersonal('person')">
                                                    <img src="~/App_Images/shoping/SavepersonelInfo.svg" />ثبت
                                                </button>
                                            </div>
                                        </div>
                                        <div class="col-6 position-relative div-office-edit" style="padding-right:65px;">
                                            <div class="col-12 no-padding text-center deActive-side office">
                                                <img src="~/App_Images/shoping/OfficeInfo.svg" />
                                                <button class="button-accept deActive-side-btn" data-id="office">ثبت اشخاص حقوقی</button>
                                            </div>
                                            <div class="col-12 no-padding" style="font-size:14px;font-weight:700;margin-bottom:30px;">
                                                اطلاعات شخص حقوقی
                                            </div>
                                            <div class="col-12 no-padding has-float-label">
                                                <input type="text" class="text-control" id="txtOfficeName" value="@(Model.WebUser.PassNo.IsNotEmpty() ? "" : Model.WebUser.FullName)" />
                                                <span>نام شرکت</span>
                                            </div>
                                            <div class="col-12 no-padding" style="font-weight:700;color:#909090;margin: 18px 0 12px;">محل دفتر مرکزی</div>
                                            <div class="container-fluid">
                                                <div class="row">
                                                    <div class="col-6 has-float-label">
                                                        @Html.DropDownList("cboProvinceCode", HomeController.GetProvinces(Model.WebUser.ProvinceCode), new { @class = "combo-control", data_id = "ProvinceCode", onchange = "getCity()", data_required = "true" })
                                                        <span>استان</span>
                                                    </div>
                                                    <div class="col-6 no-padding has-float-label">
                                                        @Html.DropDownList("cboCityCode", HomeController.GetCities(Model.WebUser.ProvinceCode, Model.WebUser.CodeShahr), new { @class = "combo-control", data_id = "CityCode", data_required = "true" })
                                                        <span>شهر</span>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-12 no-padding has-float-label" style="margin: 15px 0 25px;">
                                                <input type="text" class="text-control" id="txtTel" value="@Model.WebUser.TelNo" />
                                                <span>شماره تلفن ثابت</span>
                                            </div>
                                            <div class="col-12 no-padding has-float-label" style="margin-bottom:25px;">
                                                <textarea type="text" class="textarea-control" style="height:50px;" id="txtOfficeAddress">@(Model.WebUser.PassNo.IsNotEmpty() ? "" : Model.WebUser.Address)</textarea>
                                                <span>آدرس</span>
                                            </div>
                                            <div class="col-12 no-padding save office" style="display:none;">
                                                <button type="button" class="button-accept" onclick="savePersonal('office')">
                                                    <img src="~/App_Images/shoping/SavepersonelInfo.svg" />ثبت
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-12 no-padding section-error text-center" style="height:18px;color: red;margin:12px 0 5px;overflow:hidden;">
                                        <span class="sp-personal-error"></span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    @*سفارش‌های من*@
                    <div class="content div-order">
                        <div class="form-card no-margin no-padding">
                            <div class="p-1" style="line-height: 34px;border-bottom:1px solid #ccc;background-color:#eaf1f2;">
                                <span style="font-size:12px;font-weight:700;">لیست سفارش‌ها</span>
                            </div>
                            <div class="col-12 no-padding" style="background-color:#ced8d9;font-size: 10px;font-weight: 700;line-height: 26px;">
                                <div class="row">
                                    <div class="col-4">شماره سفارش</div>
                                    <div class="col-4">تاریخ سفارش</div>
                                    <div class="col-4">مبلغ قابل پرداخت (ریال)</div>
                                </div>
                            </div>
                            <div class="col-12 no-padding" style="min-height:130px;max-height:500px;overflow: auto;">
                                @*تکرار میشود*@
                                @foreach (var item in Model.Factor)
                                {
                                    <div class="col-12 no-padding" style="border-bottom:1px solid #ccc;line-height:44px;">
                                        <div class="row">
                                            <div class="col-4">@item.FactorCode</div>
                                            <div class="col-4">@item.FactorDate</div>
                                            <div class="col-4">@item.FactorMablagh.ToNumber()</div>
                                        </div>
                                    </div>
                                }
                            </div>
                        </div>
                    </div>

                    @*آدرس ها*@
                    <div class="col-12 no-padding content div-address">

                    </div>

                    @*لیست علاقه‌مندی‌ها*@
                    <div class="content div-interest">
                        <div class="p-1" style="line-height: 34px;border-bottom:1px solid #ccc;background-color:#eaf1f2;">
                            <span style="font-size:12px;font-weight:700;">لیست علاقه‌مندی‌ها</span>
                        </div>
                        <div class="col-12" style="min-height:130px;max-height:500px;overflow: auto;padding:0 60px;">
                            @*تکرار میشود*@
                            @for (var i = 0; i < Model.KalaPart.Count; i++)
                            {
                                <div class="col-12 no-padding">
                                    <div class="col-12" style="display:flex;padding:12px;border-bottom:1px solid #ccc;">
                                        <img src="@Model.KalaPart[i].PicThumb.ToBase64File()" style="width:58px;height:58px;border-radius:50%;border:1px solid #ccc;" />
                                        <div style="width:calc(100% - 66px);margin-right:8px;font-weight: 700;">
                                            <div style="margin:12px 0 3px;">@Model.KalaPart[i].Name</div>
                                            <div>
                                                @if (Model.KalaPart[i].Mojodi > 0)
                                                {
                                                    if (Model.KalaPart[i].DisplayKalaPrice(Model.Avarez, Model.Maliyat) == 0)
                                                    {
                                                        <span style="color:#546E7A!important;">تماس بگیرید</span>
                                                    }
                                                    else
                                                    {
                                                        <div class="product-price-new" style="display:inline-block;">
                                                            <span>@((Model.KalaPart[i].KalaTakhfifPersent > 0 ? Model.KalaPart[i].DisplayKalaNewPrice(Model.Avarez, Model.Maliyat) : Model.KalaPart[i].DisplayKalaPrice(Model.Avarez, Model.Maliyat)).ToNumber())</span><span style="margin-right:3px;">ریال</span>
                                                        </div>
                                                        if (Model.KalaPart[i].KalaTakhfifPersent > 0)
                                                        {
                                                            <div style="display:inline-block;text-decoration: line-through;margin-right:5px;">
                                                                <span>@(Model.KalaPart[i].DisplayKalaPrice(Model.Avarez, Model.Maliyat).ToNumber())</span><span style="margin-right:3px;">ریال</span>
                                                            </div>
                                                        }
                                                    }
                                                }
                                                else
                                                {
                                                    <span style="color:#546E7A!important;">ناموجود</span>
                                                }
                                                <img src='~/App_Images/index/deleteProduct.svg' style='float:left;cursor:pointer;' title='حذف از علاقه‌مندی‌ها' data-id="@Model.KalaPart[i].Code" data-part="@Model.KalaPart[i].CodePartProperty" onclick="deleteLikeProduct(this)" />
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            }
                        </div>
                    </div>

                    @*نقد و نظرات*@
                    <div class="col-12 no-padding content div-comment">
                    </div>

                    @*تغییر رمز*@
                    <div class="content div-password">
                        <div class="p-1" style="line-height: 34px;border-bottom:1px solid #ccc;background-color:#eaf1f2;margin-bottom:20px;">
                            <span style="font-size:12px;font-weight:700;">تغییر رمز</span>
                        </div>
                        <div class="form-card" style="width:390px;height:330px;margin:0 auto!important;padding:50px 45px!important;">
                            <div class="col-12 no-padding has-float-label">
                                <input type="password" class="text-control" autocomplete="off" data-required="true" id="txtPassword" />
                                <span>کلمه عبور فعلی</span>
                            </div>
                            <div class="col-12 no-padding has-float-label" style="margin:30px 0;">
                                <input type="password" class="text-control" autocomplete="off" data-required="true" id="txtNewPassword" />
                                <span>کلمه عبور جدید</span>
                            </div>
                            <div class="col-12 no-padding has-float-label">
                                <input type="password" class="text-control" autocomplete="off" data-required="true" id="txtRepeatNewPassword" />
                                <span>تکرار کلمه عبور جدید</span>
                            </div>
                            <div class="col-12 no-padding" style="margin-top: 30px;">
                                <button type="button" class="button-accept btn-change-password">
                                    <img src="~/App_Images/Profile/ChangePass.svg" />تغییر کلمه عبور
                                </button>
                            </div>
                            <div class="col-12 no-padding section-error text-center" style="height:18px;color: red;margin:12px 0 5px;overflow:hidden;">
                                <span class="sp-password-error"></span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        @*محصولات پیشنهادی برای شما*@
        <div class="col-12 no-padding" style="display:none;">
            <div class="col-12 no-padding" style="font-weight:700;margin:20px 0 8px;">محصولات پیشنهادی برای شما</div>
            <div class="col-12 form-card no-margin" style="padding: 36px 90px !important;">
                <div class="row">
                    <div class="col-3 text-center suggested">
                        <img src="~/App_Images/index/watch-2.png" class="suggested-img" />
                        <label>نام کالای خیلی قشنگ</label>
                        <div><span>20,000,000</span>ریال</div>
                        <div class="star">
                            <img src="~/App_Images/index/star.svg" class="svg" style="fill:#ccc;" />
                            <img src="~/App_Images/index/star.svg" class="svg" />
                            <img src="~/App_Images/index/star.svg" class="svg" />
                            <img src="~/App_Images/index/star.svg" class="svg" />
                            <img src="~/App_Images/index/star.svg" class="svg" />
                        </div>
                    </div>
                    <div class="col-3 text-center suggested">
                        <img src="~/App_Images/index/watch-2.png" class="suggested-img" />
                        <label>نام کالای خیلی قشنگ</label>
                        <div><span>20,000,000</span>ریال</div>
                        <div class="star">
                            <img src="~/App_Images/index/star.svg" class="svg" style="fill:#ccc;" />
                            <img src="~/App_Images/index/star.svg" class="svg" />
                            <img src="~/App_Images/index/star.svg" class="svg" />
                            <img src="~/App_Images/index/star.svg" class="svg" />
                            <img src="~/App_Images/index/star.svg" class="svg" />
                        </div>
                    </div>
                    <div class="col-3 text-center suggested">
                        <img src="~/App_Images/index/watch-2.png" class="suggested-img" />
                        <label>نام کالای خیلی قشنگ</label>
                        <div><span>20,000,000</span>ریال</div>
                        <div class="star">
                            <img src="~/App_Images/index/star.svg" class="svg" style="fill:#ccc;" />
                            <img src="~/App_Images/index/star.svg" class="svg" />
                            <img src="~/App_Images/index/star.svg" class="svg" />
                            <img src="~/App_Images/index/star.svg" class="svg" />
                            <img src="~/App_Images/index/star.svg" class="svg" />
                        </div>
                    </div>
                    <div class="col-3 text-center suggested">
                        <img src="~/App_Images/index/watch-2.png" class="suggested-img" />
                        <label>نام کالای خیلی قشنگ</label>
                        <div><span>20,000,000</span>ریال</div>
                        <div class="star">
                            <img src="~/App_Images/index/star.svg" class="svg" style="fill:#ccc;" />
                            <img src="~/App_Images/index/star.svg" class="svg" />
                            <img src="~/App_Images/index/star.svg" class="svg" />
                            <img src="~/App_Images/index/star.svg" class="svg" />
                            <img src="~/App_Images/index/star.svg" class="svg" />
                        </div>
                    </div>
                </div>
                <img src="~/App_Images/index/goright.svg" class="go-right-left" style="right:0;" />
                <img src="~/App_Images/index/goleft.svg" class="go-right-left" style="left:0;" />
            </div>
        </div>
    </div>
}
else
{

    <div class="my-profile">
        <div class="header-back">
            <a><img style="margin-left: 25px;" src="/App_Images/index/arrow2.svg"><span>اطلاعات حساب کاربری</span></a>
        </div>
        <div class="completed-info-wrapper px-3 py-5" id="div-login" style="display:block;">
            <div class="row mb-4">
                <label class="col-6 text-center lbl-real" for="hoqoqi"><input type="radio" id="hoqoqi" name="type" checked />شخص حقوقی هستم</label>
                <label class="col-6 text-center lbl-not-real" for="haqiqi"><input type="radio" id="haqiqi" name="type" />شخص حقیقی هستم</label>
            </div>
            <div class="mt-2 haqiqi">
                <div class="has-float-label">
                    <input type="text" class="text-control" id="txtPersonName" value="@(Model.WebUser.PassNo.IsNotEmpty() ? Model.WebUser.FullName : "")" />
                    <span>نام و نام خانوادگی</span>
                </div>
                <div style="font-weight:700;color:#909090;margin: 18px 0 12px;">تاریخ تولد</div>
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-3 has-float-label">
                            <input type="text" class="text-control" id="day" maxlength="2" value="@(Model.WebUser.BirthDate.IsNotEmpty() ? Model.WebUser.BirthDate.Split('/')[2] : "")" />
                            <span>روز</span>
                        </div>
                        <div class="col-6 has-float-label">
                            <select class="text-control" id="month" value="@(Model.WebUser.BirthDate.IsNotEmpty() ? Model.WebUser.BirthDate.Split('/')[1] : "")">
                                <option value="00"></option>
                                <option value="01" @(Model.WebUser.BirthDate.IsNotEmpty() && Model.WebUser.BirthDate.Split('/')[1] == "01" ? "selected=selected" : "")>فروردین</option>
                                <option value="02" @(Model.WebUser.BirthDate.IsNotEmpty() && Model.WebUser.BirthDate.Split('/')[1] == "02" ? "selected=selected" : "")>اردیبهشت</option>
                                <option value="03" @(Model.WebUser.BirthDate.IsNotEmpty() && Model.WebUser.BirthDate.Split('/')[1] == "03" ? "selected=selected" : "")>خرداد</option>
                                <option value="04" @(Model.WebUser.BirthDate.IsNotEmpty() && Model.WebUser.BirthDate.Split('/')[1] == "04" ? "selected=selected" : "")>تیر</option>
                                <option value="05" @(Model.WebUser.BirthDate.IsNotEmpty() && Model.WebUser.BirthDate.Split('/')[1] == "05" ? "selected=selected" : "")>مرداد</option>
                                <option value="06" @(Model.WebUser.BirthDate.IsNotEmpty() && Model.WebUser.BirthDate.Split('/')[1] == "06" ? "selected=selected" : "")>شهریور</option>
                                <option value="07" @(Model.WebUser.BirthDate.IsNotEmpty() && Model.WebUser.BirthDate.Split('/')[1] == "07" ? "selected=selected" : "")>مهر</option>
                                <option value="08" @(Model.WebUser.BirthDate.IsNotEmpty() && Model.WebUser.BirthDate.Split('/')[1] == "08" ? "selected=selected" : "")>آبان</option>
                                <option value="09" @(Model.WebUser.BirthDate.IsNotEmpty() && Model.WebUser.BirthDate.Split('/')[1] == "09" ? "selected=selected" : "")>آذر</option>
                                <option value="10" @(Model.WebUser.BirthDate.IsNotEmpty() && Model.WebUser.BirthDate.Split('/')[1] == "10" ? "selected=selected" : "")>دی</option>
                                <option value="11" @(Model.WebUser.BirthDate.IsNotEmpty() && Model.WebUser.BirthDate.Split('/')[1] == "11" ? "selected=selected" : "")>بهمن</option>
                                <option value="12" @(Model.WebUser.BirthDate.IsNotEmpty() && Model.WebUser.BirthDate.Split('/')[1] == "12" ? "selected=selected" : "")>اسفند</option>
                            </select>
                            <span>ماه</span>
                        </div>
                        <div class="col-3 has-float-label pe-0">
                            <input type="text" class="text-control" id="txtYear" maxlength="4" value="@(Model.WebUser.BirthDate.IsNotEmpty() ? Model.WebUser.BirthDate.Split('/')[0] : "")" />
                            <span>سال</span>
                        </div>
                    </div>
                </div>
                <div class="mt-3 has-float-label">
                    <input type="text" class="text-control" id="txtPassNo" data-required="true" value="@Model.WebUser.PassNo" />
                    <span>کد ملی</span>
                </div>
                <div class="mt-3 has-float-label">
                    <input type="text" class="text-control" id="txtPersonEmail" value="@Model.WebUser.Email" />
                    <span>آدرس ایمیل</span>
                </div>
                <div class="mt-3 has-float-label">
                    <textarea type="text" class="textarea-control" id="txtPersonAddress">@(Model.WebUser.PassNo.IsNotEmpty() ? Model.WebUser.Address : "")</textarea>
                    <span>آدرس</span>
                </div>
                <div class="mt-3 save personel">
                    <button type="button" class="rounded-pill button-accept" onclick="savePersonal('person')">
                        ثبت
                    </button>
                </div>

            </div>
            <div class="mt-2 hoqoqi d-none">
                <div class="has-float-label">
                    <input type="text" class="text-control" id="txtOfficeName" value="@(Model.WebUser.PassNo.IsNotEmpty() ? "" : Model.WebUser.FullName)" />
                    <span>نام شرکت / سازمان</span>
                </div>
                <div style="font-weight:700;color:#909090;margin: 18px 0 12px;">محل دفتر مرکزی</div>
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-6 has-float-label">
                            @Html.DropDownList("ProvinceCode", HomeController.GetProvinces(Model.WebUser.ProvinceCode), new { @class = "combo-control", data_id = "ProvinceCode", onchange = "getCity()", data_required = "true" })
                            <span>استان</span>
                        </div>
                        <div class="col-6 no-padding has-float-label">
                            @Html.DropDownList("CityCode", HomeController.GetCities(Model.WebUser.ProvinceCode, Model.WebUser.CodeShahr), new { @class = "combo-control", data_id = "CityCode", data_required = "true" })
                            <span>شهر</span>
                        </div>
                    </div>
                </div>
                <div class="has-float-label" style="margin: 15px 0 25px;">
                    <input type="text" class="text-control" id="txtTel" value="@Model.WebUser.TelNo" />
                    <span>شماره تلفن ثابت</span>
                </div>
                <div class="has-float-label" style="margin-bottom:25px;">
                    <textarea type="text" class="textarea-control" style="height:50px;" id="txtOfficeAddress">@(Model.WebUser.PassNo.IsNotEmpty() ? "" : Model.WebUser.Address)</textarea>
                    <span>آدرس</span>
                </div>
                <div class="save office">
                    <button type="button" class="rounded-pill button-accept" onclick="savePersonal('office')">
                        ثبت
                    </button>
                </div>

            </div>
        </div>
    </div>

    <div class="my-order">
        <div class="header-back">
            <a><img style="margin-left: 25px;" src="/App_Images/index/arrow2.svg"><span class="title">سفارش‌های من</span></a>
        </div>

        <div class="completed-info-wrapper px-3 py-3" id="div-login" style="display:block;">
            @*تکرار میشود*@
            @for (var i = 0; i < Model.Factor.Count && i < 3; i++)
            {
                <div class="order-wrapper">
                    <div class="order-code mb-2">
                        <div class="title">کد سفارش:</div>
                        <div class="value">@Model.Factor[i].FactorCode</div>
                    </div>
                    <div class="order-info">
                        <div class="date">@Model.Factor[i].FactorDate</div>
                        <div class="price">@Model.Factor[i].FactorMablagh.ToNumber() <span class="currency">ریال</span></div>
                    </div>
                </div>
            }
        </div>
    </div>

    <div class="my-favorite">
        <div class="header-back">
            <a><img style="margin-left: 25px;" src="/App_Images/index/arrow2.svg"><span class="title">لیست علاقمندی‌های‌ من</span></a>
        </div>

        <div class="completed-info-wrapper px-3 py-3" id="div-login" style="display:block;">
            <div class="product row-item" data-id="" data-prop="">
                @*تکرار میشود*@
                @for (var i = 0; i < Model.KalaPart.Count; i++)
                {
                    <div class="info-product">
                        <div class="avatar"><img src="@Model.KalaPart[i].PicThumb.ToBase64File()" alt="" /></div>
                        <div class="w-100">
                            <div class="d-flex w-100 align-items-baseline justify-content-between">
                                <div class="text">
                                    <h2>@Model.KalaPart[i].Name</h2>
                                </div>
                                <div class="delete deleteShoppingCart" data-id="@Model.KalaPart[i].Code" data-part="@Model.KalaPart[i].CodePartProperty" onclick="deleteLikeProduct(this)"><img src="~/App_Images/index/delete-shoping.svg" /></div>
                            </div>
                            <div class="d-flex align-items-center justify-content-between">
                                @if (Model.KalaPart[i].Mojodi > 0)
                                {
                                    if (Model.KalaPart[i].DisplayKalaPrice(Model.Avarez, Model.Maliyat) == 0)
                                    {
                                        <div class="price">
                                            <span class="newPrice">تماس بگیرید</span>
                                        </div>
                                    }
                                    else
                                    {
                                        <div class="price">
                                            <span class="newPrice">@((Model.KalaPart[i].KalaTakhfifPersent > 0 ? Model.KalaPart[i].DisplayKalaNewPrice(Model.Avarez, Model.Maliyat) : Model.KalaPart[i].DisplayKalaPrice(Model.Avarez, Model.Maliyat)).ToNumber())</span> <span class="currency" style="">ریال</span>
                                        </div>
                                        if (Model.KalaPart[i].KalaTakhfifPersent > 0)
                                        {
                                            <div class="price">
                                                <span class="newPrice">@(Model.KalaPart[i].DisplayKalaPrice(Model.Avarez, Model.Maliyat).ToNumber())</span>
                                            </div>
                                        }
                                    }
                                }
                                else
                                {
                                    <div class="price">
                                        <span class="newPrice">ناموجود</span>
                                    </div>
                                }
                            </div>
                        </div>
                    </div>
                }
            </div>
        </div>
    </div>
}

