Skip to content

edit view don't open  #60

@pixsolution

Description

@pixsolution

Hello
I have followed your guide and this tutorial https://42coders.com/how-to-create-invoices-easily-with-document-templates-package and everything is working fine for me, index open well, but when I open the edit view /document-templates/2/edit it stays blank, the form is not loading, I suppose it must be something from ckeditor or vue...I dont know is because the whole app is being only with TALL stack, I have not used vue I'm using laravel 9

this is my app.js

import './bootstrap';
import './mixpanel';

import Alpine from 'alpinejs';
import focus from '@alpinejs/focus';

require('./vendor/document-templates/js/document-templates');

window.Alpine = Alpine;

Alpine.plugin(focus);

Alpine.start();


init();

this is my layouts/app.blade.php

<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    {!! seo_helper()->render() !!}

    <!-- Fonts -->
    <link rel="stylesheet" href="https://fonts.bunny.net/css2?family=Nunito:wght@400;600;700&display=swap">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.4/moment.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script>
    <!-- Scripts -->
    @vite(['resources/css/app.css', 'resources/js/app.js'])

    <!-- Styles -->
    @livewireStyles

</head>

<body class="font-sans antialiased">
    <x-jet-banner />

    <div class="min-h-screen bg-gray-100">
        @livewire('menu')

        <!-- Page Heading -->
        @if (isset($header))
            <header class="bg-white shadow">
                <div class="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8">
                    {{ $header }}
                </div>
            </header>
        @endif

        <!-- Page Content -->
        <div id="app">
            <main>
                {{ $slot }}
            </main>
        </div>

        {{-- <div id="app">
            <main class="py-4">
                @yield('content')
            </main>
        </div> --}}

    </div>

    @stack('modals')

    @livewireScripts

    <script>
        function dropdown() {
            return {
                open: false,
                show() {
                    if (this.open) {
                        //Se cierra el menu
                        this.open = false;
                        document.getElementsByTagName('html')[0].style.overflow = 'auto'
                    } else {
                        //Esta abriendo el menu
                        this.open = true;
                        document.getElementsByTagName('html')[0].style.overflow = 'hidden'
                    }
                },
                close() {
                    this.open = false;
                    document.getElementsByTagName('html')[0].style.overflow = 'auto'
                }
            }
        }
    </script>

    @stack('script')
</body>
</html>

edit file

<x-app-layout>
    <document-template-form :initial-data="{{ collect($data) }}"
        :base-url="'{{ route(config('document_templates.base_url') . '.index') }}'"></document-template-form>
</x-app-layout>

what can be?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions