Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

edit view don't open #60

Open
pixsolution opened this issue Aug 11, 2023 · 0 comments
Open

edit view don't open #60

pixsolution opened this issue Aug 11, 2023 · 0 comments

Comments

@pixsolution
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant