Setting a total minimum order amount for each shipping option

hi everyone
need help with a velo code
im trying to setting a total minimum order amount for each shipping option
that diable proceeding to checkout if minimum not met
im using the shipping options in the following way:
city 1 - $10
city 2 - $15
city 3 - $20 and etc…
but i must set a different minimum for each city
i used google’s ai to create a code with no success. had other codes he made me that were workimg greate.
here is the snippet:

import { wixData } from ‘wix-data’;

// Replace ‘shippingOptions’ with the actual name of your shipping options collection
wixData.query(“shippingOptions”)
.find()
.then((results) => {
results.items.forEach((shippingOption) => {
// Set the minimum order amount based on the city name
switch (shippingOption.name) {
case “חולון”:
shippingOption.minimumOrderAmount = 100; // Minimum order amount for Holon
break;
case “בת ים”:
shippingOption.minimumOrderAmount = 150; // Minimum order amount for Bat Yam
break;
case “ראשון לציון”:
shippingOption.minimumOrderAmount = 200; // Minimum order amount for Rishon LeZion
break;
case “באר יעקב”:
shippingOption.minimumOrderAmount = 180; // Minimum order amount for Be’er Yaakov
break;
default:
// Handle unexpected city names
console.warn(“Unexpected city name:”, shippingOption.name);
break;
}

  wixData.updateItem("shippingOptions", shippingOption._id, shippingOption)
    .then(() => {
      console.log("Minimum order amount updated successfully for city:", shippingOption.name);
    })
    .catch((err) => {
      console.error("Error updating minimum order amount for city:", err);
    });
});

})
.catch((err) => {
console.error(“Error fetching shipping options:”, err);
});

please help me with this
thanks