vista tabla tarifas y promo dependiendo de cual este abierta
This commit is contained in:
@@ -45,8 +45,13 @@ class ShowTarifas extends Component
|
||||
public function render()
|
||||
{
|
||||
$this->planes = Tarifas::where('servicio_id', $this->servicio_id)->where('rol_id', Auth::user()->rol->id)->where('estado', 'activo')->get();
|
||||
// $this->tarifas = Tarifas::where('servicio_id', $this->servicio_id)->where('rol_id', Auth::user()->rol->id)->where('estado', 'activo')->get();
|
||||
// $this->tarifas = TarifaPromo::where('promocion_id', $this->promocion_id)->where('rol_id', Auth::user()->rol->id)->where('visible', 'activo')->get();
|
||||
|
||||
if ($this->modTarifas) {
|
||||
$this->tarifas = Tarifas::where('servicio_id', $this->servicio_id)->where('rol_id', $this->rol_id)->where('estado', 'activo')->get();
|
||||
}
|
||||
if ($this->modTarifasPromo) {
|
||||
$this->tarifas = TarifaPromo::where('promocion_id', $this->promocion_id)->where('rol_id', $this->rol_id)->where('visible', 'activo')->get();
|
||||
}
|
||||
$this->promociones = TarifaPromo::where('promocion_id', $this->promocion_id)->where('rol_id', Auth::user()->rol->id)->where('visible', 'activo')->get();
|
||||
|
||||
return view('livewire.show-tarifas', [
|
||||
|
||||
Reference in New Issue
Block a user