Changeset 3445113
- Timestamp:
- 01/22/2026 07:08:55 PM (2 months ago)
- Location:
- steadfast-api
- Files:
-
- 25 added
- 6 edited
-
tags/1.0.4 (added)
-
tags/1.0.4/assets (added)
-
tags/1.0.4/assets/admin (added)
-
tags/1.0.4/assets/admin/css (added)
-
tags/1.0.4/assets/admin/css/dashboard.css (added)
-
tags/1.0.4/assets/admin/css/style.css (added)
-
tags/1.0.4/assets/admin/img (added)
-
tags/1.0.4/assets/admin/img/logo.png (added)
-
tags/1.0.4/assets/admin/img/steadfast-bg.png (added)
-
tags/1.0.4/assets/admin/js (added)
-
tags/1.0.4/assets/admin/js/dashboard.js (added)
-
tags/1.0.4/assets/admin/js/scripts.js (added)
-
tags/1.0.4/assets/invoice (added)
-
tags/1.0.4/assets/invoice/css (added)
-
tags/1.0.4/assets/invoice/css/style.css (added)
-
tags/1.0.4/includes (added)
-
tags/1.0.4/includes/ajax.php (added)
-
tags/1.0.4/includes/class-admin-menu.php (added)
-
tags/1.0.4/includes/class-hooks.php (added)
-
tags/1.0.4/includes/functions.php (added)
-
tags/1.0.4/readme.txt (added)
-
tags/1.0.4/steadfast-api.php (added)
-
tags/1.0.4/templates (added)
-
tags/1.0.4/templates/invoice.php (added)
-
trunk/assets/admin/css/dashboard.css (modified) (2 diffs)
-
trunk/assets/admin/js/dashboard.js (added)
-
trunk/assets/admin/js/scripts.js (modified) (8 diffs)
-
trunk/includes/class-admin-menu.php (modified) (4 diffs)
-
trunk/includes/class-hooks.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/steadfast-api.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
steadfast-api/trunk/assets/admin/css/dashboard.css
r3407125 r3445113 11 11 padding: 25px 30px; 12 12 border-radius: 12px; 13 box-shadow: 0 2px 4px rgb( 16 168 16 / 44%), 0 4px 8px rgb(42 136 42 / 12%);13 box-shadow: 0 2px 4px rgb(255, 255, 255), 0 4px 8px rgb(255, 255, 255); 14 14 max-width: 550px; 15 15 margin: 20px auto; … … 115 115 116 116 .tab-content.std-admin-menu { 117 background: # f4f4f4;118 padding: 2px;117 background: #cfffda; 118 padding: 10px; 119 119 } 120 120 121 122 .tab-content.std-admin-menu .submit .button-primary{ 123 background: #006400 !important; 124 border-radius: 4px !important; 125 } 121 126 122 127 a.nav-tab.nav-tab-active { -
steadfast-api/trunk/assets/admin/js/scripts.js
r3407125 r3445113 6 6 7 7 var check = jQuery("#stdf_settings_tab_checkbox").is(':checked'), 8 disableFieldCss = { 'pointer-events': 'none', 'border': '1px solid lightcyan', 'color': 'lightgray'};8 disableFieldCss = { 'pointer-events': 'none', 'border': '1px solid lightcyan', 'color': 'lightgray' }; 9 9 10 10 if (check === true) { … … 97 97 success: function (response) { 98 98 if (response.data.message === 'success') { 99 thisField.css({ 'border': '1px solid #5b841b'});99 thisField.css({ 'border': '1px solid #5b841b' }); 100 100 } 101 101 } … … 124 124 var data = response.data; 125 125 if ('failed' === data) { 126 thisButton.html('Failed!').css({ 'width': '80px', 'background': '#ff3737', 'border': 'none', 'font-weight': '400', 'pointer-events': 'none'});126 thisButton.html('Failed!').css({ 'width': '80px', 'background': '#ff3737', 'border': 'none', 'font-weight': '400', 'pointer-events': 'none' }); 127 127 } else if ('unauthorized' === data) { 128 thisButton.html('Unauthorized').css({ 'width': '99px', 'border': 'none', 'background': '#fb3c3ca8', 'font-weight': '400', 'pointer-events': 'none'});128 thisButton.html('Unauthorized').css({ 'width': '99px', 'border': 'none', 'background': '#fb3c3ca8', 'font-weight': '400', 'pointer-events': 'none' }); 129 129 } else { 130 130 showBalance.find(".balance").html(data + " TK"); 131 131 showBalance.removeClass("hidden"); 132 thisButton.html('Balance').css({ 'background': '#3f9668', 'border': 'none', 'color': 'white', 'pointer-events': 'none'});132 thisButton.html('Balance').css({ 'background': '#3f9668', 'border': 'none', 'color': 'white', 'pointer-events': 'none' }); 133 133 } 134 134 } … … 140 140 jQuery(document).on('click', "#std-delivery-status", function (e) { 141 141 e.preventDefault(); 142 142 143 143 var thisButton = jQuery(this), 144 144 consignmentID = thisButton.data("consignment-id"), … … 212 212 213 213 var statusButton = thisButton.siblings('span'); 214 statusButton.html('Checking..').css({ 'line-height': 'inherit'});214 statusButton.html('Checking..').css({ 'line-height': 'inherit' }); 215 215 216 216 jQuery.ajax({ … … 258 258 }); 259 259 }); 260 261 260 261 262 262 jQuery('.amount-disable').attr('disabled', 'disabled'); 263 263 jQuery('.steadfast-send-success').html('Success').attr('disabled', 'disabled').addClass('tooltip'); … … 266 266 267 267 268 // Check Courier Score268 // Check Courier Score 269 269 jQuery(document).ready(function ($) { 270 270 var $modal = $('#stdf-customer-info-modal'); … … 290 290 291 291 success: function (response) { 292 console.log(response) 292 293 if (response.success) { 293 294 let success_ratio = response.data.success_ratio; 294 var content = ` 295 let errorMessage = response.data.error; 296 let current = response.data.current; 297 let limit = response.data.limit; 298 299 if (errorMessage) { 300 content = ` 301 <h2>Sorry!</h2> 302 <p>${errorMessage}</p> 303 <p><strong>Already Checked:</strong> ${current}</p> 304 <p><strong>Your Limit :</strong> ${limit}</p> 305 `; 306 } else { 307 var content = ` 308 <h2>📊 SteadFast Success Rate</h2> 295 309 <p><strong>📦Total Orders :</strong> ${response.data.total_parcels || 0}</p> 296 310 <p><strong>✅Total Delivered :</strong> ${response.data.total_delivered || 0}</p> 297 311 <p><strong>❌Total Cancelled:</strong> ${response.data.total_cancelled || 0}</p> 298 312 `; 313 } 314 299 315 $('#stdf-customer-info-content').html(content); 300 316 -
steadfast-api/trunk/includes/class-admin-menu.php
r3407125 r3445113 15 15 add_action( 'admin_menu', array( $this, 'register_steadfast_admin_menu_page' ) ); 16 16 add_action( 'admin_init', array( $this, 'register_admin_settings_fields' ) ); 17 } 17 18 add_action( 'admin_init',array($this,'remove_admin_notice')); 19 } 20 21 22 function remove_admin_notice() 23 { 24 if (isset($_GET['page']) && $_GET['page'] === 'steadfast') { 25 26 remove_all_actions('admin_notices'); 27 remove_all_actions('all_admin_notices'); 28 29 } 30 } 31 18 32 19 33 … … 46 60 'title' => esc_html__( 'Notes', 'steadfast-api'), 47 61 'type' => 'checkbox', 48 'subtitle' => esc_html__( 'Please enable this check box for send customer notes', 'steadfast-api'),62 'subtitle' => esc_html__( 'Please enable this checkbox for send customer notes', 'steadfast-api'), 49 63 ), 50 64 … … 52 66 'title' => esc_html__( 'API Key *', 'steadfast-api'), 53 67 'type' => 'password', 54 'placeholder' => esc_html__( ' enter your api key', 'steadfast-api'),68 'placeholder' => esc_html__( 'Enter your api key', 'steadfast-api'), 55 69 'subtitle' => esc_html__( 'This field is required', 'steadfast-api'), 56 70 ), … … 59 73 'title' => esc_html__( 'Secret Key *', 'steadfast-api'), 60 74 'type' => 'password', 61 'placeholder' => esc_html__( ' enter your secret key', 'steadfast-api'),75 'placeholder' => esc_html__( 'Enter your secret key', 'steadfast-api'), 62 76 'subtitle' => esc_html__( 'This field is required', 'steadfast-api'), 63 77 ), -
steadfast-api/trunk/includes/class-hooks.php
r3260117 r3445113 54 54 55 55 <div id="stdf-customer-info-modal"> 56 <h2><?php echo esc_html__('📊 SteadFast Success Rate', 'steadfast-api'); ?></h2>56 <h2><?php // echo esc_html__('📊 SteadFast Success Rate', 'steadfast-api'); ?></h2> 57 57 <div id="stdf-customer-info-content"> 58 58 -
steadfast-api/trunk/readme.txt
r3407125 r3445113 5 5 Tags: steadfast, steadfast courier, send to steadfast, steadfast api 6 6 Requires at least: 6.5.5 7 Tested up to: 6. 8.37 Tested up to: 6.9 8 8 Requires PHP: 8.0 9 Stable tag: 1.0. 39 Stable tag: 1.0.4 10 10 Tested up to WooCommerce: 10.3.5 11 11 Text Domain: steadfast-api … … 94 94 == Changelog == 95 95 96 = 1.0.4 = 97 * Show Courier Score Check Limit Message. 98 96 99 = 1.0.3 = 97 100 * Fix Courier Score API issue. -
steadfast-api/trunk/steadfast-api.php
r3407125 r3445113 4 4 * Plugin Name: SteadFast API 5 5 * Description: Send to SteadFast gives you the ability to send your parcel request to SteadFast directly from your WooCommerce dashboard, it enables booking automation from your WordPress website. You can send your parcel to SteadFast one by one, or you can choose bulk send from "bulk action" dropdown. 6 * Version: 1.0. 36 * Version: 1.0.4 7 7 * Author: SteadFast Courier LTD 8 8 * Text Domain: steadfast-api 9 9 * Author URI: https://steadfast.com.bd/ 10 * Requires Plugins: woocommerce 10 11 * License: GPLv2 11 12 * License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 62 63 */ 63 64 function admin_script() { 65 64 66 $page = isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : ''; 65 if ( $page == 'steadfast'){ 66 wp_enqueue_style( 'stdf-style-dashboard', STDF_PLUGIN_URL . 'assets/admin/css/dashboard.css', array(), STDF_PLUGIN_VERSION, 'all' ); 67 if ($page == 'steadfast') { 68 wp_enqueue_style('stdf-style-dashboard', STDF_PLUGIN_URL . 'assets/admin/css/dashboard.css', array(), STDF_PLUGIN_VERSION, 'all'); 69 wp_enqueue_script('stdf-script-dashboard', STDF_PLUGIN_URL . 'assets/admin/js/dashboard.js', array(), STDF_PLUGIN_VERSION); 67 70 } 68 71
Note: See TracChangeset
for help on using the changeset viewer.