feat: required envs
This commit is contained in:
@@ -37,7 +37,14 @@
|
||||
<h3>Production Environment Variables</h3>
|
||||
<div>Environment (secrets) variables for Production.</div>
|
||||
</div>
|
||||
@forelse ($resource->environment_variables as $env)
|
||||
@php
|
||||
$requiredEmptyVars = $resource->environment_variables->filter(function($env) {
|
||||
return $env->is_required && empty($env->value);
|
||||
});
|
||||
$otherVars = $resource->environment_variables->diff($requiredEmptyVars);
|
||||
@endphp
|
||||
|
||||
@forelse ($requiredEmptyVars->merge($otherVars) as $env)
|
||||
<livewire:project.shared.environment-variable.show wire:key="environment-{{ $env->id }}"
|
||||
:env="$env" :type="$resource->type()" />
|
||||
@empty
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
<div>
|
||||
<form wire:submit='submit'
|
||||
class="flex flex-col items-center gap-4 p-4 bg-white border lg:items-start dark:bg-base dark:border-coolgray-300">
|
||||
@class([
|
||||
'flex flex-col items-center gap-4 p-4 bg-white border lg:items-start dark:bg-base',
|
||||
'border-error' => $env->is_really_required,
|
||||
'dark:border-coolgray-300' => !$env->is_really_required,
|
||||
])
|
||||
>
|
||||
@if ($isLocked)
|
||||
<div class="flex flex-1 w-full gap-2">
|
||||
<x-forms.input disabled id="env.key" />
|
||||
|
||||
Reference in New Issue
Block a user