WIP: Implement Admin CRUD

This commit is contained in:
Björn Fromme
2023-09-21 17:51:16 +02:00
parent 2dd8a6de19
commit c3c2e1ae2d
26 changed files with 568 additions and 20 deletions
@@ -3,8 +3,8 @@ import { Controller } from '@hotwired/stimulus'
export default class extends Controller {
static targets = [ 'form', 'title', 'content' ]
show({ action, title, content }) {
this.formTarget.action = action
show({ targetUrl, title, content }) {
this.formTarget.action = targetUrl
this.titleTarget.innerText = title
this.contentTarget.innerHTML = content
this.element.classList.remove('hidden')
+3 -10
View File
@@ -3,18 +3,11 @@ import { Controller } from '@hotwired/stimulus'
export default class extends Controller {
static outlets = [ 'confirmation-modal', 'ajax-modal' ]
confirmation({ params: { title, action, content } }) {
this.confirmationModalOutlet.show({
title: title,
action: action,
content: content,
})
confirmation({ params: { title, targetUrl, content } }) {
this.confirmationModalOutlet.show({ title, targetUrl, content })
}
ajax({ params: { title, url } }) {
this.ajaxModalOutlet.show({
title: title,
url: url,
})
this.ajaxModalOutlet.show({ title, url })
}
}
View File
+1 -2
View File
@@ -4,5 +4,4 @@
@import "tailwindcss/components";
@import "_components.css";
@import "tailwindcss/utilities";
@import "_utilities.css";
@import "tailwindcss/utilities";