<script type="text/javascript" src="https://cdn.jsdelivr.net/momentjs/latest/moment.min.js"></script>
          <script>
            $(document).ready(function() {
              convertToLocalDate();
            });

            function convertToLocalDate() {
              console.log('convertToLocalDate');
              $('.js-date').each(function(i) {
                var dt = $(this).text().trim();
                var isutc = $(this).hasClass('isutc');

                if (isutc) {

                  if (dt && dt != '-') {

                    if (dt[dt.length - 1] != 'Z') {
                      dt = dt + 'Z';
                    }
                    $(this).text(moment.utc(dt).local().format("YYYY-MM-DD HH:mm:ss"));
                    $(this).removeClass('isutc');
                  }
                }
              });
            }
          </script>

<?php if(Auth::user()->status_promo == 'active'): ?>

                <div class="row my-promo">
                  <div class="col-lg-5 col-xs-12">
                    <div class="row">
                      <div class="col-md-4 noSidePadding">
                        <p class="lbl" i18n="">
                          Promosi:
                        </p>
                      </div>
                      <div class="col-md-8 noSidePadding">
                        <p>
                          <?php echo e(Auth::user()->p_name); ?>


                        </p>
                      </div>
                    </div>
                    <div class="row">
                      <div class=" col-xs-6 col-md-4 noSidePadding">
                        <p class="lbl" i18n="">
                          Jenis Promosi:
                        </p>
                      </div>
                      <div class="col-xs-6 col-md-8 noSidePadding">
                        <p>
                          <?php echo e(Auth::user()->jenis_promosi); ?>

                        </p>
                      </div>
                    </div>
                    <div class="row">
                      <div class="col-xs-6 col-md-4 noSidePadding">
                        <p class="lbl" i18n="">
                          Total Bonus + Deposit:
                        </p>
                      </div>
                      <div class="col-xs-6 col-md-8 noSidePadding">
                        <p>
                          IDR <?php echo e(number_format(Auth::user()->total_deposit_bonus, 2, '.', ',')); ?>

                        </p>
                      </div>
                    </div>
                  </div>
                  <div class="col-lg-7 col-xs-12 ">
                    <div class="row">
                      <div class="col-xs-6 col-md-4 noSidePadding">
                        <p class="lbl" i18n="">
                          Turnover saat ini:
                        </p>
                      </div>
                      <div class="col-xs-6 col-md-8 noSidePadding">
                        <p>
                          IDR <?php echo e(number_format(Auth::user()->user_turnover, 2, '.', ',')); ?>

                        </p>
                      </div>
                    </div>
                    <div class="row">
                      <div class="col-md-4 noSidePadding">
                        <p class="lbl" i18n="">
                          Promosi Kondisi Berakhir:
                        </p>
                      </div>
                      <div class="col-md-8 noSidePadding">
                        <p i18n="">
                          TurnOver tercapai
                          IDR <?php echo e(number_format(Auth::user()->turnover, 2, '.', ',')); ?>

                        </p>
                      </div>

                    </div>
                    <div class="row">
                      <div class=" col-xs-7 col-md-4 noSidePadding">
                        <p class="lbl" i18n="">
                          Tanggal Berakhir Promosi:
                        </p>
                      </div>
                      <div class=" col-xs-5 col-md-8 noSidePadding">
                        <p class="js-date isutc">
                          <?php echo e(Auth::user()->promotion_date_end); ?>

                        </p>
                      </div>

                    </div>

                    <div class="row">
                      <div class="col-xs-2 col-md-4 noSidePadding">
                        <p class="lbl" i18n="">
                          Status:
                        </p>
                      </div>
                      <div class="col-xs-8 col-md-8 noSidePadding">
                        <p>
                          <?php if(Auth::user()->status_promo_running == 'berjalan'): ?>
                          <span class="label label-success">
                            Approved
                          </span>
                          <?php else: ?>
                          <span class="label label-warning">
                            Promotion End
                          </span>
                          <?php endif; ?>
                        </p>
                      </div>

                    </div>
                  </div>

                </div>


                <?php else: ?>

                <!-- my-promo -->
                <div class="row my-promo">
                  <div class="col-lg-5 col-xs-12">
                    <div class="row">
                      <div class="col-md-4 noSidePadding">
                        <p class="lbl" i18n="">
                          Promosi:
                        </p>
                      </div>
                      <div class="col-md-8 noSidePadding">
                        <p>

                          -
                        </p>
                      </div>
                    </div>
                    <div class="row">
                      <div class=" col-xs-6 col-md-4 noSidePadding">
                        <p class="lbl" i18n="">
                          Jenis Promosi:
                        </p>
                      </div>
                      <div class="col-xs-6 col-md-8 noSidePadding">
                        <p>
                          -
                        </p>
                      </div>
                    </div>
                    <div class="row">
                      <div class="col-xs-6 col-md-4 noSidePadding">
                        <p class="lbl" i18n="">
                          Total Bonus + Deposit:
                        </p>
                      </div>
                      <div class="col-xs-6 col-md-8 noSidePadding">
                        <p>
                          -
                        </p>
                      </div>
                    </div>
                  </div>
                  <div class="col-lg-7 col-xs-12 ">
                    <div class="row">
                      <div class=" col-xs-7 col-md-4 noSidePadding">
                        <p class="lbl" i18n="">
                          Tanggal Berakhir Promosi:
                        </p>
                      </div>
                      <div class=" col-xs-5 col-md-8 noSidePadding">
                        <p>
                          -
                        </p>
                      </div>
                    </div>

                    <div class="row">
                      <div class="col-xs-2 col-md-4 noSidePadding">
                        <p class="lbl" i18n="">
                          Status:
                        </p>
                      </div>
                      <div class="col-xs-8 col-md-8 noSidePadding">
                        <p>
                          <span class="label label-">
                            -
                          </span>
                        </p>
                      </div>
                    </div>
                  </div>
                </div>

                <?php endif; ?><?php /**PATH /home/ybjqutnd/jp.royalkingz.top/resources/views/ajaxMyPromo.blade.php ENDPATH**/ ?>