Skip to content

Commit

Permalink
feat: switching posts table views column for paywall type as we'll so…
Browse files Browse the repository at this point in the history
…on be removing the views sync from the posts.show handler. will build a more inclusive analytics dash for that soon
  • Loading branch information
tomgobich committed Apr 28, 2024
1 parent 4d5ba46 commit fb35d09
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions resources/views/studio/posts/index.edge
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
{ name: 'Author', field: 'author' },
{ name: 'Status', field: 'status' },
{ name: 'Type', field: 'type' },
{ name: 'Views', field: 'viewCount' },
{ name: 'Paywall Type', field: 'paywallTypeId' },
{ name: 'Publish Date', field: 'publish_at' },
{ name: '', field: '_actions' }
]
Expand Down Expand Up @@ -71,8 +71,16 @@
<div class="text-xs text-gray-800">
{{ scope.row.publishAt.toFormat('fff') }}
</div>
@elseif (scope.column.field === 'viewCount')
<span class="text-sm">{{ scope.row.viewCount.toLocaleString('en-US') }}</span>
@elseif (scope.column.field === 'paywallTypeId')
<span class="text-sm">
@if (scope.row.paywallTypeId === 1)
Not Paywalled
@elseif (scope.row.paywallTypeId === 2)
Delayed Release
@elseif (scope.row.paywallTypeId === 3)
Full Paywall
@endif
</span>
@elseif (scope.column.field === '_actions')
<div class="flex text-sm">
<a href="{{ route('studio.posts.edit', { id: scope.row.id }) }}" class="text-gray-950 hover:text-brand-800 mr-3">
Expand Down

0 comments on commit fb35d09

Please sign in to comment.