diff --git a/.DS_Store b/.DS_Store
index 5b2df12..8442f15 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/admin/assets/css/admin-global.css b/admin/assets/css/admin-global.css
index 1f0b207..01ae60b 100644
--- a/admin/assets/css/admin-global.css
+++ b/admin/assets/css/admin-global.css
@@ -47,6 +47,7 @@ li#toplevel_page_formipay a[href^="admin.php?page=formipay-settings"]:before{
}
.wp-submenu-wrap li:has(a[href="admin.php?page=formipay-products"]).current ~ li:has(a[href="edit-tags.php?taxonomy=formipay-product-category&post_type=formipay-product"]),
.wp-submenu-wrap li:has(a[href="admin.php?page=formipay-products"]):hover ~ li:has(a[href="edit-tags.php?taxonomy=formipay-product-category&post_type=formipay-product"]),
+li:has(a[href="edit-tags.php?taxonomy=formipay-product-category&post_type=formipay-product"]):hover,
.wp-submenu-wrap li:has(a[href="edit-tags.php?taxonomy=formipay-product-category&post_type=formipay-product"]).current {
display: block;
}
\ No newline at end of file
diff --git a/admin/assets/css/admin-product-editor.css b/admin/assets/css/admin-product-editor.css
index 91e0982..a09e430 100644
--- a/admin/assets/css/admin-product-editor.css
+++ b/admin/assets/css/admin-product-editor.css
@@ -137,4 +137,12 @@ table.wpcfto-table.inner-table tbody tr:hover td {
table.wpcfto-table.inner-table tr > *:is(th, td):first-child {
width: 50%;
text-align: left;
+}
+
+.variation-details-content tbody tr:first-child td:nth-child(2) .price-input-wrapper .price-currency {
+ background-color: #AA1C1C;
+ color: white;
+}
+.variation-details-content tbody .price-input-wrapper .price-currency {
+ min-width: 60px;
}
\ No newline at end of file
diff --git a/admin/assets/js/admin-product-editor.js b/admin/assets/js/admin-product-editor.js
index a78ef51..2c20dfe 100644
--- a/admin/assets/js/admin-product-editor.js
+++ b/admin/assets/js/admin-product-editor.js
@@ -1,5 +1,7 @@
jQuery(function ($) {
+ console.log(product_details)
+
$('a[href="admin.php?page=formipay-products"]').addClass('current').closest('li').addClass('current');
function autoset_variation_name() {
@@ -47,16 +49,12 @@ jQuery(function ($) {
Vue.component('price-input', {
// Gunakan 'value' sebagai prop, sesuai konvensi v-model Vue 2
props: {
- value: [Number, String], // Diubah dari modelValue
+ value: [Number, String],
currencySymbol: String,
- currencyDecimalDigits: {
- type: Number,
- default: 2
- },
- disabled: {
- type: Boolean,
- default: false
- }
+ currencyDecimalDigits: { type: Number, default: 2 },
+ disabled: { type: Boolean, default: false },
+ required: { type: Boolean, default: false },
+ placeholder: { type: String, default: 'Auto' }
},
data() {
return {
@@ -79,13 +77,26 @@ jQuery(function ($) {
},
computed: {
stepValue() {
- return Math.pow(10, -this.currencyDecimalDigits);
+ const digits = this.currencyDecimalDigits || 0;
+ if (!digits || digits === 0) return 1;
+ return 1 / Math.pow(10, digits);
}
},
template: `
@@ -44,23 +38,30 @@
-
-
-
- |
-
-
- |
-
+
+
+ |
+
+
+ |
-
-
- {{ product_details.variation_table.manual_price_hint }}
- |
-
-
-
- |