ソースを参照

feat: add no-option template to DefaultSelect components in various dialogs

alvesantos 2 週間 前
コミット
e3bad1fd49

+ 9 - 1
src/components/financial/AddTreasuryLaunchDialog.vue

@@ -45,7 +45,15 @@
               :loading="loadingPlanAccounts"
               :options="planAccountOptions"
               @filter="filterPlanAccounts"
-            />
+            >
+              <template #no-option>
+                <q-item>
+                  <q-item-section class="text-grey">
+                    {{ $t("http.errors.no_records_found") }}
+                  </q-item-section>
+                </q-item>
+              </template>
+            </DefaultSelect>
 
             <DefaultCurrencyInput
               v-model="form.amount"

+ 9 - 1
src/components/selects/UserTypeSelect.vue

@@ -11,7 +11,15 @@
     :placeholder
     :label
     @filter="filterFn"
-  />
+  >
+    <template #no-option>
+      <q-item>
+        <q-item-section class="text-grey">
+          {{ $t("http.errors.no_records_found") }}
+        </q-item-section>
+      </q-item>
+    </template>
+  </DefaultSelect>
 </template>
 
 <script setup>

+ 9 - 1
src/pages/unit/components/CreateContractDialog.vue

@@ -137,7 +137,15 @@
               use-input
               :error-message="validationErrors.municipality_size_id"
               :options="municipalitySizeOptions"
-            />
+            >
+              <template #no-option>
+                <q-item>
+                  <q-item-section class="text-grey">
+                    {{ $t("http.errors.no_records_found") }}
+                  </q-item-section>
+                </q-item>
+              </template>
+            </DefaultSelect>
 
             <DefaultInput
               v-model="form.tax_base_royalts"

+ 9 - 1
src/pages/unit/components/EditContractTaxesDialog.vue

@@ -23,7 +23,15 @@
             hide-selected
             input-debounce="0"
             class="col-md-4 col-12"
-          />
+          >
+            <template #no-option>
+              <q-item>
+                <q-item-section class="text-grey">
+                  {{ $t("http.errors.no_records_found") }}
+                </q-item-section>
+              </q-item>
+            </template>
+          </DefaultSelect>
 
           <DefaultCurrencyInput
             v-model="form.tbr_fixed_value"