 
<?php $__env->startSection('title', 'Tambah Produksi'); ?> 
<?php $__env->startSection('content'); ?>

<div class="container">
    <form method="POST" action="<?php echo e(route('productions.store')); ?>">
        <?php echo csrf_field(); ?>

        <div class="d-flex justify-content-between align-items-start flex-lg-column flex-column">

            <div class="w-100">

                <?php if (isset($component)) { $__componentOriginal262894a2c291df91ae9f7b925bf8a923 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal262894a2c291df91ae9f7b925bf8a923 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.input-text','data' => ['inRowLabel' => 'Tanggal Produksi','name' => 'production_date_display','type' => 'text','required' => true,'placeholder' => 'dd/mm/yyyy','value' => old('production_date_display', date('d/m/Y')),'class' => 'date-display','errorMessage' => $errors->first('production_date')]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('input-text'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['inRowLabel' => 'Tanggal Produksi','name' => 'production_date_display','type' => 'text','required' => true,'placeholder' => 'dd/mm/yyyy','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(old('production_date_display', date('d/m/Y'))),'class' => 'date-display','errorMessage' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($errors->first('production_date'))]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal262894a2c291df91ae9f7b925bf8a923)): ?>
<?php $attributes = $__attributesOriginal262894a2c291df91ae9f7b925bf8a923; ?>
<?php unset($__attributesOriginal262894a2c291df91ae9f7b925bf8a923); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal262894a2c291df91ae9f7b925bf8a923)): ?>
<?php $component = $__componentOriginal262894a2c291df91ae9f7b925bf8a923; ?>
<?php unset($__componentOriginal262894a2c291df91ae9f7b925bf8a923); ?>
<?php endif; ?>

                <input type="hidden"
                    name="production_date"
                    class="date-hidden"
                    value="<?php echo e(old('production_date', date('Y-m-d'))); ?>">

                <?php if (isset($component)) { $__componentOriginal262894a2c291df91ae9f7b925bf8a923 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal262894a2c291df91ae9f7b925bf8a923 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.input-text','data' => ['inRowLabel' => 'Biaya Bahan (Rp)','name' => 'cost_material','required' => true,'placeholder' => 'Masukkan biaya bahan','value' => old('cost_material'),'errorMessage' => $errors->first('cost_material')]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('input-text'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['inRowLabel' => 'Biaya Bahan (Rp)','name' => 'cost_material','required' => true,'placeholder' => 'Masukkan biaya bahan','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(old('cost_material')),'errorMessage' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($errors->first('cost_material'))]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal262894a2c291df91ae9f7b925bf8a923)): ?>
<?php $attributes = $__attributesOriginal262894a2c291df91ae9f7b925bf8a923; ?>
<?php unset($__attributesOriginal262894a2c291df91ae9f7b925bf8a923); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal262894a2c291df91ae9f7b925bf8a923)): ?>
<?php $component = $__componentOriginal262894a2c291df91ae9f7b925bf8a923; ?>
<?php unset($__componentOriginal262894a2c291df91ae9f7b925bf8a923); ?>
<?php endif; ?>

                <?php if (isset($component)) { $__componentOriginal262894a2c291df91ae9f7b925bf8a923 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal262894a2c291df91ae9f7b925bf8a923 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.input-text','data' => ['inRowLabel' => 'Biaya Operasional (Rp)','name' => 'operational_cost','required' => true,'placeholder' => 'Masukkan biaya operasional','value' => old('operational_cost'),'errorMessage' => $errors->first('operational_cost')]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('input-text'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['inRowLabel' => 'Biaya Operasional (Rp)','name' => 'operational_cost','required' => true,'placeholder' => 'Masukkan biaya operasional','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(old('operational_cost')),'errorMessage' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($errors->first('operational_cost'))]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal262894a2c291df91ae9f7b925bf8a923)): ?>
<?php $attributes = $__attributesOriginal262894a2c291df91ae9f7b925bf8a923; ?>
<?php unset($__attributesOriginal262894a2c291df91ae9f7b925bf8a923); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal262894a2c291df91ae9f7b925bf8a923)): ?>
<?php $component = $__componentOriginal262894a2c291df91ae9f7b925bf8a923; ?>
<?php unset($__componentOriginal262894a2c291df91ae9f7b925bf8a923); ?>
<?php endif; ?>

                <?php if (isset($component)) { $__componentOriginal112ecadca39af188988f468fd61b41b6 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal112ecadca39af188988f468fd61b41b6 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.input-text-area','data' => ['inRowLabel' => 'Catatan','name' => 'notes','rows' => '3','placeholder' => 'Masukkan catatan tambahan (opsional)','errorMessage' => $errors->first('notes')]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('input-text-area'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['inRowLabel' => 'Catatan','name' => 'notes','rows' => '3','placeholder' => 'Masukkan catatan tambahan (opsional)','errorMessage' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($errors->first('notes'))]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal112ecadca39af188988f468fd61b41b6)): ?>
<?php $attributes = $__attributesOriginal112ecadca39af188988f468fd61b41b6; ?>
<?php unset($__attributesOriginal112ecadca39af188988f468fd61b41b6); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal112ecadca39af188988f468fd61b41b6)): ?>
<?php $component = $__componentOriginal112ecadca39af188988f468fd61b41b6; ?>
<?php unset($__componentOriginal112ecadca39af188988f468fd61b41b6); ?>
<?php endif; ?>

                <h5 class="mt-4">Jumlah Produksi per Produk</h5>
                <p class="text-muted">Isi 0 jika tidak diproduksi</p>

                <div class="table-responsive">
                    <table class="table table-bordered">
                        <thead>
                            <tr>
                                <th>Produk</th>
                                <th>Jumlah Produksi</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>
                                    <td><?php echo e($product->name); ?></td>
                                    <td>
                                        <input type="number" 
                                               name="products[<?php echo e($loop->index); ?>][quantity]" 
                                               min="0" 
                                               class="form-control"
                                               value="<?php echo e(old('products.' . $loop->index . '.quantity', 0)); ?>">
                                        <input type="hidden" name="products[<?php echo e($loop->index); ?>][product_id]" value="<?php echo e($product->id); ?>">
                                    </td>
                                </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </tbody>
                    </table>
                </div>

                <div class="d-flex justify-content-between pe-2 mt-4">
                    <?php if (isset($component)) { $__componentOriginalb04da7a8feb93a7268b6e0eef6b32739 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalb04da7a8feb93a7268b6e0eef6b32739 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.gold-button','data' => ['type' => 'button','onclick' => 'window.location.href=\''.e(route('productions.index')).'\'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('gold-button'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['type' => 'button','onclick' => 'window.location.href=\''.e(route('productions.index')).'\'']); ?>
                        <i class="bi bi-arrow-left"></i> Kembali
                     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalb04da7a8feb93a7268b6e0eef6b32739)): ?>
<?php $attributes = $__attributesOriginalb04da7a8feb93a7268b6e0eef6b32739; ?>
<?php unset($__attributesOriginalb04da7a8feb93a7268b6e0eef6b32739); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalb04da7a8feb93a7268b6e0eef6b32739)): ?>
<?php $component = $__componentOriginalb04da7a8feb93a7268b6e0eef6b32739; ?>
<?php unset($__componentOriginalb04da7a8feb93a7268b6e0eef6b32739); ?>
<?php endif; ?>

                    <?php if (isset($component)) { $__componentOriginald0f1fd2689e4bb7060122a5b91fe8561 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginald0f1fd2689e4bb7060122a5b91fe8561 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.button','data' => ['type' => 'submit']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('button'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['type' => 'submit']); ?>
                        Simpan Produksi
                     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginald0f1fd2689e4bb7060122a5b91fe8561)): ?>
<?php $attributes = $__attributesOriginald0f1fd2689e4bb7060122a5b91fe8561; ?>
<?php unset($__attributesOriginald0f1fd2689e4bb7060122a5b91fe8561); ?>
<?php endif; ?>
<?php if (isset($__componentOriginald0f1fd2689e4bb7060122a5b91fe8561)): ?>
<?php $component = $__componentOriginald0f1fd2689e4bb7060122a5b91fe8561; ?>
<?php unset($__componentOriginald0f1fd2689e4bb7060122a5b91fe8561); ?>
<?php endif; ?>
                </div>

            </div>

        </div>
    </form>
</div>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('layout.main', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\PAW\PiaZhang\resources\views/productions/create.blade.php ENDPATH**/ ?>