<commit_before>
<div ng-controller="SideTicketCtrl" class="support-side-chat">
	<table class="support-side-chat-table">
		<tr><td class="support-chat-header">
			<a class="support-chat-header-back" ng-click="setViewTicket(0)">&nbsp;<i class="fa fa-chevron-left"></i> Issues</a>
			<a class="support-chat-header-issue" href="/ticket/{{ticket.id_support}}">#{{ticket.id_support}}</a>
			<div class="divider"></div>
			<div class="support-chat-header-details">

				<div ng-if="ticket.restaurant">{{ticket.restaurant.name}} / {{ticket.restaurant.community}}</div>
				<div ng-if="ticket.order">
					{{ticket.order.pay_type | capitalize}} / {{ticket.order.delivery_type | capitalize}} /

						<span ng-if="order.status"><b>{{order.status.status}}</b> <span am-time-ago="order.status.timestamp*1000"></span></span>
						<span ng-if="!order.status">{{order.confirmed ? 'Confirmed' : 'Placed'}}</span>
					<br>ETA: {{ticket.order.eta.time}} minites
				</div>


				<div ng-if="ticket.pexcard" ng-controller="SideSupportPexCardCtrl">

						<div class="link no-underline" ng-click="ticket.pexcard.show_info = !ticket.pexcard.show_info"><i class="fa fa-credit-card"></i> Card Serial: {{ticket.pexcard.card_serial}}</div>

						<div ng-show="ticket.pexcard.show_info">

							<h2>Add Funds</h2>

							<form name="form" novalidate>

								<ul ng-class="{'submitted':submitted}" class="ul-inputs">

									<li class="li-input" ng-class="{'error':form.amount.$invalid}">
										<div class="input">
											<input type="number" step="any" ignore-mouse-wheel name="amount" required ng-model="pexcard.amount" placeholder="0.00">
										</div>
										<div class="box-error">
											<small ng-show="form.amount.$error.required">Required.</small>
										</div>
									</li>

									<li class="li-input" class="error" ng-class="{'error':form.note.$invalid}">
										<div class="input"><input type="text" name="note" required ng-model="pexcard.note" placeholder="Description"></div>
										<div class="box-error">
											<small ng-show="form.note.$error.required">Required.</small>
										</div>
									</li>

									<li class="li-input buttons" ng-show="!isAdding">
										<button class="button green" ng-click="add_funds();">Add</button>
									</li>

									<li class="li-input" ng-show="isAdding">
										<span><i class="fa fa-circle-o-notch fa-spin"></i> Adding funds</span>
									</li>

								</ul>

							</form>

							<h2>Current balance</h2>

							<div ng-show="card">
								<div class="info">Available balance: <strong positive-or-negative-color="{{card.availableBalance}}">$ {{ card.availableBalance | formatPrice}}</strong></div>
								<div class="info">Ledger balance: <strong positive-or-negative-color="{{card.ledgerBalance}}">$ {{ card.ledgerBalance | formatPrice}}</strong></div>
								<div class="info">Status: <strong>{{card.status}}</strong></div>
							</div>

							<ul ng-class="{'submitted':submitted}" class="ul-inputs">

								<li class="li-input buttons" ng-show="!isLoadingBalance">
									<span class="link no-underline green" ng-click="current_balanced();">Load</span>
								</li>

								<li class="li-input" ng-show="isLoadingBalance">
									<span><i class="fa fa-circle-o-notch fa-spin"></i> Loading</span>
								</li>
							</ul>

						</div>
				</div>
			</div>
		</td></tr>
		<tr><td class="support-chat-contents">
			<div class="support-chat-contents-scroll">
				<div ng-repeat="message in ticket.messages" class="support-chat-contents-message" id="suppport-chat-message-{{message.id_support}}" ng-class="{'support-chat-contents-message-support': message.is_support, 'support-chat-contents-message-driver': message.is_driver, 'support-chat-contents-message-customer': (!message.is_support && !message.is_driver), 'support-chat-contents-message-unset': message.sending, 'support-chat-contents-message-system': message.from == 'system'}">

					<a href="/{{message.is_support || message.is_driver ? 'staff' : 'customer'}}/{{message.id_admin}}">
					<div class="support-chat-contents-message-name">
						<span class="support-chat-contents-message-icon">
							<span ng-if="message.from == 'system'">
								<i class="fa fa-bolt"></i>
							</span>
							<span ng-if="message.from != 'system'">
								<i class="fa fa-comment" ng-if="message.is_support"></i>
								<i class="fa fa-car" ng-if="!message.is_support && message.is_driver"></i>
								<i class="fa fa-user" ng-if="!message.is_support && !message.is_driver"></i>
							</span>
						</span>
						{{(message.first_name && message.first_name != 'false') ? message.first_name : message.name}}
					</div>
					</a>
					<div class="support-chat-contents-message-time">
						<? /*{{message.timestamp*1000 | date: 'M/d h:mm a'}} */ ?>
						<span am-time-ago="message.date"></span>
					</div>
					<div class="support-chat-contents-message-body">{{message.body}}</div>
				</div>
			</div>
		</td></tr>
		<tr><td class="support-side-chat-row">
			<div class="support-chat-box-wrap">
				<textarea id="support-chat-box" class="support-chat-box" placeholder="Type someting and press enter..." chat-send></textarea>
			</div>
		</td></tr>
	</table>
</div><commit_msg>fixed #4335<commit_after>
<div ng-controller="SideTicketCtrl" class="support-side-chat">
	<table class="support-side-chat-table">
		<tr><td class="support-chat-header">
			<a class="support-chat-header-back" ng-click="setViewTicket(0)">&nbsp;<i class="fa fa-chevron-left"></i> Issues</a>
			<a class="support-chat-header-issue" href="/ticket/{{ticket.id_support}}">#{{ticket.id_support}}</a>
			<div class="divider"></div>
			<div class="support-chat-header-details">

				<div ng-if="ticket.restaurant">{{ticket.restaurant.name}} / {{ticket.restaurant.community}}</div>
				<div ng-if="ticket.order">
					{{ticket.order.pay_type | capitalize}} / {{ticket.order.delivery_type | capitalize}} /

						<span ng-if="order.status"><b>{{order.status.status}}</b> <span am-time-ago="order.status.timestamp*1000"></span></span>
						<span ng-if="!order.status">{{order.confirmed ? 'Confirmed' : 'Placed'}}</span>
					<br>ETA: {{ticket.order.eta.time}} minites
				</div>


				<div ng-if="ticket.pexcard" ng-controller="SideSupportPexCardCtrl">

						<div class="link no-underline" ng-click="ticket.pexcard.show_info = !ticket.pexcard.show_info"><i class="fa fa-credit-card"></i> Card Serial: {{ticket.pexcard.card_serial}}</div>

						<div ng-show="ticket.pexcard.show_info">

							<h2>Add Funds</h2>

							<form name="form" novalidate>

								<ul ng-class="{'submitted':submitted}" class="ul-inputs">

									<li class="li-input" ng-class="{'error':form.amount.$invalid}">
										<div class="input">
											<input type="number" step="any" ignore-mouse-wheel name="amount" required ng-model="pexcard.amount" placeholder="0.00">
										</div>
										<div class="box-error">
											<small ng-show="form.amount.$error.required">Required.</small>
										</div>
									</li>

									<li class="li-input" class="error" ng-class="{'error':form.note.$invalid}">
										<div class="input"><input type="text" name="note" required ng-model="pexcard.note" placeholder="Description"></div>
										<div class="box-error">
											<small ng-show="form.note.$error.required">Required.</small>
										</div>
									</li>

									<li class="li-input buttons" ng-show="!isAdding">
										<button class="button green" ng-click="add_funds();">Add</button>
									</li>

									<li class="li-input" ng-show="isAdding">
										<span><i class="fa fa-circle-o-notch fa-spin"></i> Adding funds</span>
									</li>

								</ul>

							</form>

							<h2>Current balance</h2>

							<div ng-show="card">
								<div class="info">Available balance: <strong positive-or-negative-color="{{card.availableBalance}}">$ {{ card.availableBalance | formatPrice}}</strong></div>
								<div class="info">Ledger balance: <strong positive-or-negative-color="{{card.ledgerBalance}}">$ {{ card.ledgerBalance | formatPrice}}</strong></div>
								<div class="info">Status: <strong>{{card.status}}</strong></div>
							</div>

							<ul ng-class="{'submitted':submitted}" class="ul-inputs">

								<li class="li-input buttons" ng-show="!isLoadingBalance">
									<span class="link no-underline green" ng-click="current_balanced();">Load</span>
								</li>

								<li class="li-input" ng-show="isLoadingBalance">
									<span><i class="fa fa-circle-o-notch fa-spin"></i> Loading</span>
								</li>
							</ul>

						</div>
				</div>
			</div>
		</td></tr>
		<tr><td class="support-chat-contents">
			<div class="support-chat-contents-scroll">
				<div ng-repeat="message in ticket.messages" class="support-chat-contents-message" id="suppport-chat-message-{{message.id_support}}" ng-class="{'support-chat-contents-message-support': message.is_support, 'support-chat-contents-message-driver': message.is_driver, 'support-chat-contents-message-customer': (!message.is_support && !message.is_driver), 'support-chat-contents-message-unset': message.sending, 'support-chat-contents-message-system': message.from == 'system'}">

					<a href="/{{message.is_support || message.is_driver ? 'staff' : 'customer'}}/{{message.id_admin}}">
					<div class="support-chat-contents-message-name">
						<span class="support-chat-contents-message-icon">
							<span ng-if="message.from == 'system'">
								<i class="fa fa-bolt"></i>
							</span>
							<span ng-if="message.from != 'system'">
								<i class="fa fa-comment" ng-if="message.is_support"></i>
								<i class="fa fa-car" ng-if="!message.is_support && message.is_driver"></i>
								<i class="fa fa-user" ng-if="!message.is_support && !message.is_driver"></i>
							</span>
						</span>
						{{(message.first_name && message.first_name != 'false') ? message.first_name : message.name}}
					</div>
					</a>
					<div class="support-chat-contents-message-time">
						<? /*{{message.timestamp*1000 | date: 'M/d h:mm a'}} */ ?>
						<span am-time-ago="message.date"></span>
					</div>
					<div class="support-chat-contents-message-body">{{message.body}}</div>
				</div>
			</div>
		</td></tr>
		<tr><td class="support-side-chat-row">
			<div class="support-chat-box-wrap">
				<textarea id="support-chat-box" class="support-chat-box" placeholder="Type something and press enter..." chat-send></textarea>
			</div>
		</td></tr>
	</table>
</div>
{'fraction_non_alphanumeric': 0.2072484501669051, 'fraction_numerical': 0.0034334763948497852, 'mean_word_length': 3.3618968386023296, 'pattern_counts': {'":': 0, '<': 287, '<?xml version=': 0, '>': 287, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2016661', 'n_tokens_mistral': 4522, 'n_tokens_neox': 3429, 'n_words': 536}