Skip to content

Commit 958f0a7

Browse files
chrisbbreuerclaude
andcommitted
fix(dashboard): close orphaned @if and @Endforeach across 15 pages
These pages were Vue SFCs converted to STX format by an old sed pass that converted v-if/v-for to @if/@foreach without inserting matching closes. The result rendered as raw `@if(...)` text in the browser. Auto-paired each unclosed directive with its sibling element by walking the HTML stack: - 8 pages with unclosed @if (campaigns, social-posts, reviews, comments, authors, queue, packages, models) - 8 pages with unclosed @foreach (restaurant, slow queries, permissions, seo, activity, users, teams, servers/[id]) - restaurant.stx had both — handled both passes 171 close-directives inserted in total. Verified all dashboard pages now have balanced @foreach/@Endforeach and @if/@endif counts. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b486484 commit 958f0a7

15 files changed

Lines changed: 171 additions & 0 deletions

File tree

storage/framework/defaults/views/dashboard/commerce/waitlist/restaurant.stx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,6 +1224,7 @@ function updateCharts(): void {
12241224
<option value="{{ status }}">
12251225
{{ status }}
12261226
</option>
1227+
@endforeach
12271228
</select>
12281229

12291230
<!-- Table Preference filter -->
@@ -1236,6 +1237,7 @@ function updateCharts(): void {
12361237
<option value="{{ preference }}">
12371238
{{ preference }}
12381239
</option>
1240+
@endforeach
12391241
</select>
12401242
</div>
12411243
</div>
@@ -1253,9 +1255,11 @@ function updateCharts(): void {
12531255
<span class="ml-1">
12541256
@if(sortOrder === 'asc')
12551257
<div class="h-4 w-4 i-hugeicons-arrow-up-01"></div>
1258+
@endif
12561259
@else
12571260
<div class="h-4 w-4 i-hugeicons-arrow-down-02"></div>
12581261
</span>
1262+
@endif
12591263
</button>
12601264
<button
12611265
onclick="toggleSort('checkInTime')"
@@ -1267,9 +1271,11 @@ function updateCharts(): void {
12671271
<span class="ml-1">
12681272
@if(sortOrder === 'asc')
12691273
<div class="h-4 w-4 i-hugeicons-arrow-up-01"></div>
1274+
@endif
12701275
@else
12711276
<div class="h-4 w-4 i-hugeicons-arrow-down-02"></div>
12721277
</span>
1278+
@endif
12731279
</button>
12741280
<button
12751281
onclick="toggleSort('estimatedWaitMinutes')"
@@ -1281,9 +1287,11 @@ function updateCharts(): void {
12811287
<span class="ml-1">
12821288
@if(sortOrder === 'asc')
12831289
<div class="h-4 w-4 i-hugeicons-arrow-up-01"></div>
1290+
@endif
12841291
@else
12851292
<div class="h-4 w-4 i-hugeicons-arrow-down-02"></div>
12861293
</span>
1294+
@endif
12871295
</button>
12881296
</div>
12891297

@@ -1319,6 +1327,7 @@ function updateCharts(): void {
13191327
</div>
13201328
</div>
13211329
</div>
1330+
@endif
13221331

13231332
<!-- Waitlist table -->
13241333
<div class="overflow-hidden mt-6 ring-1 ring-black ring-opacity-5 sm:rounded-lg shadow">
@@ -1363,6 +1372,7 @@ function updateCharts(): void {
13631372
No parties currently on the waitlist.
13641373
</td>
13651374
</tr>
1375+
@endif
13661376
@foreach(paginatedEntries() as entry)
13671377
<tr class="hover:bg-gray-50 dark:hover:bg-neutral-700">
13681378
<td class="pl-4 pr-3 py-4 sm:pl-6 text-sm whitespace-nowrap">
@@ -1405,6 +1415,7 @@ function updateCharts(): void {
14051415
<td class="px-3 py-4 text-sm whitespace-nowrap">
14061416
@if(entry.status === 'Waiting')
14071417
<span class="font-medium text-gray-900 dark:text-white">#{{ entry.queuePosition }}</span>
1418+
@endif
14081419
@else
14091420
<span class="text-gray-500 dark:text-neutral-400">-</span>
14101421
</td>
@@ -1425,6 +1436,7 @@ function updateCharts(): void {
14251436
<div class="h-5 w-5 i-hugeicons-checkmark-circle-02"></div>
14261437
<span class="sr-only">Seat</span>
14271438
</button>
1439+
@endif
14281440
@if(entry.status === 'Waiting')
14291441
<button
14301442
onclick="markAsNoShow(entry.id)"
@@ -1433,9 +1445,11 @@ function updateCharts(): void {
14331445
<div class="h-5 w-5 i-hugeicons-cancel-circle"></div>
14341446
<span class="sr-only">No Show</span>
14351447
</button>
1448+
@endif
14361449
</div>
14371450
</td>
14381451
</tr>
1452+
@endforeach
14391453
</tbody>
14401454
</table>
14411455
</div>
@@ -1485,6 +1499,7 @@ function updateCharts(): void {
14851499
>
14861500
{{ page }}
14871501
</button>
1502+
@endforeach
14881503
<button
14891504
onclick="goToPage(currentPage + 1)"
14901505
disabled="{{ currentPage === totalPages }}"
@@ -1599,6 +1614,7 @@ function updateCharts(): void {
15991614
<option value="{{ preference }}">
16001615
{{ preference }}
16011616
</option>
1617+
@endforeach
16021618
</select>
16031619
</div>
16041620
</div>
@@ -1618,6 +1634,7 @@ function updateCharts(): void {
16181634
<option value="{{ preference }}">
16191635
{{ preference }}
16201636
</option>
1637+
@endforeach
16211638
</select>
16221639
</div>
16231640
</div>
@@ -1673,6 +1690,7 @@ function updateCharts(): void {
16731690
</div>
16741691
</div>
16751692
</div>
1693+
@endif
16761694

16771695
<!-- Notification modal -->
16781696
@if(showNotificationModal)
@@ -1717,6 +1735,7 @@ function updateCharts(): void {
17171735
</div>
17181736
</div>
17191737
</div>
1738+
@endif
17201739
</main>
17211740

17221741
<script client>

storage/framework/defaults/views/dashboard/content/authors/index.stx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -821,6 +821,7 @@ const getRoleBadgeClass = (role: string): string => {
821821
<div class="flex absolute inset-0 z-10 items-center justify-center bg-opacity-75 bg-white dark:bg-neutral-700 dark:bg-opacity-75">
822822
<div class="h-8 w-8 border-b-2 border-blue-500 rounded-full animate-spin"></div>
823823
</div>
824+
@endif
824825
<canvas id="chart_1"></canvas>
825826
</div>
826827
</div>
@@ -906,6 +907,7 @@ const getRoleBadgeClass = (role: string): string => {
906907
View Details
907908
</a>
908909
</div>
910+
@endif
909911
</div>
910912
</div>
911913
</div>
@@ -971,6 +973,7 @@ const getRoleBadgeClass = (role: string): string => {
971973
</button>
972974
</div>
973975
</div>
976+
@endif
974977

975978
<div class="flow-root mt-8">
976979
<div class="overflow-x-auto -mx-4 -my-2 sm:-mx-6 lg:-mx-8">
@@ -997,6 +1000,7 @@ const getRoleBadgeClass = (role: string): string => {
9971000
<span class="ml-1">
9981001
{{ sortOrder === 'asc' ? '↑' : '↓' }}
9991002
</span>
1003+
@endif
10001004
</th>
10011005

10021006
<th
@@ -1009,6 +1013,7 @@ const getRoleBadgeClass = (role: string): string => {
10091013
<span class="ml-1">
10101014
{{ sortOrder === 'asc' ? '↑' : '↓' }}
10111015
</span>
1016+
@endif
10121017
</th>
10131018

10141019
<th scope="col" class="px-3 py-3.5 font-semibold text-gray-900 text-left text-sm dark:text-neutral-100">
@@ -1025,6 +1030,7 @@ const getRoleBadgeClass = (role: string): string => {
10251030
<span class="ml-1">
10261031
{{ sortOrder === 'asc' ? '↑' : '↓' }}
10271032
</span>
1033+
@endif
10281034
</th>
10291035

10301036
<th
@@ -1037,6 +1043,7 @@ const getRoleBadgeClass = (role: string): string => {
10371043
<span class="ml-1">
10381044
{{ sortOrder === 'asc' ? '↑' : '↓' }}
10391045
</span>
1046+
@endif
10401047
</th>
10411048

10421049
<th scope="col" class="relative pl-3 pr-4 py-3.5 sm:pr-6">
@@ -1243,6 +1250,7 @@ const getRoleBadgeClass = (role: string): string => {
12431250
</div>
12441251
</div>
12451252
</div>
1253+
@endif
12461254

12471255
<!-- Edit Author Modal -->
12481256
@if(showEditModal)
@@ -1325,6 +1333,7 @@ const getRoleBadgeClass = (role: string): string => {
13251333
/>
13261334
</div>
13271335
</div>
1336+
@endif
13281337
</div>
13291338

13301339
<div class="sm:flex sm:flex-row-reverse px-4 py-3 sm:px-6 bg-gray-50 dark:bg-neutral-800">
@@ -1346,6 +1355,7 @@ const getRoleBadgeClass = (role: string): string => {
13461355
</div>
13471356
</div>
13481357
</div>
1358+
@endif
13491359

13501360
<!-- Delete Confirmation Modal -->
13511361
@if(showDeleteConfirmation)
@@ -1397,6 +1407,7 @@ const getRoleBadgeClass = (role: string): string => {
13971407
</div>
13981408
</div>
13991409
</div>
1410+
@endif
14001411
</div>
14011412

14021413
<style scoped>

storage/framework/defaults/views/dashboard/content/comments/index.stx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -778,6 +778,7 @@ function commentStats() {
778778
</div>
779779
</div>
780780
</div>
781+
@endif
781782

782783
<!-- Comments Table -->
783784
<div class="flow-root mt-6">
@@ -878,6 +879,7 @@ function commentStats() {
878879
<div class="h-5 w-5 i-hugeicons-check"></div>
879880
<span class="sr-only">Approve</span>
880881
</button>
882+
@endif
881883
@if(comment.status !== 'pending')
882884
<button
883885
onclick="updateCommentStatus(comment, 'pending')"
@@ -887,6 +889,7 @@ function commentStats() {
887889
<div class="h-5 w-5 i-hugeicons-clock-01"></div>
888890
<span class="sr-only">Mark as Pending</span>
889891
</button>
892+
@endif
890893
@if(comment.status !== 'spam')
891894
<button
892895
onclick="updateCommentStatus(comment, 'spam')"
@@ -896,6 +899,7 @@ function commentStats() {
896899
<div class="h-5 w-5 i-hugeicons-flag-02"></div>
897900
<span class="sr-only">Mark as Spam</span>
898901
</button>
902+
@endif
899903
<button
900904
onclick="openEditModal(comment)"
901905
class="text-gray-400 dark:text-blue-400 hover:text-blue-900 dark:hover:text-blue-300 duration-150 transition-colors"
@@ -922,6 +926,7 @@ function commentStats() {
922926
No comments found. Try adjusting your search or filters.
923927
</td>
924928
</tr>
929+
@endif
925930
</tbody>
926931
</table>
927932
</div>
@@ -985,6 +990,7 @@ function commentStats() {
985990
</div>
986991
</div>
987992
</div>
993+
@endif
988994
</div>
989995

990996
<!-- Edit Comment Modal -->
@@ -1070,6 +1076,7 @@ function commentStats() {
10701076
</div>
10711077
</div>
10721078
</div>
1079+
@endif
10731080
<div class="sm:grid sm:gap-3 sm:grid-cols-2 sm:grid-flow-row-dense mt-5 sm:mt-6">
10741081
<button
10751082
type="button"
@@ -1091,6 +1098,7 @@ function commentStats() {
10911098
</div>
10921099
</div>
10931100
</div>
1101+
@endif
10941102

10951103
<!-- Delete Confirmation Modal -->
10961104
@if(showDeleteModal)
@@ -1135,6 +1143,7 @@ function commentStats() {
11351143
@endforeach
11361144
</ul>
11371145
</div>
1146+
@endif
11381147
@elseif(commentToDelete)
11391148
<div class="mt-4">
11401149
<p class="font-medium text-gray-700 text-sm dark:text-neutral-300">{{ truncateText(commentToDelete.content, 100) }}</p>
@@ -1163,6 +1172,7 @@ function commentStats() {
11631172
</div>
11641173
</div>
11651174
</div>
1175+
@endif
11661176
</div>
11671177

11681178
<script client>

0 commit comments

Comments
 (0)