Skip to content
This repository has been archived by the owner on Jan 9, 2020. It is now read-only.

Commit

Permalink
UI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mlantz committed Sep 3, 2018
1 parent b2f9809 commit 953ec5f
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 87 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The MIT License (MIT)
Copyright (c) YAB Inc.
Copyright (c) Grafite Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
8 changes: 4 additions & 4 deletions src/Views/analytics/subscription-table.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
</thead>
<tbody>
@foreach ($subscriptions as $subscription)
@if (StoreHelper::subscriptionPlan($subscription))
@if (commerce()->subscriptionPlan($subscription))
<tr>
<td>{!! $subscription->name !!}</td>
<td><a href="{{ url('admin/users/'.$subscription->user->user()->id.'/edit') }}">{{ $subscription->user->user()->name }}</a></td>
<td>{{ $subscription->created_at->format('d M, Y') }}</td>
<td>${{ StoreHelper::subscriptionPlan($subscription)->amount }} / {{ StoreHelper::subscriptionPlan($subscription)->frequency }}</td>
<td>${{ commerce()->subscriptionPlan($subscription)->amount }} / {{ commerce()->subscriptionPlan($subscription)->frequency }}</td>
<td class="text-right">
@if (is_null($subscription->ends_at)) {!! StoreHelper::cancelSubscriptionBtn($subscription, 'btn btn-sm btn-danger float-right raw-margin-left-8') !!} @endif
<a class="btn btn-sm btn-secondary float-right" href="{!! route(config('cms.backend-route-prefix', 'cms').'.plans.edit', [StoreHelper::subscriptionPlan($subscription)->id]) !!}"><i class="fa fa-pencil"></i> Review Plan</a>
@if (is_null($subscription->ends_at)) {!! commerce()->cancelSubscriptionBtn($subscription, 'btn btn-sm btn-danger float-right raw-margin-left-8') !!} @endif
<a class="btn btn-sm btn-secondary float-right" href="{!! route(config('cms.backend-route-prefix', 'cms').'.plans.edit', [commerce()->subscriptionPlan($subscription)->id]) !!}"><i class="fa fa-pencil"></i> Review Plan</a>
</td>
</tr>
@endif
Expand Down
163 changes: 82 additions & 81 deletions src/Views/orders/item.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@extends('cms::layouts.dashboard')

@section('pageTitle') Order Items: Edit @stop

@section('content')

<div class="modal fade" id="cancelItemDialog" tabindex="-3" role="dialog" aria-labelledby="cancelItemModalLabel" aria-hidden="true">
Expand All @@ -20,92 +22,91 @@
</div>
</div>

<div class="row">
<h1 class="page-header">Order Items: Edit</h1>
</div>

@include('commerce::orders.breadcrumbs', ['location' => [['Order' => url(config('cms.backend-route-prefix', 'cms').'/orders/'.$orderItem->order_id.'/edit')], 'item']])
<div class="col-md-12 mt-4">

<div class="row">
<div class="col-md-12 raw-margin-bottom-24">
<h2 class="text-center raw-margin-bottom-24">#{{ $orderItem->order->uuid }} @if ($orderItem->order->is_shipped) <span class="fa fa-truck"></span> @endif</h2>
</div>
</div>
@include('commerce::orders.breadcrumbs', ['location' => [['Order' => url(config('cms.backend-route-prefix', 'cms').'/orders/'.$orderItem->order_id.'/edit')], 'item']])

<div class="row">
<div class="col-md-6 raw-margin-bottom-24">
<table class="table table-striped">
<tbody>
<tr>
<th>Product</th>
<td class="text-right"><a href="{!! route(config('cms.backend-route-prefix', 'cms').'.products.edit', [$orderItem->product_id]) !!}">{{ ucfirst($orderItem->product->name) }}</a></td>
</tr>
<tr>
<th>Quantity</th>
<td class="text-right">{{ $orderItem->quantity }}</td>
</tr>
<tr>
<th>Variants</th>
<td class="text-right">
@foreach($orderItem->product_variants as $variant => $value)
<b>{{ ucfirst($variant) }}</b>: {{ $value }}<br>
@endforeach
</td>
</tr>
<tr>
<th>Status</th>
<td class="text-right">{{ ucfirst($orderItem->status) }}</td>
</tr>
</tbody>
</table>
<div class="row">
<div class="col-md-12 raw-margin-bottom-24">
<h2 class="text-center raw-margin-bottom-24">#{{ $orderItem->order->uuid }} @if ($orderItem->order->is_shipped) <span class="fa fa-truck"></span> @endif</h2>
</div>
</div>
<div class="col-md-6 raw-margin-bottom-24">
<table class="table table-striped">
<tbody>
<tr>
<th>Subtotal</th>
<td class="text-right">${{ $orderItem->subtotal }}</td>
</tr>
<tr>
<th>Tax</th>
<td class="text-right">${{ $orderItem->tax }}</td>
</tr>
<tr>
<th>Shipping</th>
<td class="text-right">${{ $orderItem->shipping }}</td>
</tr>
<tr>
<th>Total</th>
<td class="text-right">${{ $orderItem->total }}</td>
</tr>
</tbody>
</table>
@if (!$orderItem->was_refunded)
<div class="text-right">
{!! Form::open(['id' => 'cancelItemForm', 'url' => config('cms.backend-route-prefix', 'cms').'/orders/item/cancel', 'method' => 'post', 'class' => 'inline-form pull-right']) !!}
@input_maker_create('id', ['type' => 'hidden'], $orderItem)
{!! Form::submit('Cancel Order Item', ['class' => 'btn btn-warning']) !!}
{!! Form::close() !!}
</div>
@endif

@if ($orderItem->was_refunded)
<div class="well text-center">
<span class="lead">
Refunded
</span>
</div>
<table class="table table-striped raw-margin-top-24">
<tr>
<th>Amount</th>
<th class="text-right">Date</th>
</tr>
<tr>
<td>${{ $orderItem->refund->amount }}</td>
<td class="text-right">{{ $orderItem->refund->created_at }}</td>
</tr>
<div class="row">
<div class="col-md-6 raw-margin-bottom-24">
<table class="table table-striped">
<tbody>
<tr>
<th>Product</th>
<td class="text-right"><a href="{!! route(config('cms.backend-route-prefix', 'cms').'.products.edit', [$orderItem->product_id]) !!}">{{ ucfirst($orderItem->product->name) }}</a></td>
</tr>
<tr>
<th>Quantity</th>
<td class="text-right">{{ $orderItem->quantity }}</td>
</tr>
<tr>
<th>Variants</th>
<td class="text-right">
@foreach($orderItem->product_variants as $variant => $value)
<b>{{ ucfirst($variant) }}</b>: {{ $value }}<br>
@endforeach
</td>
</tr>
<tr>
<th>Status</th>
<td class="text-right">{{ ucfirst($orderItem->status) }}</td>
</tr>
</tbody>
</table>
</div>
<div class="col-md-6 raw-margin-bottom-24">
<table class="table table-striped">
<tbody>
<tr>
<th>Subtotal</th>
<td class="text-right">${{ $orderItem->subtotal }}</td>
</tr>
<tr>
<th>Tax</th>
<td class="text-right">${{ $orderItem->tax }}</td>
</tr>
<tr>
<th>Shipping</th>
<td class="text-right">${{ $orderItem->shipping }}</td>
</tr>
<tr>
<th>Total</th>
<td class="text-right">${{ $orderItem->total }}</td>
</tr>
</tbody>
</table>
@endif
@if (!$orderItem->was_refunded)
<div class="text-right">
{!! Form::open(['id' => 'cancelItemForm', 'url' => config('cms.backend-route-prefix', 'cms').'/orders/item/cancel', 'method' => 'post', 'class' => 'inline-form pull-right']) !!}
@input_maker_create('id', ['type' => 'hidden'], $orderItem)
{!! Form::submit('Cancel Order Item', ['class' => 'btn btn-warning']) !!}
{!! Form::close() !!}
</div>
@endif

@if ($orderItem->was_refunded)
<div class="well text-center">
<span class="lead">
Refunded
</span>
</div>
<table class="table table-striped raw-margin-top-24">
<tr>
<th>Amount</th>
<th class="text-right">Date</th>
</tr>
<tr>
<td>${{ $orderItem->refund->amount }}</td>
<td class="text-right">{{ $orderItem->refund->created_at }}</td>
</tr>
</table>
@endif
</div>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion src/Views/transactions/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
@if ($order && $order->hasActiveOrderItems())
<div class="card bg-light border-dark">
<div class="card-header">
<a href="{{ url(config('cms.backend-route-prefix', 'cms').'/orders/'.$order->id.'/edit') }}">Order #:{{ $order->id }}</a>
<a href="{{ url(config('cms.backend-route-prefix', 'cms').'/orders/'.$order->id.'/edit') }}">Order: #{{ $order->id }}</a>
</div>
<div class="card-body">
You must cancel this order if you wish to refund this transaction.
Expand Down

0 comments on commit 953ec5f

Please sign in to comment.