Skip to content

Commit

Permalink
Add search columns
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette committed Oct 13, 2024
1 parent c59e10f commit 0293e8b
Show file tree
Hide file tree
Showing 25 changed files with 90 additions and 72 deletions.
5 changes: 4 additions & 1 deletion app/assets/views/ActivitiesView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import moment from 'moment'
<UFHeaderPage title="Activities" caption="A listing of user activities." />

<UFCardBox>
<UFSprunjeTable dataUrl="/api/activities" :defaultSorts="{ occurred_at: 'desc' }">
<UFSprunjeTable
dataUrl="/api/activities"
searchColumn="user"
:defaultSorts="{ occurred_at: 'desc' }">
<template #header>
<UFSprunjeHeader sort="occurred_at">Activity Time</UFSprunjeHeader>
<UFSprunjeHeader sort="user">User</UFSprunjeHeader>
Expand Down
3 changes: 2 additions & 1 deletion app/assets/views/Dashboard/DashboardActivities.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import moment from 'moment'
<UFSprunjeTable
dataUrl="/api/activities"
:defaultSorts="{ occurred_at: 'desc' }"
hidePagination>
hidePagination
hideFilters>
<template #header>
<UFSprunjeHeader>Activity Time</UFSprunjeHeader>
<UFSprunjeHeader>User</UFSprunjeHeader>
Expand Down
2 changes: 1 addition & 1 deletion app/assets/views/GroupsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
caption="A listing of the groups for your site. Provides management tools for editing and deleting groups." />

<UFCardBox>
<UFSprunjeTable dataUrl="/api/groups">
<UFSprunjeTable dataUrl="/api/groups" searchColumn="name">
<template #header>
<UFSprunjeHeader sort="name">Groups</UFSprunjeHeader>
<UFSprunjeHeader sort="description">Description</UFSprunjeHeader>
Expand Down
2 changes: 1 addition & 1 deletion app/assets/views/PermissionsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
caption="A listing of the permissions for your site. Provides management tools for editing and deleting permissions." />

<UFCardBox>
<UFSprunjeTable dataUrl="/api/permissions">
<UFSprunjeTable dataUrl="/api/permissions" searchColumn="name">
<template #header>
<UFSprunjeHeader sort="name">Permission</UFSprunjeHeader>
<UFSprunjeHeader sort="properties">Slug/Condition</UFSprunjeHeader>
Expand Down
2 changes: 1 addition & 1 deletion app/assets/views/RolesView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
caption="A listing of the roles for your site. Provides management tools for editing and deleting roles." />

<UFCardBox>
<UFSprunjeTable dataUrl="/api/roles">
<UFSprunjeTable dataUrl="/api/roles" searchColumn="name">
<template #header>
<UFSprunjeHeader sort="name">Role</UFSprunjeHeader>
<UFSprunjeHeader sort="description">Description</UFSprunjeHeader>
Expand Down
2 changes: 1 addition & 1 deletion app/assets/views/UsersView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import moment from 'moment'
edit user details, manually activate users, enable/disable users, and more." />

<UFCardBox>
<UFSprunjeTable dataUrl="/api/users">
<UFSprunjeTable dataUrl="/api/users" searchColumn="name">
<template #header>
<UFSprunjeHeader sort="name">User</UFSprunjeHeader>
<UFSprunjeHeader sort="last_activity">Last Activity</UFSprunjeHeader>
Expand Down
1 change: 1 addition & 0 deletions dist/ActivitiesView-BAJE5Nou.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./moment-Bp7fbP4q.cjs"),u={class:"uk-text-meta"},c={__name:"ActivitiesView",setup(p){return(m,o)=>{const l=e.resolveComponent("UFHeaderPage"),r=e.resolveComponent("UFSprunjeHeader"),n=e.resolveComponent("UFSprunjeColumn"),s=e.resolveComponent("RouterLink"),d=e.resolveComponent("UFSprunjeTable"),i=e.resolveComponent("UFCardBox");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(l,{title:"Activities",caption:"A listing of user activities."}),e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(d,{dataUrl:"/api/activities",searchColumn:"user",defaultSorts:{occurred_at:"desc"}},{header:e.withCtx(()=>[e.createVNode(r,{sort:"occurred_at"},{default:e.withCtx(()=>o[0]||(o[0]=[e.createTextVNode("Activity Time")])),_:1}),e.createVNode(r,{sort:"user"},{default:e.withCtx(()=>o[1]||(o[1]=[e.createTextVNode("User")])),_:1}),e.createVNode(r,{sort:"description"},{default:e.withCtx(()=>o[2]||(o[2]=[e.createTextVNode("Description")])),_:1})]),body:e.withCtx(({item:t})=>[e.createVNode(n,null,{default:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(e.unref(a.hooks)(t.occurred_at).format("dddd")),1),e.createElementVNode("div",null,e.toDisplayString(e.unref(a.hooks)(t.occurred_at).format("MMM Do, YYYY h:mm a")),1)]),_:2},1024),e.createVNode(n,null,{default:e.withCtx(()=>[e.createElementVNode("strong",null,[e.createVNode(s,{to:{name:"admin.user",params:{user_name:t.user.user_name}}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.user.full_name)+" ("+e.toDisplayString(t.user.user_name)+") ",1)]),_:2},1032,["to"])]),e.createElementVNode("div",u,e.toDisplayString(t.user.email),1)]),_:2},1024),e.createVNode(n,null,{default:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(t.ip_address),1),e.createElementVNode("div",null,[e.createElementVNode("i",null,e.toDisplayString(t.description),1)])]),_:2},1024)]),_:1})]),_:1})],64)}}};exports.default=c;
37 changes: 19 additions & 18 deletions dist/ActivitiesView-BPs4raaf.js → dist/ActivitiesView-BJRJlLSZ.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { resolveComponent as u, openBlock as U, createElementBlock as v, Fragment as F, createVNode as e, withCtx as t, createTextVNode as l, createElementVNode as o, toDisplayString as r, unref as i } from "vue";
import { resolveComponent as a, openBlock as U, createElementBlock as v, Fragment as F, createVNode as e, withCtx as t, createTextVNode as l, createElementVNode as n, toDisplayString as o, unref as i } from "vue";
import { h as _ } from "./moment-h96o7c8I.js";
const S = { class: "uk-text-meta" }, C = {
const S = { class: "uk-text-meta" }, k = {
__name: "ActivitiesView",
setup(x) {
return (g, a) => {
const c = u("UFHeaderPage"), s = u("UFSprunjeHeader"), d = u("UFSprunjeColumn"), p = u("RouterLink"), m = u("UFSprunjeTable"), f = u("UFCardBox");
return (C, u) => {
const c = a("UFHeaderPage"), s = a("UFSprunjeHeader"), d = a("UFSprunjeColumn"), p = a("RouterLink"), m = a("UFSprunjeTable"), f = a("UFCardBox");
return U(), v(F, null, [
e(c, {
title: "Activities",
Expand All @@ -14,60 +14,61 @@ const S = { class: "uk-text-meta" }, C = {
default: t(() => [
e(m, {
dataUrl: "/api/activities",
searchColumn: "user",
defaultSorts: { occurred_at: "desc" }
}, {
header: t(() => [
e(s, { sort: "occurred_at" }, {
default: t(() => a[0] || (a[0] = [
default: t(() => u[0] || (u[0] = [
l("Activity Time")
])),
_: 1
}),
e(s, { sort: "user" }, {
default: t(() => a[1] || (a[1] = [
default: t(() => u[1] || (u[1] = [
l("User")
])),
_: 1
}),
e(s, { sort: "description" }, {
default: t(() => a[2] || (a[2] = [
default: t(() => u[2] || (u[2] = [
l("Description")
])),
_: 1
})
]),
body: t(({ item: n }) => [
body: t(({ item: r }) => [
e(d, null, {
default: t(() => [
o("div", null, r(i(_)(n.occurred_at).format("dddd")), 1),
o("div", null, r(i(_)(n.occurred_at).format("MMM Do, YYYY h:mm a")), 1)
n("div", null, o(i(_)(r.occurred_at).format("dddd")), 1),
n("div", null, o(i(_)(r.occurred_at).format("MMM Do, YYYY h:mm a")), 1)
]),
_: 2
}, 1024),
e(d, null, {
default: t(() => [
o("strong", null, [
n("strong", null, [
e(p, {
to: {
name: "admin.user",
params: { user_name: n.user.user_name }
params: { user_name: r.user.user_name }
}
}, {
default: t(() => [
l(r(n.user.full_name) + " (" + r(n.user.user_name) + ") ", 1)
l(o(r.user.full_name) + " (" + o(r.user.user_name) + ") ", 1)
]),
_: 2
}, 1032, ["to"])
]),
o("div", S, r(n.user.email), 1)
n("div", S, o(r.user.email), 1)
]),
_: 2
}, 1024),
e(d, null, {
default: t(() => [
o("div", null, r(n.ip_address), 1),
o("div", null, [
o("i", null, r(n.description), 1)
n("div", null, o(r.ip_address), 1),
n("div", null, [
n("i", null, o(r.description), 1)
])
]),
_: 2
Expand All @@ -83,5 +84,5 @@ const S = { class: "uk-text-meta" }, C = {
}
};
export {
C as default
k as default
};
1 change: 0 additions & 1 deletion dist/ActivitiesView-DiFutZNz.cjs

This file was deleted.

Loading

0 comments on commit 0293e8b

Please sign in to comment.