Skip to content

Commit

Permalink
Merge pull request #1153 from OpenSignLabs/validation
Browse files Browse the repository at this point in the history
build(deps): update dependencies
  • Loading branch information
prafull-opensignlabs authored Sep 3, 2024
2 parents d6f117c + 8a3e6f5 commit d7f4c9a
Show file tree
Hide file tree
Showing 18 changed files with 83 additions and 91 deletions.
8 changes: 4 additions & 4 deletions apps/OpenSign/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apps/OpenSign/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
"eslint-plugin-react": "^7.34.3",
"lint-staged": "^15.2.8",
"mini-css-extract-plugin": "^2.9.1",
"postcss": "^8.4.41",
"postcss": "^8.4.44",
"prettier": "^3.3.3",
"pretty-quick": "^4.0.0",
"tailwindcss": "^3.4.10",
Expand Down
5 changes: 3 additions & 2 deletions apps/OpenSign/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"upgrade-now": "Upgrade now",
"upgrade-to": "Upgrade to",
"plan": "Plan",
"subscribe-card-teamplan":"Unlock the full power of collaboration! Create unlimited organizations, teams, and hierarchies. Share templates seamlessly across teams and assign custom user roles. Elevate your workflow today!",
"subscribe-card-plan": "Unlock premium features starting at just {{premiumPrice}}/month. Enjoy enhanced performance and only {{addonPrice}} per additional credit after your included premium credits.",
"user-name-limit-char": "To have a username less than 8 character please subscribe",
"tour-content": "Don't show this again",
Expand Down Expand Up @@ -216,8 +217,8 @@
"initials": "Initials",
"API": "API",
"api-token": "API Token",
"regenerate-token": "Regenerate Token",
"generate-token": "Generate Token",
"regenerate-token": "Regenerate Live Token",
"generate-token": "Generate Live Token",
"view-docs": "View Docs",
"generate-token-alert": "Are you sure you want to regenerate token it will expire old token?",
"yes": "Yes",
Expand Down
5 changes: 3 additions & 2 deletions apps/OpenSign/public/locales/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"upgrade-to": "Mettre à niveau vers",
"pro": "PRO",
"plan": "Offre",
"subscribe-card-teamplan":"Libérez toute la puissance de la collaboration ! Créez un nombre illimité d'organisations, d'équipes et de hiérarchies. Partagez des modèles de manière transparente entre les équipes et attribuez des rôles d'utilisateur personnalisés. Améliorez votre flux de travail dès aujourd'hui !",
"subscribe-card-plan": "Débloquez des fonctionnalités premium à partir de seulement {{premiumPrice}}/mois. Bénéficiez de performances améliorées et de seulement {{addonPrice}} par crédit supplémentaire après vos crédits premium inclus.",
"user-name-limit-char": "Pour avoir un nom d'utilisateur de moins de 8 caractères s'il vous plaît s'abonner",
"tour-content": "Ne plus afficher",
Expand Down Expand Up @@ -216,8 +217,8 @@
"initials": "Initiales",
"API": "API",
"api-token": "Jeton API",
"regenerate-token": "Régénérer le jeton",
"generate-token": "Générer un jeton",
"regenerate-token": "Régénérer en direct jeton",
"generate-token": "Générer en direct jeton",
"view-docs": "Afficher les documents",
"generate-token-alert": "Êtes-vous sûr de vouloir régénérer le jeton, votre ancien jeton sera supprimer?",
"yes": "Oui",
Expand Down
12 changes: 6 additions & 6 deletions apps/OpenSign/src/pages/GenerateToken.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ function GenerateToken() {
</div>
<button
onClick={handleGenerateTestToken}
className="op-btn op-btn-primary w-[200px] md:w-auto"
className="op-btn op-btn-primary w-[210px] md:w-auto"
>
{apitestToken
? t("regenerate-test-token")
Expand Down Expand Up @@ -301,7 +301,7 @@ function GenerateToken() {
</div>
<button
onClick={apiToken ? handleModal : handleSubmit}
className="op-btn op-btn-primary w-[200px] md:w-auto"
className="op-btn op-btn-primary w-[210px] md:w-auto"
>
{apiToken ? t("regenerate-token") : t("generate-token")}
</button>
Expand Down Expand Up @@ -332,14 +332,14 @@ function GenerateToken() {
"https://docs.opensignlabs.com/docs/API-docs/opensign-api-v-1"
)
}
className="op-btn op-btn-secondary mt-2 md:mb-3 px-8 w-[200px] md:w-auto"
className="op-btn op-btn-secondary mt-2 md:mb-3 px-8 w-[210px] md:w-auto"
>
{t("view-docs")}
</button>
<button
type="button"
onClick={() => handleBuyAPIsModal()}
className="op-btn op-btn-secondary mt-2 mb-3 px-8 w-[200px] md:w-auto"
className="op-btn op-btn-accent mt-2 mb-3 px-8 w-[210px] md:w-auto"
>
{t("buycredits")}
</button>
Expand Down Expand Up @@ -420,9 +420,9 @@ function GenerateToken() {
</form>
</ModalUi>
</div>
{isSubscribe?.plan === "freeplan" && isEnableSubscription && (
{isEnableSubscription && isSubscribe?.plan === "freeplan" && (
<div data-tut="apisubscribe">
<SubscribeCard plan_code={isSubscribe?.plan} />
<SubscribeCard />
</div>
)}
</>
Expand Down
8 changes: 2 additions & 6 deletions apps/OpenSign/src/pages/TeamList.js
Original file line number Diff line number Diff line change
Expand Up @@ -467,13 +467,9 @@ const TeamList = () => {
)}
</>
)}
{!validplan[isSubscribe.plan] && isEnableSubscription && !isLoader && (
{isEnableSubscription && !validplan[isSubscribe.plan] && !isLoader && (
<div data-tut="apisubscribe">
<SubscribeCard
plan={"TEAMS"}
price={"20"}
plan_code={isSubscribe.plan}
/>
<SubscribeCard plan="TEAMS" />
</div>
)}
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/OpenSign/src/pages/UpdateExistUserAdmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const UpdateExistUserAdmin = () => {
try {
const isAdminExist = await Parse.Cloud.run("checkadminexist");
if (isAdminExist !== "not_exist") {
console.log("isAdminExist ", isAdminExist);
// console.log("isAdminExist ", isAdminExist);
setErrMsg("Admin already exists.");
}
} catch (err) {
Expand Down
8 changes: 2 additions & 6 deletions apps/OpenSign/src/pages/UserList.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,13 +421,9 @@ const UserList = () => {
)}
</>
)}
{!validplan[isSubscribe.plan] && isEnableSubscription && !isLoader && (
{isEnableSubscription && !validplan[isSubscribe.plan] && !isLoader && (
<div data-tut="apisubscribe">
<SubscribeCard
plan={"TEAMS"}
price={"20"}
plan_code={isSubscribe.plan}
/>
<SubscribeCard plan="TEAMS" />
</div>
)}
</div>
Expand Down
4 changes: 2 additions & 2 deletions apps/OpenSign/src/pages/Webhook.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ function Webhook() {
</div>
</ModalUi>
</div>
{!isSubscribe?.isValid && isEnableSubscription && (
{isEnableSubscription && !isSubscribe?.isValid && (
<div data-tut="webhooksubscribe">
<SubscribeCard plan_code={isSubscribe.plan} />
<SubscribeCard />
</div>
)}
</>
Expand Down
13 changes: 5 additions & 8 deletions apps/OpenSign/src/primitives/GetReportDisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -1661,23 +1661,20 @@ const ReportTable = (props) => {
)}
</>
)}
{!validplan[isSubscribe.plan] &&
isEnableSubscription && (
{isEnableSubscription &&
!validplan[isSubscribe.plan] && (
<>
<div
className="op-btn op-btn-sm op-btn-circle op-btn-ghost text-primary-content absolute right-2 top-2 z-40"
onClick={() => setIsShareWith({})}
>
</div>
<SubscribeCard
plan={"TEAMS"}
price={"20"}
/>
<SubscribeCard plan="TEAMS" />
</>
)}
{validplan[isSubscribe.plan] &&
!isEnableSubscription && (
{!isEnableSubscription &&
validplan[isSubscribe.plan] && (
<>
<h3 className="text-base-content font-bold text-lg pt-[15px] px-[20px]">
{t("share-with")}
Expand Down
6 changes: 3 additions & 3 deletions apps/OpenSign/src/primitives/QuotaCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const QuotaCard = ({ isSignyourself, handlClose }) => {
<h2 className="op-card-title">
{t("upgrade-to") + " Paid " + t("plan")}
</h2>
<p className="text-primary-content">{t("quotamailselfsign")}</p>
<p>{t("quotamailselfsign")}</p>
<div className="op-card-actions justify-end">
<button
onClick={() => navigate("/subscription")}
Expand All @@ -34,8 +34,8 @@ const QuotaCard = ({ isSignyourself, handlClose }) => {
<>
<div className="op-card op-bg-primary text-primary-content w-full shadow-lg">
<div className="op-card-body">
<p className="text-primary-content">{t("quotamail")}</p>
<p className="text-primary-content">{t("quotamailTip")}</p>
<p>{t("quotamail")}</p>
<p>{t("quotamailTip")}</p>
<div className="op-card-actions justify-end">
<button
onClick={() => navigate("/subscription")}
Expand Down
11 changes: 7 additions & 4 deletions apps/OpenSign/src/primitives/SubscribeCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,21 @@ import { useNavigate } from "react-router-dom";
const SubscribeCard = ({ plan, price }) => {
const { t } = useTranslation();
const navigate = useNavigate();
const handlePaidRoute = () => {
navigate("/subscription");
};
const handlePaidRoute = () => navigate("/subscription");
const premiumPrice = price ? "$" + price : "$9.99";
const addonPrice = "$0.15";
const plandName = plan ? plan.toLowerCase() : "Paid";
return (
<div className="op-card op-bg-primary text-primary-content w-full shadow-lg">
<div className="op-card-body">
<h2 className="op-card-title">
{t("upgrade-to")} {plan ? plan : "Paid"} {t("plan")}
</h2>
<p>{t("subscribe-card-plan", { premiumPrice, addonPrice })}</p>
<p>
{plandName?.includes("team")
? t("subscribe-card-teamplan")
: t("subscribe-card-plan", { premiumPrice, addonPrice })}
</p>
<div className="op-card-actions justify-end">
<button
onClick={() => handlePaidRoute()}
Expand Down
4 changes: 2 additions & 2 deletions apps/OpenSign/src/script/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@
"initials": "Initials",
"API": "API",
"api-token": "API Token",
"regenerate-token": "Regenerate Token",
"generate-token": "Generate Token",
"regenerate-token": "Regenerate Live Token",
"generate-token": "Generate Live Token",
"view-docs": "View Docs",
"generate-token-alert": "Are you sure you want to regenerate token it will expire old token?",
"yes": "Yes",
Expand Down
4 changes: 2 additions & 2 deletions apps/OpenSign/src/script/locales/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@
"initials": "Initiales",
"API": "API",
"api-token": "Jeton API",
"regenerate-token": "Régénérer le jeton",
"generate-token": "Générer un jeton",
"regenerate-token": "Régénérer en direct jeton",
"generate-token": "Générer en direct jeton",
"view-docs": "Afficher les documents",
"generate-token-alert": "Êtes-vous sûr de vouloir régénérer le jeton, votre ancien jeton sera supprimer?",
"yes": "Oui",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ export default async function createDocumentWithTemplate(request, response) {
objectId: extUser.get('TenantId').id,
});
subscription.include('ExtUserPtr');
subscription.greaterThan('AllowedApis', 0);
const resSub = await subscription.first({ useMasterKey: true });
if (resSub) {
const _resSub = JSON.parse(JSON.stringify(resSub));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,6 @@ export default async function createDocumentwithCoordinate(request, response) {
})),
message: 'Document sent successfully!',
});
// }
} else {
if (request.posthog) {
request.posthog?.capture({
Expand Down
Loading

0 comments on commit d7f4c9a

Please sign in to comment.