Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance: Vendor dashboard app compatibility with rfq. #2459

Open
wants to merge 4 commits into
base: update/vendor-dashboard-structure
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion includes/REST/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
*
* @return void
*/
public function prepeare_product_response( $response, $object, $request ) {

Check warning on line 77 in includes/REST/Manager.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

The method parameter $object is never used

Check warning on line 77 in includes/REST/Manager.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

The method parameter $request is never used

Check warning on line 77 in includes/REST/Manager.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

It is recommended not to use reserved keyword "object" as function parameter name. Found: $object
$data = $response->get_data();
$author_id = get_post_field( 'post_author', $data['id'] );

Expand Down Expand Up @@ -136,7 +136,7 @@
*
* @return void
*/
public function on_dokan_rest_insert_product( $object, $request, $creating ) {

Check warning on line 139 in includes/REST/Manager.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

It is recommended not to use reserved keyword "object" as function parameter name. Found: $object
// if not creating, meaning product is updating. So return early
if ( ! $creating ) {
return;
Expand Down Expand Up @@ -200,11 +200,11 @@
DOKAN_DIR . '/includes/REST/StoreSettingControllerV2.php' => '\WeDevs\Dokan\REST\StoreSettingControllerV2',
DOKAN_DIR . '/includes/REST/VendorDashboardController.php' => '\WeDevs\Dokan\REST\VendorDashboardController',
DOKAN_DIR . '/includes/REST/ProductBlockController.php' => '\WeDevs\Dokan\REST\ProductBlockController',
DOKAN_DIR . '/includes/REST/CommissionControllerV1.php' => '\WeDevs\Dokan\REST\CommissionControllerV1',
DOKAN_DIR . '/includes/REST/CustomersController.php' => '\WeDevs\Dokan\REST\CustomersController',
DOKAN_DIR . '/includes/REST/DokanDataCountriesController.php' => '\WeDevs\Dokan\REST\DokanDataCountriesController',
DOKAN_DIR . '/includes/REST/DokanDataContinentsController.php' => '\WeDevs\Dokan\REST\DokanDataContinentsController',
DOKAN_DIR . '/includes/REST/OrderControllerV3.php' => '\WeDevs\Dokan\REST\OrderControllerV3',
DOKAN_DIR . '/includes/REST/CommissionControllerV1.php' => '\WeDevs\Dokan\REST\CommissionControllerV1',
)
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Layout/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Header = ( { title = '' } ) => {
return (
<div className="flex items-center sm:flex-wrap md:flex-nowrap">
<Slot name="dokan-before-header" />
<div className="dokan-header-title flex-1">
<div className="dokan-header-title flex-2">
{ title && (<h1 className="mb-4 text-3xl font-extrabold text-gray-900 dark:text-white md:text-5xl lg:text-6xl">{title}</h1>)}
</div>
<div className="dokan-header-actions flex flex-1 gap-2.5 md:justify-end">
Expand Down
5 changes: 3 additions & 2 deletions src/Routing/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import NotFound from "../Layout/404";
import {__} from "@wordpress/i18n";
import {DokanRoute} from "../Layout";
import { isValidElement, cloneElement, createElement } from '@wordpress/element';
import { useNavigate, useParams, useLocation, redirect, replace, useMatches, useNavigation, } from 'react-router-dom';
import { useNavigate, useParams, useLocation, redirect, replace, useMatches, useNavigation, Link } from 'react-router-dom';

export function withRouter(Component) {
function ComponentWithRouterProp(props) {
Expand All @@ -19,7 +19,8 @@ export function withRouter(Component) {
redirect,
replace,
matches,
navigation
navigation,
Link
};

// Check if Component is a valid element
Expand Down