Plugin Directory

Changeset 3002742


Ignore:
Timestamp:
11/28/2023 01:21:11 PM (2 years ago)
Author:
pluginswithpurpose
Message:

1.2.3 version

Location:
dynamic-donations
Files:
653 added
10 edited

Legend:

Unmodified
Added
Removed
  • dynamic-donations/trunk/README.md

    r2977129 r3002742  
    44Requires at least: 4.2
    55Tested up to: 6.1
    6 Stable tag: 1.2.2
     6Stable tag: 1.2.3
    77Requires PHP: 7.0
    88License: GPLv2 or later
     
    100100
    101101== Upgrade Notice ==
    102 = 1.2.0 =
     102= 1.2.3 =
    103103Release version
  • dynamic-donations/trunk/dydo.php

    r2977131 r3002742  
    66 * Plugin URI:        https://pluginswithpurpose.com/dynamic-donations
    77 * Description:       Easy and powerful WordPress plugin for donations or fundraising management.
    8  * Version:           1.2.2
     8 * Version:           1.2.3
    99 * Author:            Plugins with Purpose
    1010 * Author URI:        https://pluginswithpurpose.com
     
    3232 */
    3333if ( ! defined( 'DYDO_VERSION' ) ) {
    34     define( 'DYDO_VERSION', '1.2.2' );
     34    define( 'DYDO_VERSION', '1.2.3' );
    3535}
    3636
  • dynamic-donations/trunk/readme.txt

    r2977131 r3002742  
    44Requires at least: 4.2
    55Tested up to: 6.1
    6 Stable tag: 1.2.2
     6Stable tag: 1.2.3
    77Requires PHP: 7.0
    88License: GPLv2 or later
  • dynamic-donations/trunk/src/admin/components/SideNav.js

    r2973123 r3002742  
    1 import React from 'react';
     1import React, { useEffect, useState } from 'react';
    22import { Link, useLocation } from 'react-router-dom';
    33import { List, ListItem, ListItemIcon, ListItemText } from '@material-ui/core';
     
    1313
    1414} from '@material-ui/icons';
     15import { WPRequest } from "../http-common";
     16
    1517
    1618const SideNavIcon = ({selected, icon}) => {
     
    2527  }
    2628
     29
    2730  return (
    2831    <>{React.cloneElement(icon, props)}</>
     
    3639    icon: (selected) => <SideNavIcon selected={selected} icon={<DashboardIcon />} />,
    3740    submenu: [],
     41    badge:''
    3842  },
    3943  {
     
    4246    icon: (selected) => <SideNavIcon selected={selected} icon={<AccountBalanceWalletIcon />} />,
    4347    submenu: [],
     48    badge:''
    4449  },
    4550  {
     
    4853    icon: (selected) => <SideNavIcon selected={selected} icon={<PaymentIcon />} />,
    4954    submenu: [],
     55    badge:''
    5056  },
    5157  {
     
    5460    icon: (selected) => <SideNavIcon selected={selected} icon={<CodeIcon />} />,
    5561    submenu: [],
     62    badge:''
    5663  },
    5764  {
     
    6067    icon: (selected) => <SideNavIcon selected={selected} icon={<StyleIcon />} />,
    6168    submenu: [],
     69    badge:''
    6270  },
    6371  {
     
    6674    icon: (selected) => <SideNavIcon selected={selected} icon={<CreditCardIcon />} />,
    6775    submenu: [],
     76    badge: 0 //expiredCards.length
    6877  },
    6978  {
     
    7281    icon: (selected) => <SideNavIcon selected={selected} icon={<SettingsIcon />} />,
    7382    submenu: [],
     83    badge:''
    7484  },
    7585 
     
    92102}))(ListItem);
    93103
     104const styles = {
     105    alignItems: 'center',
     106    justifyContent: 'space-between',
     107    display: 'flex',
     108    width: '130px'
     109}
     110
    94111export default function SideNav() {
    95   const location = useLocation();
     112  const location = useLocation();
     113  const [expiredCards, setExpiredCards] = useState([]);
    96114
     115  useEffect(async () => {
     116    const res = await WPRequest({action: "dydo_get_list_of_users"});   
     117    setExpiredCards(res.data)
     118  }, []);
    97119  return (
    98120    <List>
     
    109131              {(item.icon(item.to === location.pathname || location.pathname.startsWith(`${item.to}/`)))}
    110132            </ListItemIcon>
    111             <ListItemText>{item.text}</ListItemText>
     133            <ListItemText primaryTypographyProps={{ style: styles }}>{item.text} {
     134              item.to == '/expired-cards' &&
     135              <span className='dydo_badge_notification'>{expiredCards.length}</span>
     136            } </ListItemText>
    112137          </StyledListItem>
    113138        ))
  • dynamic-donations/trunk/src/admin/pages/ExpiredCards/ExpiredCards.js

    r2973125 r3002742  
    8181      {open && (
    8282        <ConfirmModal
    83           title={"Do you want to send reminders to all users?"}
     83          title={"Do you want to send reminders to these "+expiredCards.length+" users?"}
    8484          message={""}
    8585          onConfirm={sendReminder}
     
    139139                      <TableCell align="left">
    140140                        <Typography variant="subtitle1">
    141                           {dayjs(user.exp_year+'-'+user.exp_month+'-01').format("MMM, YYYY")}
    142                          {/* {user.exp_month} - {user.exp_year} */}
     141                          { dayjs(user.exp_year+'-'+user.exp_month+'-01').format("MMM, YYYY") }
    143142                        </Typography>
    144143                      </TableCell>
  • dynamic-donations/trunk/src/public/actions/global.actions.js

    r2973123 r3002742  
    3636});
    3737
     38export const changePageLink = (error) => ({
     39    type: types.CHANGE_PAGE_LINK,
     40    payload: error,
     41});
     42
     43export const changeSecondError = (text) => ({
     44    type: types.CHANGE_SECOND_ERROR,
     45    payload: text,
     46});
     47
    3848export const changeStatusLoader = (status) => ({
    3949    type: types.CHANGE_STATUS_LOADER,
  • dynamic-donations/trunk/src/public/components/Errors/Errors.js

    r2973123 r3002742  
    33
    44//Actions
    5 import { changeError } from '../../actions/global.actions';
     5import { changeError, changeSecondError } from '../../actions/global.actions';
    66
    77const Errors = () => {
     
    1818        const timer = setTimeout(() => {
    1919            dispatch(changeError(''));
     20      dispatch(changeSecondError(''));
    2021        }, 20000);
    2122
     
    2526    if (global.error) {
    2627        return (
    27             <div className="dydo_error-section">
    28                 <div className="dydo_error-section__content">
     28            <div className="dydo_error-section test">
     29        <div className="dydo_error-section__content">
    2930                    <p className="dydo_error-section__paragraph">
    3031                        {global.error}
     
    3940                    </button>
    4041                </div>
     42        {
     43          global.secondError &&
     44
     45          <div className="dydo_error-section__content dydo_second_error-section__content">
     46            <p className="dydo_error-section__paragraph">
     47              {global.secondError}
     48              <a href={`${global.pageLink}`} target="_blank">Subscriptions</a>
     49            </p>
     50           
     51                  </div>
     52        }
    4153            </div>
    4254        );
  • dynamic-donations/trunk/src/public/components/PaymentMethods/PaymentMethodForm.js

    r2973125 r3002742  
    44// Actions
    55import { removePaymentMethod, updateCreditCards } from "../../actions/user.actions";
    6 import { changeError, changeStatusLoader } from "../../actions/global.actions"
     6import { changeError, changeStatusLoader, changeSecondError, changePageLink } from "../../actions/global.actions"
    77
    88import {
     
    135135      return;
    136136    } else {
     137      const res = await WP.request.hook("wp_page_with_shortcode");
    137138      dispatch(changeStatusLoader(false));
     139      dispatch(
     140        changePageLink(res.data)
     141      );
     142      dispatch(
     143        changeSecondError(
     144          "You cannot remove this payment method because you have an active subscription. If you'd like to discontinue your active subscription click here to manage your "
     145        )
     146      );
    138147      dispatch(
    139148        changeError(
  • dynamic-donations/trunk/src/public/reducers/global.reducer.js

    r2973123 r3002742  
    77  loader: false,
    88  selectedSubscription: {},
     9  secondError: ""
    910};
    1011
     
    4647        error: action.payload,
    4748      };
     49    case "CHANGE_PAGE_LINK":
     50      return {
     51        ...state,
     52        pageLink: action.payload,
     53      };
     54    case "CHANGE_SECOND_ERROR":
     55      return {
     56        ...state,
     57        secondError: action.payload,
     58      };
    4859    case "CHANGE_STATUS_LOADER":
    4960      return {
  • dynamic-donations/trunk/src/public/types/global.types.js

    r2973123 r3002742  
    1111export const GET_ERROR = 'GET_ERROR';
    1212export const CHANGE_ERROR = 'CHANGE_ERROR';
     13export const CHANGE_SECOND_ERROR = 'CHANGE_SECOND_ERROR';
     14export const CHANGE_PAGE_LINK = 'CHANGE_PAGE_LINK';
    1315
    1416export const CHANGE_STATUS_LOADER = 'CHANGE_STATUS_LOADER';
Note: See TracChangeset for help on using the changeset viewer.