Approval queue conflict — Tasks block
Freetasks-approval-queue-conflict · for app, workflows pages
Approval queue conflict
Two versions of the same item side by side, to keep one, the other or both
Documentation
Installation
One command copies the block into your project with the shadcn CLI (the registry is set once: Installation).
pnpm dlx shadcn-vue@latest add @trame/tasks-approval-queue-conflictUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import TasksApprovalQueueConflict from '@/components/trame/blocks/tasks/tasks-approval-queue-conflict.vue'
const props = {
title: "To approve",
items: [
{
id: 1,
kind: "Goodwill credit",
summary: "15% credit on booking no. 10482, Desert Road trip",
params: [
{
label: "Amount",
value: "$184.00"
},
{
label: "Customer",
value: "Ruth Adeyemi"
}
],
requester: "Helen",
at: "2 h ago",
expires: "expires in 12 h",
local: {
modified: "yesterday, 5:40 p.m.",
size: "$184.00",
by: "Helen",
note: "No credit"
},
remote: {
modified: "today, 8:05 a.m.",
size: "$156.40",
by: "Samir",
note: "15% credit applied"
},
reason: "Goodwill credit requested after a delayed transfer.",
evidence: "The airport transfer arrived three hours late on day one."
},
{
id: 2,
kind: "Deletion",
summary: "Delete 340 traveler profiles with no trip in 3 years",
params: [
{
label: "List",
value: "Trip alerts"
}
],
requester: "Samir",
at: "5 h ago",
expires: "expires in 2 days",
reason: "Check the retention rules before deleting.",
evidence: "The selection covers travelers with no booking and no active trip alert."
}
],
approve: "approve",
decline: "decline",
both: "keep-both",
options: {
footnote: "A request that expires is declined automatically. Nothing changes until you decide."
}
}
</script>
<template>
<TasksApprovalQueueConflict v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe queue’s heading ("To approve") |
| count | number | Datahow many requests wait in all, when the items are only a few of them |
| items* | Item[] | Datathe pending requests, oldest first |
| approve | string | Actionapproves a request (conflict: keeps the incoming version) |
| decline | string | Actiondeclines a request (conflict: keeps the local version) |
| both | string | Actionconflict: keeps both versions |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Item items[] · 11 props
| Prop | Type | Description |
|---|---|---|
| id* | string | number | the item’s id |
| kind* | string | Wordswhat kind of request it is ("Discount", "Deletion") |
| summary* | string | Wordswhat is asked, in one line, exactly as the request states it |
| params | Param[] | the request’s details, each a label and a value |
| requester* | string | Wordswho asked |
| at* | string | Wordswhen, as written ("2 h ago") |
| expires | string | Wordsthe deadline as the host states it ("expires in 12 h"): never computed by the block |
| evidence | string | Wordsthe host’s supporting content or reported passage |
| reason | string | Wordsthe host’s reason for review |
| local | Local | conflict: the version here |
| remote | Remote | conflict: the incoming version |
Param items[].params[] · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat the value is about |
| value* | string | Wordsthe value, as the merchant states it |
Local items[].local · 4 props
| Prop | Type | Description |
|---|---|---|
| modified* | string | Wordswhen this version was last changed, as written |
| size | string | Wordsits size or its weight, as written |
| by | string | Wordswho changed it |
| note | string | Wordswhat differs, one line |
Remote items[].remote · 4 props
| Prop | Type | Description |
|---|---|---|
| modified* | string | Wordswhen this version was last changed, as written |
| size | string | Wordsits size or its weight, as written |
| by | string | Wordswho changed it |
| note | string | Wordswhat differs, one line |
Options options · 3 props
| Prop | Type | Description |
|---|---|---|
| footnote | string | Wordsa line stating what expiry or a decision does, as configured |
| empty | string | Wordswhat an empty queue says |
| mood | 'inverse' | 'brand' | 'warm' | 'tint' | string | a band of the page that redefines the theme surfaces inside it |
What it asks your app for
The block never knows your app: it asks it, through one context provided once, where its links lead, what its actions do, how a price reads and which words to say (The host context).
| Member | What it is for |
|---|---|
| href | the address an action leads to, or null to hide what leads there |
| act | runs a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error } |
| can | whether the page has this action |
| cartCount | the cart badge’s number |
| cartDrawer | whether your app has a cart drawer |
| cartOpen | whether the cart drawer is open |
| label | your word for an interface key, or undefined to keep the block’s own |
The words it says itself, in English and French; label(key) replaces any of them:
| Key | English | French |
|---|---|---|
| newsletter.already | You are already subscribed. | Vous êtes déjà inscrit. |
| newsletter.done | Done: you are subscribed. | C’est noté : vous êtes inscrit. |
| newsletter.invalid | Check the email address. | Vérifiez l’adresse e-mail. |
| newsletter.tooMany | Too many attempts, try again in a moment. | Trop de tentatives, réessayez dans un moment. |
Features
- Every word in the server HTML
- Same markup in Vue and React
- Theme tokens only: every theme, light and dark
- Shows what you give it, invents nothing
- No motion; still under reduced motion
- Real buttons and links, a visible focus
- Asks your app through actions:
approve,decline,both - Reads
approvalsfrom your app
A tasks section, for app, workflows pages; it uses @lucide/vue, @vueuse/core, class-variance-authority, clsx, reka-ui, tailwind-merge.
Built with
The components this block is made of; each one installs on its own too.
More tasks blocks
- Task list by person: A lead checking what each person has on their plate: one card per assignee with their counts and tasks, the unassigned ones last.
- Task list focus: Today and overdue tasks beside a quieter upcoming agenda, using only the host’s deadline classifications.
- Task list grouped: A checklist grouped by work status for completing the team’s own tasks without moving cards.
- Task list table: A comparable task register with owner, deadline and priority for the team’s own records.
- Ticket queue table detail: A ticket register above the open case for reviewing the merchant’s own support queue without losing the order context.