mirror of
https://github.com/spurtcms/spurtcms.git
synced 2026-09-21 10:32:06 +00:00
community_version 1.3.0
This commit is contained in:
@@ -1,105 +1,107 @@
|
||||
|
||||
|
||||
#
|
||||
# DATABASE SUPPORT (postgres,mysql)
|
||||
#
|
||||
DATABASE_TYPE=''
|
||||
DB_HOST='' #your database host
|
||||
DB_PORT='' #your database port
|
||||
DB_USERNAME='' #your database username
|
||||
DB_PASSWORD='' #your databse password
|
||||
DB_NAME='' #your database names
|
||||
|
||||
|
||||
#
|
||||
#Keys
|
||||
#
|
||||
ACCESS_SECRET='!@#$%^&*()'
|
||||
JWT_SECRET = '!@#$%^&*()'
|
||||
|
||||
#
|
||||
#Sessios Keys
|
||||
#
|
||||
SESSION_KEY='myspurtcms'
|
||||
SESSION_KEY1='myspurtcms1'
|
||||
SESSION_KEY3='myspurtcms2'
|
||||
CSRF_SECRET='secret123'
|
||||
|
||||
#
|
||||
# Cors Allowed Origin
|
||||
#
|
||||
BASE_URL ='http://localhost:8082/'
|
||||
DOMAIN_URL='http://localhost:8082/'
|
||||
PORT='8082'
|
||||
|
||||
#
|
||||
# Mail Conf
|
||||
#
|
||||
MAIL_USERNAME=''
|
||||
MAIL_PASSWORD =''
|
||||
MAIL_HOST = ''
|
||||
MAIL_PORT=''
|
||||
|
||||
|
||||
#
|
||||
#LANGUAGE PATH
|
||||
#
|
||||
LOCAL_LANGUAGE_PATH="locales/"
|
||||
|
||||
#
|
||||
# System Settings
|
||||
#
|
||||
TIME_ZONE = "Asia/Kolkata"
|
||||
DEFAULT_LANGUAGE = "English"
|
||||
|
||||
|
||||
#
|
||||
# AWS - S3
|
||||
#
|
||||
AWS_ACCESS_KEY_ID = ''
|
||||
AWS_SECRET_ACCESS_KEY = ''
|
||||
AWS_DEFAULT_REGION = ''
|
||||
AWS_BUCKET = ''
|
||||
|
||||
|
||||
#
|
||||
#Social Media Links
|
||||
#
|
||||
LINKEDIN = 'https://www.linkedin.com/company/spurtcms/'
|
||||
|
||||
FACEBOOK = 'https://www.facebook.com/spurtcms'
|
||||
|
||||
TWITTER = 'https://twitter.com/spurtcms'
|
||||
|
||||
YOUTUBE = 'https://www.youtube.com/@spurtcms'
|
||||
|
||||
INSTAGRAM = 'https://www.instagram.com/spurtcms/'
|
||||
|
||||
COPYRIGHTS ="Copyrights © 2024, Piccosoft Software labs India Private Limited.All Rights Reserved."
|
||||
|
||||
|
||||
#
|
||||
#PREVIEW
|
||||
#
|
||||
|
||||
VIEW_PORT ="8083"
|
||||
|
||||
VIEW_BASE_URL="http://localhost:8083"
|
||||
|
||||
#
|
||||
#GRAPHQL
|
||||
#
|
||||
|
||||
GRAPHQL_URL = 'http://localhost:8084/'
|
||||
|
||||
GRAPHQL_API_URL = 'http://localhost:8084/query'
|
||||
|
||||
GRAPHQL_PORT = '8084'
|
||||
|
||||
# //Default Master EndpointURL//
|
||||
|
||||
MASTER_BLOCKS_ENDPOINTURL ="https://superadmin.spurtcms.com/blocks/"
|
||||
|
||||
MASTER_CTA_ENDPOINTURL ="https://superadmin.spurtcms.com/cta/"
|
||||
|
||||
MASTER_CHANNELS_ENDPOINTURL ="https://superadmin.spurtcms.com/channels/"
|
||||
|
||||
|
||||
#
|
||||
# DATABASE SUPPORT (postgres,mysql)
|
||||
#
|
||||
DATABASE_TYPE=''
|
||||
DB_HOST=''
|
||||
DB_PORT=''
|
||||
DB_USERNAME=''
|
||||
DB_PASSWORD=''
|
||||
DB_NAME=''
|
||||
TENANTID='1'
|
||||
|
||||
|
||||
#
|
||||
#Keys
|
||||
#
|
||||
ACCESS_SECRET='!@#$%^&*()'
|
||||
JWT_SECRET = '!@#$%^&*()'
|
||||
|
||||
#
|
||||
#Sessios Keys
|
||||
#
|
||||
SESSION_KEY='myspurtcms'
|
||||
SESSION_KEY1='myspurtcms1'
|
||||
SESSION_KEY3='myspurtcms2'
|
||||
CSRF_SECRET='secret123'
|
||||
TEMPLATE_SESSION_KEY='gotemplates'
|
||||
|
||||
#
|
||||
# Cors Allowed Origin
|
||||
#
|
||||
BASE_URL ='http://localhost:8080/'
|
||||
DOMAIN_URL='http://localhost:8080/'
|
||||
PORT='8080'
|
||||
|
||||
#
|
||||
# Mail Conf
|
||||
#
|
||||
MAIL_USERNAME=''
|
||||
MAIL_PASSWORD =''
|
||||
MAIL_HOST = ''
|
||||
MAIL_PORT=''
|
||||
|
||||
|
||||
#
|
||||
#LANGUAGE PATH
|
||||
#
|
||||
LOCAL_LANGUAGE_PATH="locales/"
|
||||
|
||||
#
|
||||
# System Settings
|
||||
#
|
||||
TIME_ZONE = "Asia/Kolkata"
|
||||
DEFAULT_LANGUAGE = "English"
|
||||
|
||||
|
||||
#
|
||||
# AWS - S3
|
||||
#
|
||||
AWS_ACCESS_KEY_ID = ''
|
||||
AWS_SECRET_ACCESS_KEY = ''
|
||||
AWS_DEFAULT_REGION = ''
|
||||
AWS_BUCKET = ''
|
||||
|
||||
|
||||
#
|
||||
#Social Media Links
|
||||
#
|
||||
LINKEDIN = 'https://www.linkedin.com/company/spurtcms/'
|
||||
|
||||
FACEBOOK = 'https://www.facebook.com/spurtcms'
|
||||
|
||||
TWITTER = 'https://twitter.com/spurtcms'
|
||||
|
||||
YOUTUBE = 'https://www.youtube.com/@spurtcms'
|
||||
|
||||
INSTAGRAM = 'https://www.instagram.com/spurtcms/'
|
||||
|
||||
COPYRIGHTS ="Copyrights © 2025, Piccosoft Software labs India Private Limited.All Rights Reserved."
|
||||
|
||||
|
||||
#
|
||||
#PREVIEW
|
||||
#
|
||||
|
||||
VIEW_PORT ="8083"
|
||||
|
||||
VIEW_BASE_URL="http://localhost:8083"
|
||||
|
||||
#
|
||||
#GRAPHQL
|
||||
#
|
||||
|
||||
GRAPHQL_URL = 'http://localhost:8084/'
|
||||
|
||||
GRAPHQL_API_URL = 'http://localhost:8084/query'
|
||||
|
||||
GRAPHQL_PORT = '8084'
|
||||
|
||||
# //Default Master EndpointURL//
|
||||
|
||||
MASTER_BLOCKS_ENDPOINTURL ="https://superadmin.spurtcms.com/defaultblocklist/"
|
||||
|
||||
MASTER_CTA_ENDPOINTURL ="https://superadmin.spurtcms.com/defaultctalist/"
|
||||
|
||||
MASTER_CHANNELS_ENDPOINTURL ="https://superadmin.spurtcms.com/admin/channels/"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2024 spurtCMS
|
||||
Copyright (c) 2025 spurtCMS
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<br />
|
||||
|
||||
> [!IMPORTANT]
|
||||
> 🎉 <strong>Spurtcms V1.2.1 is now available!</strong> Read more in the <a target="_blank" href="https://www.spurtcms.com/spurtcms-change-log" rel="dofollow"><strong>announcement post</strong></a>.[](https://pkg.go.dev/search?q=spurtcms)
|
||||
> 🎉 <strong>Spurtcms V1.3 is now available!</strong> Read more in the <a target="_blank" href="https://www.spurtcms.com/spurtcms-change-log" rel="dofollow"><strong>announcement post</strong></a>.[](https://pkg.go.dev/search?q=spurtcms)
|
||||
<br />
|
||||
<p>
|
||||
spurtCMS Admin Panel prioritizes user-friendly administration, offering powerful tools for content creation, management, and defining CMS workspaces. Administrators have precise control over member access, ensuring streamlined member management. Dynamic channel management allows effective content structuring, enhancing the overall user experience. Administrators effortlessly create and manage channels and templates, providing a comprehensive, user-centric content management solution for personalized and organized web environments.
|
||||
@@ -101,26 +101,26 @@ AWS_BUCKET_NAME=your-bucket-name
|
||||
|
||||
### Step 4: Running the Project
|
||||
|
||||
Open the terminal within the project / cloned folder “spurtcms-admin”, and execute the following command:
|
||||
Open the terminal within the project or cloned folder “spurtcms-admin”, and execute the following command:
|
||||
|
||||
```
|
||||
go run main.go
|
||||
```
|
||||
Once the project runs successfully, a default website template will open automatically in your browser.
|
||||
To access the Admin Panel, navigate to the following route in your browser:
|
||||
```
|
||||
http://localhost:port/admin
|
||||
```
|
||||
Use the default login credentials to sign in:
|
||||
|
||||
```
|
||||
This command initiates the spurtCMS Admin application, allowing you to begin your journey with this powerful content management system.
|
||||
|
||||
|
||||
|
||||
By following the steps outlined in this article, you have successfully set up spurtCMS Admin on your system. Ensure that all prerequisites are met and the configuration steps are accurately executed to enjoy a seamless experience with spurtCMS Admin application. Now you can explore the features and functionalities of spurtCMS Admin for efficient content management.
|
||||
|
||||
|
||||
live demo of our intuitive Admin Panel .
|
||||
|
||||
```
|
||||
Username : spurtcmsAdmin
|
||||
Username : Admin
|
||||
Password : Admin@123
|
||||
```
|
||||
|
||||
This allows you to manage website content, templates, and settings directly from the SpurtCMS Admin interface.
|
||||
|
||||
By following the steps outlined in this article, you have successfully set up spurtCMS Admin on your system. Ensure that all prerequisites are met and the configuration steps are accurately executed to enjoy a seamless experience with spurtCMS Admin application. Now you can explore the features and functionalities of spurtCMS Admin for efficient content management.
|
||||
|
||||
## 🤔 Support , Document and Help
|
||||
|
||||
@@ -147,6 +147,3 @@ spurtcms is developed and maintain by [Piccosoft Software Labs India (P) Limited
|
||||
## ❯ License
|
||||
|
||||
spurtcms is released under the [BSD-3-Clause License.](https://github.com/spurtcms/spurtcms/blob/master/LICENSE).
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"Blogmaster": {
|
||||
"Topic": "Topic",
|
||||
"Kewords": "Kewords"
|
||||
},
|
||||
"Blogchild": {
|
||||
"Title": "Title",
|
||||
"Keword": "Kewords",
|
||||
"Articlelength": "Article length",
|
||||
"Tone": "Tone"
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
Executable → Regular
Executable → Regular
+48
-26
@@ -2,6 +2,7 @@ package controllers
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
"spurt-cms/logger"
|
||||
"strconv"
|
||||
@@ -31,24 +32,35 @@ func init() {
|
||||
|
||||
/*login page view*/
|
||||
func Login(c *gin.Context) {
|
||||
|
||||
session, _ := Store.Get(c.Request, os.Getenv("SESSION_KEY"))
|
||||
tkn := session.Values["token"]
|
||||
|
||||
if tkn != "" && tkn != nil {
|
||||
|
||||
tkn := session.Values["token"].(string)
|
||||
claims := jwt.MapClaims{}
|
||||
token, err := jwt.ParseWithClaims(tkn, claims, func(token *jwt.Token) (interface{}, error) {
|
||||
return []byte(os.Getenv("JWT_SECRET")), nil
|
||||
})
|
||||
if err != nil || !token.Valid {
|
||||
c.Redirect(http.StatusFound, "/")
|
||||
return
|
||||
}
|
||||
|
||||
c.Writer.Header().Set("Pragma", "no-cache")
|
||||
|
||||
c.Redirect(301, "/admin/dashboard")
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
c.HTML(200, "login.html", gin.H{"csrf": csrf.GetToken(c)})
|
||||
}
|
||||
|
||||
/*forgetpassword page view*/
|
||||
func ForgetPassword(c *gin.Context) {
|
||||
c.HTML(200, "forgot.html", gin.H{"csrf": csrf.GetToken(c)})
|
||||
}
|
||||
|
||||
func WebsiteLogin(c *gin.Context) {
|
||||
|
||||
c.HTML(200, "index.html", gin.H{"csrf": csrf.GetToken(c), "Menu": NewMenuController(c)})
|
||||
}
|
||||
|
||||
func Download(c *gin.Context) {
|
||||
|
||||
fmt.Println("hhhh")
|
||||
|
||||
c.HTML(200, "download.html", gin.H{"linktitle": "SpurtCMS Download | Golang cms open source code", "description": "Get started with SpurtCMS – Download Golang CMS open source code. Access the foundation for your content management system and kickstart your development journey.", "keywords": "CMS source code, Download Spurtcms source code, Golang with CMS, content management system source code, open source content management system, Develop cms website with open source, Golang cms open source code."})
|
||||
c.HTML(200, "forgotpassword.html", gin.H{"csrf": csrf.GetToken(c)})
|
||||
}
|
||||
|
||||
func NewPassword(c *gin.Context) {
|
||||
@@ -69,7 +81,7 @@ func NewPassword(c *gin.Context) {
|
||||
|
||||
userid := Claims["user_id"]
|
||||
|
||||
c.HTML(200, "changepass.html", gin.H{"csrf": csrf.GetToken(c), "userid": userid})
|
||||
c.HTML(200, "change_password.html", gin.H{"csrf": csrf.GetToken(c), "userid": userid})
|
||||
|
||||
}
|
||||
|
||||
@@ -98,8 +110,8 @@ func SendLinkForForgotPass(c *gin.Context) {
|
||||
|
||||
data := map[string]interface{}{
|
||||
"fname": user.Username,
|
||||
"resetpassword": url_prefix + "change-password?token=" + token,
|
||||
"restpassurl": url_prefix + "change-password",
|
||||
"resetpassword": url_prefix + "admin/change-password?token=" + token,
|
||||
"restpassurl": url_prefix + "admin/change-password",
|
||||
"admin_logo": url_prefix + "public/img/SpurtCMSlogo.png",
|
||||
"fb_logo": url_prefix + "public/img/email-icons/facebook.png",
|
||||
"linkedin_logo": url_prefix + "public/img/email-icons/linkedin.png",
|
||||
@@ -126,7 +138,7 @@ func SendLinkForForgotPass(c *gin.Context) {
|
||||
|
||||
c.SetCookie("success", "Reset password email send successfully", 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/forgot")
|
||||
c.Redirect(301, "/admin/forgot")
|
||||
|
||||
}
|
||||
|
||||
@@ -146,10 +158,9 @@ func SetNewPassword(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Println("checkstatus")
|
||||
c.SetCookie("pass-change", "Password Updated Successfully", 3600, "", "", false, false)
|
||||
c.SetCookie("get-toast", "Password Updated Successfully", 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/")
|
||||
c.Redirect(301, "/admin")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,13 +175,13 @@ func CheckLogin(c *gin.Context) {
|
||||
|
||||
if err != nil {
|
||||
ErrorLog.Printf("CheckLogin error: %s", err)
|
||||
c.Redirect(301, "/")
|
||||
c.Redirect(301, "/admin")
|
||||
// return
|
||||
}
|
||||
|
||||
if err != nil && err.Error() == "user disabled please contact admin" {
|
||||
c.SetCookie("log-toast", "This account is inactive please contact the admin", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/")
|
||||
c.Redirect(301, "/admin")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -184,13 +195,13 @@ func CheckLogin(c *gin.Context) {
|
||||
}
|
||||
|
||||
if c.Request.PostFormValue("username") == "" || c.Request.PostFormValue("pass") == "" {
|
||||
c.Redirect(301, "/")
|
||||
c.Redirect(301, "/admin")
|
||||
return
|
||||
}
|
||||
|
||||
if gorm.ErrRecordNotFound == err {
|
||||
c.SetCookie("log-toast", "You are not registered with us", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/")
|
||||
c.Redirect(301, "/admin")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -211,7 +222,7 @@ func CheckLogin(c *gin.Context) {
|
||||
Session.Values["token"] = token
|
||||
Session.Save(c.Request, c.Writer)
|
||||
|
||||
c.Redirect(301, "/dashboard")
|
||||
c.Redirect(301, "/admin/dashboard")
|
||||
|
||||
}
|
||||
|
||||
@@ -236,8 +247,19 @@ func Logout(c *gin.Context) {
|
||||
ErrorLog.Printf("Logout session save error: %s", er)
|
||||
}
|
||||
|
||||
c.Writer.Header().Set("Cache-Control", "no-store, no-cache, must-revalidate, max-age=0")
|
||||
c.Writer.Header().Set("Pragma", "no-cache")
|
||||
c.SetCookie("lang", "", 3600, "", "", false, false)
|
||||
c.Writer.Header().Set("Expires", "Thu, 01 Jan 1970 00:00:00 GMT") // date in the past ensures expiration
|
||||
|
||||
// cookieNames := []string{"myspurtcms", "lang", "channelbanner", "blockbanner", "tempbanner", "ctadesc", "ctabanner"}
|
||||
// for _, name := range cookieNames {
|
||||
// c.SetCookie(name, "", -1, "/", "spurtcms.com", false, false)
|
||||
// c.SetCookie(name, "", -1, "/", ".lvh.me", false, false)
|
||||
// }
|
||||
c.Writer.Header().Set("Pragma", "no-cache")
|
||||
for _, cookie := range c.Request.Cookies() {
|
||||
c.SetCookie(cookie.Name, "", -1, "/", "", false, true)
|
||||
}
|
||||
c.Redirect(301, "/")
|
||||
|
||||
}
|
||||
@@ -141,7 +141,7 @@ func BlockList(c *gin.Context) {
|
||||
|
||||
blocklist, blockcount, err := BlockConfig.BlockList(limt, offset, blocks.Filter(filter), TenantId)
|
||||
|
||||
fmt.Println("blocklist:", blocklist)
|
||||
fmt.Println("blocklist:",blocklist)
|
||||
|
||||
for _, val := range blocklist {
|
||||
var first = val.FirstName
|
||||
@@ -846,6 +846,7 @@ func UpdateBlock(c *gin.Context) {
|
||||
finalblocklist = append(finalblocklist, val)
|
||||
}
|
||||
|
||||
|
||||
data := map[string]interface{}{"data": finalblocklist}
|
||||
|
||||
bytedata, _ := json.Marshal(data)
|
||||
@@ -878,7 +879,7 @@ func DeleteBlock(c *gin.Context) {
|
||||
|
||||
id, _ := strconv.Atoi(c.Query("id"))
|
||||
|
||||
fmt.Println("remove blocks", id)
|
||||
fmt.Println("remove blocks",id)
|
||||
|
||||
BlockConfig.UserId = c.GetInt("userid")
|
||||
|
||||
@@ -939,7 +940,7 @@ func DeleteBlock(c *gin.Context) {
|
||||
|
||||
bytedata, _ := json.Marshal(data)
|
||||
c.JSON(200, gin.H{"blocks": string(bytedata)})
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Executable → Regular
+25
-22
@@ -147,20 +147,20 @@ func CreateCategoryGroup(c *gin.Context) {
|
||||
if strings.Contains(fmt.Sprint(err), "given some values is empty") {
|
||||
ErrorLog.Printf("createcategorygroup mandatory field error: %s", err)
|
||||
c.SetCookie("Alert-msg", "Pleaseenterthemandatoryfields", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/categories/")
|
||||
c.Redirect(301, "/admin/categories/")
|
||||
return
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
ErrorLog.Printf("createcategorygroup error: %s", perr)
|
||||
c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
c.Redirect(http.StatusMovedPermanently, "/categories/")
|
||||
c.Redirect(http.StatusMovedPermanently, "/admin/categories/")
|
||||
return
|
||||
}
|
||||
|
||||
c.SetCookie("get-toast", "Category Group Created Successfully", 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
c.Redirect(http.StatusMovedPermanently, "/categories/")
|
||||
c.Redirect(http.StatusMovedPermanently, "/admin/categories/")
|
||||
|
||||
}
|
||||
}
|
||||
@@ -175,9 +175,9 @@ func UpdateCategoryGroup(c *gin.Context) {
|
||||
|
||||
var url string
|
||||
if pageno != "" {
|
||||
url = "/categories?page=" + pageno
|
||||
url = "/admin/categories?page=" + pageno
|
||||
} else {
|
||||
url = "/categories/"
|
||||
url = "/admin/categories/"
|
||||
|
||||
}
|
||||
|
||||
@@ -232,9 +232,9 @@ func DeleteCategoryGroup(c *gin.Context) {
|
||||
|
||||
var url string
|
||||
if pageno != "" {
|
||||
url = "/categories?page=" + pageno
|
||||
url = "/admin/categories?page=" + pageno
|
||||
} else {
|
||||
url = "/categories/"
|
||||
url = "/admin/categories/"
|
||||
|
||||
}
|
||||
|
||||
@@ -321,8 +321,11 @@ func AddCategory(c *gin.Context) {
|
||||
uper, _ := NewAuth.IsGranted("Categories", auth.Update, TenantId)
|
||||
|
||||
dper, _ := NewAuth.IsGranted("Categories", auth.Delete, TenantId)
|
||||
|
||||
_, _, _, Total_categories, err := CategoryConfig.ListCategory(0, 0, cat.Filter(filter), parent_id, TenantId)
|
||||
|
||||
categorylist, _, _, _, _ := CategoryConfig.ListCategory(offset, limt, cat.Filter(filter), parent_id, TenantId)
|
||||
|
||||
if err != nil {
|
||||
ErrorLog.Printf("categorylist error: %s", err)
|
||||
}
|
||||
@@ -424,7 +427,7 @@ func AddSubCategory(c *gin.Context) {
|
||||
uerr := storagecontroller.UploadCropImageS3(imageName, imagePath, imageByte)
|
||||
if uerr != nil {
|
||||
c.SetCookie("Alert-msg", "ERRORAWScredentialsnotfound", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/categories/")
|
||||
c.Redirect(301, "/admin/categories/")
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -456,20 +459,20 @@ func AddSubCategory(c *gin.Context) {
|
||||
if strings.Contains(fmt.Sprint(err), "given some values is empty") {
|
||||
ErrorLog.Printf("Addsubcategory mandatory field error: %s", perr)
|
||||
c.SetCookie("Alert-msg", "Pleaseenterthemandatoryfields", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/categories/")
|
||||
c.Redirect(301, "/admin/categories/")
|
||||
return
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
ErrorLog.Printf("Addsubcategory error: %s", perr)
|
||||
c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
c.Redirect(301, "/categories/addcategory/"+id)
|
||||
c.Redirect(301, "/admin/categories/addcategory/"+id)
|
||||
return
|
||||
}
|
||||
|
||||
c.SetCookie("get-toast", "Category Created Successfully", 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/categories/addcategory/"+id)
|
||||
c.Redirect(301, "/admin/categories/addcategory/"+id)
|
||||
|
||||
}
|
||||
}
|
||||
@@ -549,7 +552,7 @@ func UpdateSubCategory(c *gin.Context) {
|
||||
uerr := storagecontroller.UploadCropImageS3(imageName, imagePath, imageByte)
|
||||
if uerr != nil {
|
||||
c.SetCookie("Alert-msg", "ERRORAWScredentialsnotfound", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/categories/")
|
||||
c.Redirect(301, "/admin/categories/")
|
||||
return
|
||||
}
|
||||
} else {
|
||||
@@ -583,7 +586,7 @@ func UpdateSubCategory(c *gin.Context) {
|
||||
if strings.Contains(fmt.Sprint(err), "given some values is empty") {
|
||||
ErrorLog.Printf("updatesubcategory mandatory field error: %s", perr)
|
||||
c.SetCookie("Alert-msg", "Pleaseenterthemandatoryfields", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/categories/")
|
||||
c.Redirect(301, "/admin/categories/")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -612,9 +615,9 @@ func DeleteSubCategory(c *gin.Context) {
|
||||
var categoryid, _ = strconv.Atoi(c.Query("id"))
|
||||
userid := c.GetInt("userid")
|
||||
if pageno != "" {
|
||||
url = "/categories/addcategory/" + parent_id + "?page=" + pageno
|
||||
url = "/admin/categories/addcategory/" + parent_id + "?page=" + pageno
|
||||
} else {
|
||||
url = "/categories/addcategory/" + parent_id
|
||||
url = "/admin/categories/addcategory/" + parent_id
|
||||
|
||||
}
|
||||
|
||||
@@ -635,7 +638,7 @@ func DeleteSubCategory(c *gin.Context) {
|
||||
if strings.Contains(fmt.Sprint(err), "given some values is empty") {
|
||||
ErrorLog.Printf("deletesubcategory mandatory error:")
|
||||
c.SetCookie("Alert-msg", "Pleaseenterthemandatoryfields", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/categories/")
|
||||
c.Redirect(301, "/admin/categories/")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -765,15 +768,15 @@ func MultiSelectCategoryGroupDelete(c *gin.Context) {
|
||||
multi := page * 10
|
||||
multiInt64 := int64(multi)
|
||||
if Total_categories > multiInt64 {
|
||||
url = "/categories?page=" + pageno
|
||||
url = "/admin/categories?page=" + pageno
|
||||
} else {
|
||||
pagee, _ := strconv.Atoi(pageno)
|
||||
_page := pagee - 1
|
||||
pages := strconv.Itoa(_page)
|
||||
url = "/categories?page=" + pages
|
||||
url = "/admin/categories?page=" + pages
|
||||
}
|
||||
} else {
|
||||
url = "/categories/"
|
||||
url = "/admin/categories/"
|
||||
}
|
||||
c.JSON(200, gin.H{"value": true, "url": url})
|
||||
}
|
||||
@@ -821,15 +824,15 @@ func MultiSelectCategoryDelete(c *gin.Context) {
|
||||
multi := abc * 10
|
||||
multiInt64 := int64(multi)
|
||||
if Total_categories > multiInt64 {
|
||||
url = "/categories/addcategory/" + parent_id + "?page=" + pageno
|
||||
url = "/admin/categories/addcategory/" + parent_id + "?page=" + pageno
|
||||
} else {
|
||||
abcd, _ := strconv.Atoi(pageno)
|
||||
_page := abcd - 1
|
||||
pages := strconv.Itoa(_page)
|
||||
url = "/categories/addcategory/" + parent_id + "?page=" + pages
|
||||
url = "/admin/categories/addcategory/" + parent_id + "?page=" + pages
|
||||
}
|
||||
} else {
|
||||
url = "/categories/addcategory/" + parent_id
|
||||
url = "/admin/categories/addcategory/" + parent_id
|
||||
|
||||
}
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
+108
-105
@@ -11,12 +11,15 @@ import (
|
||||
"spurt-cms/models"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/google/uuid"
|
||||
"github.com/spurtcms/auth"
|
||||
"github.com/spurtcms/categories"
|
||||
chn "github.com/spurtcms/channels"
|
||||
csrf "github.com/utrack/gin-csrf"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
var CurrentPage int
|
||||
@@ -200,7 +203,7 @@ func DefaultChannelList(c *gin.Context) {
|
||||
|
||||
responseData, err := ChannelConfig.DefaultChannelList(endurl, Limit, offset, chn.Filter{Keyword: keyword})
|
||||
|
||||
fmt.Println(responseData)
|
||||
fmt.Println(responseData.Allchannellist, "channellistadd")
|
||||
var paginationendcount = responseData.BlockCount + offset
|
||||
paginationstartcount := offset + 1
|
||||
Previous, Next, PageCount, Page := Pagination(pageno, int(responseData.BlockCount), limt)
|
||||
@@ -292,7 +295,7 @@ func CreateChannel(c *gin.Context) {
|
||||
ErrorLog.Printf("fieldval unmarshal create channel error: %s", err2)
|
||||
}
|
||||
|
||||
if channelname == "" || channeldesc == "" {
|
||||
if channelname == "" {
|
||||
ErrorLog.Printf("create channel error mandatory field ")
|
||||
json.NewEncoder(c.Writer).Encode(false)
|
||||
return
|
||||
@@ -675,9 +678,9 @@ func DeleteChannel(c *gin.Context) {
|
||||
|
||||
var url string
|
||||
if pageno != "" {
|
||||
url = "/channels/?page=" + pageno
|
||||
url = "/admin/channels/?page=" + pageno
|
||||
} else {
|
||||
url = "/channels/"
|
||||
url = "/admin/channels/"
|
||||
|
||||
}
|
||||
|
||||
@@ -697,7 +700,7 @@ func DeleteChannel(c *gin.Context) {
|
||||
|
||||
ModuleName := strconv.Itoa(channelid)
|
||||
|
||||
routename := "/entries/entrylist/" + ModuleName
|
||||
routename := "/admin/entries/entrylist/" + ModuleName
|
||||
|
||||
err := ChannelConfig.DeleteChannel(channelid, userid, routename, TenantId)
|
||||
|
||||
@@ -708,6 +711,12 @@ func DeleteChannel(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
perr := ChannelConfig.DeleteChannelPermissions(channelid, TenantId)
|
||||
|
||||
if perr != nil {
|
||||
|
||||
fmt.Println(perr)
|
||||
}
|
||||
c.SetCookie("get-toast", "Channel Deleted Successfully", 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
c.Redirect(301, url)
|
||||
@@ -807,7 +816,14 @@ func ChannelType(c *gin.Context) {
|
||||
}
|
||||
c.SetCookie("get-toast", "ChannelType Changed Successfully", 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/channels/")
|
||||
c.Redirect(301, "/admin/channels/")
|
||||
}
|
||||
|
||||
type channeldetailsresponse struct {
|
||||
Channeldetail chn.Tblchannel `json:"channeldetail"`
|
||||
Channelsection []chn.Section `json:"channelsection"`
|
||||
Channelfields []chn.Fiedlvalue `json:"channelfields"`
|
||||
Channelcategories []categories.Arrangecategories `json:"channelcategories"`
|
||||
}
|
||||
|
||||
func AddChannelTomyCollection(c *gin.Context) {
|
||||
@@ -852,9 +868,6 @@ func AddChannelTomyCollection(c *gin.Context) {
|
||||
defer resp.Body.Close()
|
||||
}
|
||||
|
||||
type channeldetailsresponse struct {
|
||||
Channeldetail models.TblMstrchannel `json:"channeldetail"`
|
||||
}
|
||||
var responseData channeldetailsresponse
|
||||
var bodyBytes []byte
|
||||
if masterconnect {
|
||||
@@ -874,7 +887,7 @@ func AddChannelTomyCollection(c *gin.Context) {
|
||||
|
||||
if !masterconnect {
|
||||
responseData = channeldetailsresponse{
|
||||
Channeldetail: models.TblMstrchannel{},
|
||||
Channeldetail: chn.Tblchannel{},
|
||||
}
|
||||
}
|
||||
Entry := "Entries"
|
||||
@@ -882,64 +895,6 @@ func AddChannelTomyCollection(c *gin.Context) {
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
var fieldValuesMap = map[string][]chn.Fiedlvalue{
|
||||
"blog": {
|
||||
{FieldName: "Excerpt", FieldId: 1, IconPath: "/public/img/text.svg", OrderIndex: 1, Mandatory: 0, MasterFieldId: 2},
|
||||
{FieldName: "Author Bio", FieldId: 2, IconPath: "/public/img/text.svg", OrderIndex: 2, Mandatory: 0, MasterFieldId: 2},
|
||||
},
|
||||
"ecommerce": {
|
||||
{FieldName: "Price", FieldId: 1, IconPath: "/public/img/text.svg", OrderIndex: 1, Mandatory: 0, MasterFieldId: 2},
|
||||
{FieldName: "Special Price", FieldId: 2, IconPath: "/public/img/text.svg", OrderIndex: 2, Mandatory: 0, MasterFieldId: 2},
|
||||
{FieldName: "SKU", FieldId: 3, IconPath: "/public/img/text.svg", OrderIndex: 3, Mandatory: 0, MasterFieldId: 2},
|
||||
{FieldName: "Quantity", FieldId: 4, IconPath: "/public/img/text.svg", OrderIndex: 4, Mandatory: 0, MasterFieldId: 2},
|
||||
{FieldName: "Stock", FieldId: 5, IconPath: "/public/img/select.svg", OrderIndex: 5, Mandatory: 0, MasterFieldId: 5},
|
||||
},
|
||||
"appointment": {
|
||||
{FieldName: "Date", FieldId: 1, IconPath: "/public/img/date.svg", OrderIndex: 1, Mandatory: 0, MasterFieldId: 6},
|
||||
{FieldName: "Time", FieldId: 2, IconPath: "/public/img/date-time.svg", OrderIndex: 2, Mandatory: 0, MasterFieldId: 5},
|
||||
{FieldName: "Contact Number", FieldId: 3, IconPath: "/public/img/text.svg", OrderIndex: 3, Mandatory: 0, MasterFieldId: 2},
|
||||
{FieldName: "Email", FieldId: 4, IconPath: "/public/img/text.svg", OrderIndex: 4, Mandatory: 0, MasterFieldId: 2},
|
||||
{FieldName: "DOB/Age", FieldId: 5, IconPath: "/public/img/date-time.svg", OrderIndex: 5, Mandatory: 0, MasterFieldId: 2},
|
||||
},
|
||||
"event": {
|
||||
{FieldName: "Event Title", FieldId: 1, IconPath: "/public/img/text.svg", OrderIndex: 1, Mandatory: 0, MasterFieldId: 2},
|
||||
{FieldName: "Event Date", FieldId: 2, IconPath: "/public/img/date.svg", OrderIndex: 2, Mandatory: 0, MasterFieldId: 6},
|
||||
{FieldName: "Event Time", FieldId: 3, IconPath: "/public/img/date-time.svg", OrderIndex: 3, Mandatory: 0, MasterFieldId: 5},
|
||||
{FieldName: "Event Type", FieldId: 4, IconPath: "/public/img/select.svg", OrderIndex: 4, Mandatory: 0, MasterFieldId: 2},
|
||||
{FieldName: "Event Description", FieldId: 5, IconPath: "/public/img/text-area.svg", OrderIndex: 5, Mandatory: 0, MasterFieldId: 8},
|
||||
},
|
||||
"jobs": {
|
||||
{FieldName: "Key Responsibilities", FieldId: 1, IconPath: "/public/img/text.svg", OrderIndex: 1, Mandatory: 0, MasterFieldId: 2},
|
||||
{FieldName: "Job Type", FieldId: 2, IconPath: "/public/img/select.svg", OrderIndex: 2, Mandatory: 0, MasterFieldId: 5},
|
||||
{FieldName: "Salary Range", FieldId: 3, IconPath: "/public/img/text.svg", OrderIndex: 3, Mandatory: 0, MasterFieldId: 2},
|
||||
{FieldName: "Experience", FieldId: 5, IconPath: "/public/img/text.svg", OrderIndex: 5, Mandatory: 0, MasterFieldId: 2},
|
||||
},
|
||||
"news": {
|
||||
{FieldName: "Frequency", FieldId: 1, IconPath: "/public/img/select.svg", OrderIndex: 1, Mandatory: 0, MasterFieldId: 5},
|
||||
{FieldName: "Anchor/Host Details", FieldId: 2, IconPath: "/public/img/text-area.svg", OrderIndex: 2, Mandatory: 0, MasterFieldId: 2},
|
||||
{FieldName: "Coverage Scope", FieldId: 3, IconPath: "/public/img/select.svg", OrderIndex: 3, Mandatory: 0, MasterFieldId: 5},
|
||||
{FieldName: "Special Features", FieldId: 4, IconPath: "/public/img/select.svg", OrderIndex: 4, Mandatory: 0, MasterFieldId: 5},
|
||||
{FieldName: "Multimedia Support", FieldId: 5, IconPath: "/public/img/select.svg", OrderIndex: 5, Mandatory: 0, MasterFieldId: 2},
|
||||
},
|
||||
"knowledge-base": {
|
||||
{FieldName: "Version", FieldId: 1, IconPath: "/public/img/text.svg", OrderIndex: 1, Mandatory: 0, MasterFieldId: 2},
|
||||
{FieldName: "Summary", FieldId: 1, IconPath: "/public/img/text.svg", OrderIndex: 1, Mandatory: 0, MasterFieldId: 2},
|
||||
},
|
||||
"1:1call": {
|
||||
{FieldName: "Duration In(mins)", FieldId: 1, IconPath: "/public/img/text.svg", OrderIndex: 1, Mandatory: 0, MasterFieldId: 17},
|
||||
{FieldName: "Short Description", FieldId: 5, IconPath: "/public/img/text-area.svg", OrderIndex: 1, Mandatory: 0, MasterFieldId: 8},
|
||||
},
|
||||
}
|
||||
|
||||
// Define a map to store option values for select fields
|
||||
var fieldOptionsMap = map[string][]string{
|
||||
"Stock": {"In Stock", "Out of Stock"},
|
||||
"Event Type": {"Webinar", "Conference", "Workshop"},
|
||||
"Job Type": {"Full-Time", "Part-Time", "Contract", "Internship"},
|
||||
"Frequency": {"24/7", "Daily", "Weekly"},
|
||||
"Coverage Scope": {"Local", "International"},
|
||||
"Special Features": {"Debates", "Expert Panels", "Investigative Reports"},
|
||||
}
|
||||
|
||||
type field struct {
|
||||
Fiedlvalue []Fiedlvalue `json:"fiedlvalue"`
|
||||
@@ -947,10 +902,10 @@ func AddChannelTomyCollection(c *gin.Context) {
|
||||
|
||||
// channeldetails, _, err := ChannelConfig.GetChannelsById(id, -1)
|
||||
channeldetails := responseData.Channeldetail
|
||||
channellist, _ := ChannelConfig.GetchannelByName(channeldetails.ChannelName, TenantId)
|
||||
channellist, _ := ChannelConfig.GetchannelByName(strings.ToLower(channeldetails.ChannelName), TenantId)
|
||||
var CollectionCount int
|
||||
|
||||
if channeldetails.ChannelName == channellist.ChannelName {
|
||||
if strings.EqualFold(channeldetails.ChannelName, channellist.ChannelName) {
|
||||
|
||||
CollectionCount = channellist.CollectionCount + 1
|
||||
CollectionCountstring := strconv.Itoa(CollectionCount)
|
||||
@@ -974,47 +929,51 @@ func AddChannelTomyCollection(c *gin.Context) {
|
||||
|
||||
var FieldValuesss []chn.Fiedlvalue
|
||||
|
||||
// Check if the channel slug exists in the map
|
||||
if fieldValues, ok := fieldValuesMap[channeldetails.SlugName]; ok {
|
||||
for _, val := range fieldValues {
|
||||
var fieldval chn.Fiedlvalue
|
||||
fieldval.CharacterAllowed = 0 // Assign default if needed
|
||||
fieldval.DateFormat = "" // Assign default if needed
|
||||
fieldval.FieldId = val.FieldId
|
||||
fieldval.FieldName = val.FieldName
|
||||
fieldval.IconPath = val.IconPath
|
||||
fieldval.MasterFieldId = val.MasterFieldId // Assign default if needed
|
||||
fieldval.NewFieldId = 0 // Assign default if needed
|
||||
fieldval.OrderIndex = val.OrderIndex
|
||||
fieldval.SectionId = 0 // Assign default if needed
|
||||
fieldval.SectionNewId = 0 // Assign default if needed
|
||||
fieldval.TimeFormat = "" // Assign default if needed
|
||||
fieldval.Url = "" // Assign default if needed
|
||||
fieldval.Mandatory = val.Mandatory
|
||||
for _, val := range responseData.Channelfields {
|
||||
var fieldval chn.Fiedlvalue
|
||||
fieldval.CharacterAllowed = val.CharacterAllowed
|
||||
fieldval.DateFormat = val.DateFormat
|
||||
fieldval.FieldId = val.FieldId
|
||||
fieldval.FieldName = val.FieldName
|
||||
fieldval.IconPath = val.IconPath
|
||||
fieldval.MasterFieldId = val.MasterFieldId
|
||||
fieldval.NewFieldId = val.NewFieldId
|
||||
fieldval.OrderIndex = val.OrderIndex
|
||||
fieldval.SectionId = val.SectionId
|
||||
fieldval.SectionNewId = val.SectionNewId
|
||||
fieldval.TimeFormat = val.TimeFormat
|
||||
fieldval.Url = val.Url
|
||||
fieldval.Mandatory = val.Mandatory
|
||||
|
||||
// Assign option values if applicable
|
||||
if options, ok := fieldOptionsMap[fieldval.FieldName]; ok {
|
||||
|
||||
fmt.Println("checkoptionssd")
|
||||
var choptions []chn.OptionValues
|
||||
for _, opt := range options {
|
||||
var optss chn.OptionValues
|
||||
optss.Value = opt
|
||||
choptions = append(choptions, optss)
|
||||
}
|
||||
fieldval.OptionValue = choptions
|
||||
}
|
||||
|
||||
FieldValuesss = append(FieldValuesss, fieldval)
|
||||
var choptions []chn.OptionValues
|
||||
for _, opt := range val.OptionValue {
|
||||
var optss chn.OptionValues
|
||||
optss.FieldId = opt.FieldId
|
||||
optss.Id = opt.Id
|
||||
optss.NewFieldId = opt.NewFieldId
|
||||
optss.NewId = opt.NewId
|
||||
optss.Value = opt.Value
|
||||
optss.OrderIndex = opt.OrderIndex
|
||||
choptions = append(choptions, optss)
|
||||
}
|
||||
|
||||
fieldval.OptionValue = choptions
|
||||
FieldValuesss = append(FieldValuesss, fieldval)
|
||||
|
||||
}
|
||||
|
||||
userid := c.GetInt("userid")
|
||||
|
||||
// InsertCategoriesForSlug(DB, channeldetails.SlugName, userid, TenantId)
|
||||
|
||||
err1 := InsertChannelCategories(DB, responseData, userid, TenantId)
|
||||
if err1 != nil {
|
||||
fmt.Println("Error inserting categories: ", err)
|
||||
}
|
||||
categoryvalue, _ := getCategoryIds(channeldetails.SlugName, TenantId)
|
||||
|
||||
if permisison {
|
||||
|
||||
userid := c.GetInt("userid")
|
||||
|
||||
uuid := (uuid.New()).String()
|
||||
|
||||
arr := strings.Split(uuid, "-")
|
||||
@@ -1038,11 +997,55 @@ func AddChannelTomyCollection(c *gin.Context) {
|
||||
|
||||
c.SetCookie("get-toast", "Collection Added Successfully", 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/channels")
|
||||
c.Redirect(301, "/admin/channels")
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
type CatgoriesOrd struct {
|
||||
Id int
|
||||
Category string
|
||||
}
|
||||
|
||||
func InsertChannelCategories(db *gorm.DB, resp channeldetailsresponse, createdBy int, tenantID string) error {
|
||||
for _, arr := range resp.Channelcategories {
|
||||
|
||||
if err := InsertCategoryPath(db, arr.Categories, createdBy, tenantID); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func InsertCategoryPath(db *gorm.DB, path []categories.CatgoriesOrd, createdBy int, tenantID string) error {
|
||||
parentID := 0
|
||||
for _, cat := range path {
|
||||
var existing categories.TblCategories
|
||||
err := db.Where("category_name = ? AND tenant_id = ? AND parent_id = ? AND is_deleted = 0",
|
||||
cat.Category, tenantID, parentID).First(&existing).Error
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
newCat := categories.TblCategories{
|
||||
CategoryName: cat.Category,
|
||||
CategorySlug: strings.ReplaceAll(strings.ToLower(cat.Category), " ", "_"),
|
||||
CreatedOn: time.Now().UTC(),
|
||||
CreatedBy: createdBy,
|
||||
IsDeleted: 0,
|
||||
ParentId: parentID,
|
||||
TenantId: tenantID,
|
||||
Description: cat.Category,
|
||||
}
|
||||
if err := db.Create(&newCat).Error; err != nil {
|
||||
return err
|
||||
}
|
||||
parentID = newCat.Id
|
||||
} else if err != nil {
|
||||
return err
|
||||
} else {
|
||||
parentID = existing.Id
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func CloneChannels(c *gin.Context) {
|
||||
|
||||
id, _ := strconv.Atoi(c.Param("id"))
|
||||
@@ -1180,7 +1183,7 @@ func CloneChannels(c *gin.Context) {
|
||||
|
||||
c.SetCookie("get-toast", "Collection Cloned Successfully", 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/channels")
|
||||
c.Redirect(301, "/admin/channels")
|
||||
|
||||
}
|
||||
}
|
||||
Executable → Regular
+124
-19
@@ -114,9 +114,13 @@ func GenerateEmail(email, subject string, data map[string]interface{}, message s
|
||||
// Set up the SMTP server configuration.
|
||||
// auth := smtp.PlainAuth("", os.Getenv("MAIL_USERNAME"), os.Getenv("MAIL_PASSWORD"), smtpHost)
|
||||
auth := smtp.PlainAuth("", Mail, Password, Host)
|
||||
senderDisplayName := "Spurtcms"
|
||||
fromHeader := fmt.Sprintf("%s <%s>", senderDisplayName, Mail)
|
||||
emailBody := fmt.Sprintf("From: %s\r\nTo: %s\r\nSubject: %s\r\nContent-Type: %s; charset=UTF-8\r\n\r\n%s",
|
||||
fromHeader, email, subject, contentType, result)
|
||||
|
||||
// Compose the email.
|
||||
emailBody := fmt.Sprintf("From: %s\r\nTo: %s\r\nSubject: %s\r\nContent-Type: %s; charset=UTF-8\r\n\r\n%s", Mail, email, subject, contentType, result)
|
||||
// emailBody := fmt.Sprintf("From: %s\r\nTo: %s\r\nSubject: %s\r\nContent-Type: %s; charset=UTF-8\r\n\r\n%s", Mail, email, subject, contentType, result)
|
||||
|
||||
// Connect to the SMTP server and send the email.
|
||||
// err := smtp.SendMail(smtpHost+":"+smtpPort, auth, from, []string{email}, []byte(emailBody))
|
||||
@@ -298,16 +302,37 @@ func DocumentConvertBase64toByte(file *multipart.FileHeader) (documentName strin
|
||||
}
|
||||
func ConvertBase64toByte(imageData string, storagepath string) (imgname string, path string, imagebyte []byte, err error) {
|
||||
|
||||
extEndIndex := strings.Index(imageData, ";base64,")
|
||||
base64data := imageData[strings.IndexByte(imageData, ',')+1:]
|
||||
var ext = imageData[11:extEndIndex]
|
||||
rand_num := strconv.Itoa(int(time.Now().Unix()))
|
||||
imageName := "IMG-" + rand_num + "." + ext
|
||||
storagePath := storagepath + "/IMG-" + rand_num + "." + ext
|
||||
decode, err := base64.StdEncoding.DecodeString(base64data)
|
||||
metaEnd := strings.Index(imageData, ";base64,")
|
||||
if metaEnd == -1 {
|
||||
err = errors.New("invalid base64 image data: missing ';base64,'")
|
||||
return "", "", nil, err
|
||||
}
|
||||
|
||||
metaStart := strings.Index(imageData, "data:image/")
|
||||
if metaStart == -1 {
|
||||
err = errors.New("invalid base64 image data: missing 'data:image/'")
|
||||
return "", "", nil, err
|
||||
}
|
||||
|
||||
ext := imageData[metaStart+11 : metaEnd]
|
||||
if ext == "" {
|
||||
err = errors.New("could not extract image extension")
|
||||
return "", "", nil, err
|
||||
}
|
||||
|
||||
base64data := imageData[metaEnd+8:]
|
||||
if base64data == "" {
|
||||
err = errors.New("no base64 data found")
|
||||
return "", "", nil, err
|
||||
}
|
||||
|
||||
randNum := strconv.FormatInt(time.Now().UnixNano(), 10)
|
||||
imageName := "IMG-" + randNum + "." + ext
|
||||
storagePath := strings.TrimRight(storagepath, "/") + "/" + imageName
|
||||
|
||||
decode, err := base64.StdEncoding.DecodeString(base64data)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return "", "", nil, fmt.Errorf("base64 decode error: %w", err)
|
||||
}
|
||||
|
||||
return imageName, storagePath, decode, nil
|
||||
@@ -441,7 +466,6 @@ func Superadminnotificatin(wg *sync.WaitGroup, data map[string]interface{}, emai
|
||||
var templates models.TblEmailTemplate
|
||||
models.GetTemplates(&templates, "Superadminnotification", "")
|
||||
|
||||
fmt.Println("new template", templates)
|
||||
if templates.IsActive == 1 {
|
||||
sub := templates.TemplateSubject
|
||||
msg := templates.TemplateMessage
|
||||
@@ -474,7 +498,6 @@ func Registereduserloginalert(wg *sync.WaitGroup, data map[string]interface{}, e
|
||||
var templates models.TblEmailTemplate
|
||||
models.GetTemplates(&templates, "registereduserlogin", "")
|
||||
|
||||
fmt.Println("new template", templates)
|
||||
if templates.IsActive == 1 {
|
||||
sub := templates.TemplateSubject
|
||||
msg := templates.TemplateMessage
|
||||
@@ -590,6 +613,48 @@ func MemberCreateEmail(Chan chan<- string, wg *sync.WaitGroup, data map[string]i
|
||||
|
||||
}
|
||||
|
||||
func SupportEmail(Chan chan<- string, wg *sync.WaitGroup, data map[string]interface{}, email string, tenantid string) {
|
||||
|
||||
var templates models.TblEmailTemplate
|
||||
models.GetTemplates(&templates, "SupportEmail", "")
|
||||
|
||||
if templates.IsActive == 1 {
|
||||
|
||||
sub := templates.TemplateSubject
|
||||
msg := templates.TemplateMessage
|
||||
|
||||
replacer := strings.NewReplacer(
|
||||
"{Service}", data["service"].(string),
|
||||
"{FirstName}", data["fname"].(string),
|
||||
"{Useremail}", data["email"].(string),
|
||||
"{Number}", data["number"].(string),
|
||||
"{Timestamp}", data["timezone"].(string),
|
||||
"{Country}", data["Country"].(string),
|
||||
"{Describe}", data["describe"].(string),
|
||||
"{AdminLogo}", data["admin_logo"].(string),
|
||||
"{FbLogo}", data["fb_logo"].(string),
|
||||
"{LinkedinLogo}", data["linkedin_logo"].(string),
|
||||
"{TwitterLogo}", data["twitter_logo"].(string),
|
||||
"{YoutubeLogo}", data["youtube_logo"].(string),
|
||||
"{InstaLogo}", data["insta_log"].(string),
|
||||
"{FacebookLink}", data["facebook"].(string),
|
||||
"{InstagramLink}", data["instagram"].(string),
|
||||
"{YoutubeLink}", data["youtube"].(string),
|
||||
"{LinkedinLink}", data["linkedin"].(string),
|
||||
"{TwitterLink}", data["twitter"].(string),
|
||||
)
|
||||
|
||||
msg = replacer.Replace(msg)
|
||||
|
||||
Superadminemail := Superaddminmail()
|
||||
GenerateEmail(Superadminemail, sub, data, msg, wg)
|
||||
|
||||
// // test
|
||||
// GenerateEmail("nithyar396@gmail.com", sub, data, msg, wg)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func SupportuserEmail(Chan chan<- string, wg *sync.WaitGroup, data map[string]interface{}, email string, tenantid string) {
|
||||
|
||||
var templates models.TblEmailTemplate
|
||||
@@ -845,6 +910,17 @@ func ModuleRouteName(c *gin.Context) (modulename string, tabname string, modulei
|
||||
|
||||
routeName = "/user/"
|
||||
}
|
||||
|
||||
if strings.Contains(routeName, "/usergroup/") {
|
||||
|
||||
routeName = "/usergroup/"
|
||||
}
|
||||
|
||||
if strings.Contains(routeName, "/categories/") {
|
||||
|
||||
routeName = "/categories/"
|
||||
}
|
||||
|
||||
if strings.Contains(routeName, "/channels/") {
|
||||
|
||||
routeName = "/channels/"
|
||||
@@ -938,6 +1014,18 @@ func ModuleRouteName(c *gin.Context) (modulename string, tabname string, modulei
|
||||
|
||||
}
|
||||
|
||||
if strings.Contains(routeName, "listing") {
|
||||
|
||||
routeName = "/listing"
|
||||
|
||||
}
|
||||
|
||||
if strings.Contains(routeName, "/website") {
|
||||
|
||||
routeName = "/website"
|
||||
|
||||
}
|
||||
|
||||
for _, val := range menu.TblModule {
|
||||
|
||||
for _, val1 := range val.SubModule {
|
||||
@@ -1143,13 +1231,14 @@ func EditroImageSave(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
if extension == ".pdf" || extension == ".doc" || extension == ".docx" || extension == ".txt" {
|
||||
switch extension {
|
||||
case ".pdf", ".doc", ".docx", ".txt", ".zip":
|
||||
|
||||
documentPath = baseurl + "document-access?name=" + documentPath
|
||||
|
||||
c.JSON(200, gin.H{"documentpath": documentPath, "documentname": documentName})
|
||||
|
||||
} else if extension == ".jpg" || extension == ".jpeg" || extension == ".png" || extension == ".gif" {
|
||||
case ".jpg", ".jpeg", ".png", ".gif":
|
||||
|
||||
documentPath = baseurl + "image-resize?name=" + documentPath
|
||||
|
||||
@@ -1204,9 +1293,9 @@ func CreateTenantDefaultData(userId int, tenantId string) error {
|
||||
scanner := bufio.NewScanner(file)
|
||||
|
||||
var (
|
||||
defChildCatId, defParentCatId, tagId, defChanId, subparentid, parentKnowledgeBaseId, parentBlogId, parentjobsId, templateModuleId, channelId, moduleId, blogChanId, jobsChanId int
|
||||
defBlockIds []int
|
||||
blockDynamicRetrieve bool
|
||||
defChildCatId, defParentCatId, tagId, defChanId, subparentid, parentKnowledgeBaseId, parentBlogId, parentjobsId, templateModuleId, channelId, moduleId, blogChanId, jobsChanId, coursecatid, courseId int
|
||||
defBlockIds []int
|
||||
blockDynamicRetrieve bool
|
||||
)
|
||||
|
||||
for scanner.Scan() {
|
||||
@@ -1539,6 +1628,24 @@ func CreateTenantDefaultData(userId int, tenantId string) error {
|
||||
query = strings.ReplaceAll(query, "ch_id", strconv.Itoa(channelId))
|
||||
}
|
||||
|
||||
if strings.Contains(lowerQuery, "tbl_courses") {
|
||||
|
||||
err = db.Table("tbl_categories").Where("category_slug='engineering' and tenant_id=?", tenantId).Pluck("id", &coursecatid).Error
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
query = strings.ReplaceAll(query, "co_id", strconv.Itoa(coursecatid))
|
||||
}
|
||||
|
||||
if strings.Contains(lowerQuery, "tbl_course_settings") {
|
||||
|
||||
err = db.Table("tbl_courses").Where("title= ? and tenant_id=?", "Default Course", tenantId).Pluck("id", &courseId).Error
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
query = strings.ReplaceAll(query, "cos_id", strconv.Itoa(courseId))
|
||||
}
|
||||
|
||||
replacer := strings.NewReplacer("u_id", strconv.Itoa(userId), "tid", tenantId, "current-time", timeStamp, "duid", Uuid)
|
||||
|
||||
finalQuery := replacer.Replace(query)
|
||||
@@ -1590,8 +1697,6 @@ func CreateTenantDefaultData(userId int, tenantId string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
fmt.Println("Fetched Channel IDs:", channelIds)
|
||||
|
||||
channelFields := map[string][]Field{
|
||||
"blog": {
|
||||
{"Excerpt", 2, 1, "/public/img/text.svg", tenantId, userId, currentTime},
|
||||
@@ -1669,7 +1774,7 @@ func CreateTenantDefaultData(userId int, tenantId string) error {
|
||||
|
||||
fields := channelFields[channelSlug]
|
||||
if len(fields) == 0 {
|
||||
fmt.Printf("No fields Channel ID %d (%s)\n", channelId, channelSlug)
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
+58
-1
@@ -2,11 +2,13 @@ package controllers
|
||||
|
||||
import (
|
||||
"sort"
|
||||
"spurt-cms/models"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
chn "github.com/spurtcms/channels"
|
||||
formbuilders "github.com/spurtcms/forms-builders"
|
||||
mem "github.com/spurtcms/member"
|
||||
csrf "github.com/utrack/gin-csrf"
|
||||
)
|
||||
@@ -27,6 +29,8 @@ func DashboardView(c *gin.Context) {
|
||||
newEntries []chn.Tblchannelentries
|
||||
allchnentry []chn.Tblchannelentries
|
||||
chaid int
|
||||
newblocks []models.TblBlock
|
||||
newformlist []formbuilders.TblForms
|
||||
usercount int
|
||||
Newusercount int
|
||||
membercount int
|
||||
@@ -40,6 +44,7 @@ func DashboardView(c *gin.Context) {
|
||||
membercount, Newmembercount, _ = MemberConfigWP.DashboardMemberCount(TenantId)
|
||||
|
||||
Totalentris, Newentrycount, _ := ChannelConfigWP.DashboardEntriesCount(TenantId)
|
||||
Totalblock, Newblockcount, _ := BlockConfig.DashBoardBlockCount(TenantId)
|
||||
|
||||
// Pagescount, Newpagescount, _ := CoursesConfigWP.DashboardPagesCount()
|
||||
|
||||
@@ -120,6 +125,49 @@ func DashboardView(c *gin.Context) {
|
||||
newEntries = append(newEntries, allchnentry[i])
|
||||
}
|
||||
|
||||
BlockConfig.UserId = c.GetInt("userid")
|
||||
// BlockConfig.DataAccess =
|
||||
// blocklist, _, _ := BlockConfig.BlockList(100, 0, blocks.Filter{}, TenantId)
|
||||
|
||||
blocklist, _, _ := models.BlockLists(100, 0, models.Filter{}, TenantId)
|
||||
|
||||
var allblocks []models.TblBlock
|
||||
|
||||
for _, block := range blocklist {
|
||||
|
||||
block.CreatedDate = block.CreatedOn.In(TZONE).Format(Datelayout)
|
||||
if !block.ModifiedOn.IsZero() {
|
||||
block.ModifiedDate = block.ModifiedOn.In(TZONE).Format(Datelayout)
|
||||
} else {
|
||||
block.ModifiedDate = block.CreatedOn.In(TZONE).Format(Datelayout)
|
||||
}
|
||||
allblocks = append(allblocks, block)
|
||||
}
|
||||
|
||||
for i := 0; i < len(allblocks) && i < maxLength; i++ {
|
||||
newblocks = append(newblocks, allblocks[i])
|
||||
}
|
||||
|
||||
Formlist, _, _, _ := FormConfig.FormBuildersList(100, 0, formbuilders.Filter{}, TenantId, 1, 0, "", 0)
|
||||
|
||||
var allformlist []formbuilders.TblForms
|
||||
|
||||
for _, form := range Formlist {
|
||||
|
||||
form.CreatedDate = form.CreatedOn.In(TZONE).Format(Datelayout)
|
||||
if !form.ModifiedOn.IsZero() {
|
||||
form.ModifiedDate = form.ModifiedOn.In(TZONE).Format(Datelayout)
|
||||
} else {
|
||||
form.ModifiedDate = form.CreatedOn.In(TZONE).Format(Datelayout)
|
||||
}
|
||||
allformlist = append(allformlist, form)
|
||||
}
|
||||
|
||||
for i := 0; i < len(allformlist) && i < maxLength; i++ {
|
||||
newformlist = append(newformlist, allformlist[i])
|
||||
}
|
||||
// mostlyviewlist, _ := CoursesConfigWP.MostlyViewList(MLimit, TenantId)
|
||||
// recentlyviewlist, _ := CoursesConfigWP.RecentlyViewList(MLimit, TenantId)
|
||||
activememberlist, _ := MemberConfigWP.ActiveMemberList(MLimit, TenantId)
|
||||
|
||||
var activememberlist1 []mem.Tblmember
|
||||
@@ -131,7 +179,16 @@ func DashboardView(c *gin.Context) {
|
||||
|
||||
translate, _ := TranslateHandler(c)
|
||||
|
||||
c.HTML(200, "dashboard.html", gin.H{"Menu": menu, "csrf": csrf.GetToken(c), "translate": translate, "memberlist": memlist, "recentactivity": NewActive, "Lastlogin": Lastlogin[user_id], "channelslist": topsix_channels, "newentries": newEntries, "usercount": usercount, "Newusercount": Newusercount, "membercount": membercount, "Newmembercount": Newmembercount, "entriscount": Totalentris, "Newentrycount": Newentrycount, "HeadTitle": translate.Dashboard, "title": translate.Dashboard, "linktitle": "Dashboard", "activememberlist": activememberlist1, "Dashboardmenu": true})
|
||||
userdata, _, _ := NewTeam.GetUserById(user_id, []int{})
|
||||
|
||||
if !userdata.LastLogin.IsZero() {
|
||||
Lastactive := userdata.LastLogin.In(TZONE).Format(Datelayout)
|
||||
Lastlogin[user_id] = Lastactive
|
||||
} else {
|
||||
Lastlogin[user_id] = "--"
|
||||
}
|
||||
|
||||
c.HTML(200, "dashboard.html", gin.H{"Menu": menu, "csrf": csrf.GetToken(c), "translate": translate, "memberlist": memlist, "recentactivity": NewActive, "Lastlogin": Lastlogin[user_id], "channelslist": topsix_channels, "newentries": newEntries, "usercount": usercount, "Newusercount": Newusercount, "membercount": membercount, "Newmembercount": Newmembercount, "entriscount": Totalentris, "Newentrycount": Newentrycount, "HeadTitle": translate.Dashboard, "title": translate.Dashboard, "linktitle": "Dashboard", "activememberlist": activememberlist1, "Dashboardmenu": true, "blockcount": Totalblock, "newblockcount": Newblockcount, "Blocklist": newblocks, "Formlist": newformlist})
|
||||
|
||||
}
|
||||
|
||||
Executable → Regular
+1
-1
@@ -1122,7 +1122,7 @@ func DownloaderrXlsx(c *gin.Context) {
|
||||
CoverImage: matchedpath,
|
||||
CreatedBy: user_id,
|
||||
}
|
||||
_, _, errmsg = ChannelConfig.CreateEntry(entries, TenantId)
|
||||
_, _, errmsg = ChannelConfig.CreateEntry(entries, TenantId, 0)
|
||||
|
||||
}
|
||||
|
||||
Executable → Regular
Executable → Regular
+3
-3
@@ -90,7 +90,7 @@ func UpdateTemplate(c *gin.Context) {
|
||||
|
||||
if c.PostForm("tempdesc") == "" || c.PostForm("tempsub") == "" || c.PostForm("temcont") == "" {
|
||||
c.SetCookie("Alert-msg", "Pleaseenterthemandatoryfields", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/settings/emails/")
|
||||
c.Redirect(301, "/admin/settings/emails/")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -107,9 +107,9 @@ func UpdateTemplate(c *gin.Context) {
|
||||
if pathname != "" {
|
||||
url = pathname
|
||||
} else if pageno != "" {
|
||||
url = "/settings/emails?page=" + pageno
|
||||
url = "/admin/settings/emails?page=" + pageno
|
||||
} else {
|
||||
url = "/settings/emails/"
|
||||
url = "/admin/settings/emails/"
|
||||
}
|
||||
|
||||
template.TemplateName = c.PostForm("tempname")
|
||||
Executable → Regular
+170
-214
@@ -21,6 +21,7 @@ import (
|
||||
chn "github.com/spurtcms/channels"
|
||||
forms "github.com/spurtcms/forms-builders"
|
||||
mem "github.com/spurtcms/member"
|
||||
memship "github.com/spurtcms/membership"
|
||||
"github.com/spurtcms/team"
|
||||
csrf "github.com/utrack/gin-csrf"
|
||||
)
|
||||
@@ -66,6 +67,7 @@ type EntriesFilter struct {
|
||||
Status string
|
||||
UserName string
|
||||
CategoryId string
|
||||
LanguageId int
|
||||
}
|
||||
|
||||
/*entries list*/
|
||||
@@ -89,7 +91,7 @@ func Entries(c *gin.Context) {
|
||||
pageno = 1
|
||||
}
|
||||
sorting := strings.TrimSpace(c.Query("sort"))
|
||||
channelname := strings.TrimSpace(c.Query("channelname"))
|
||||
LanguageId := strings.TrimSpace(c.Query("LanguageId"))
|
||||
entriestitle := strings.TrimSpace(c.Query("entriestitle"))
|
||||
status := strings.TrimSpace(c.Query("status"))
|
||||
|
||||
@@ -98,7 +100,7 @@ func Entries(c *gin.Context) {
|
||||
filters.ChannelName = strings.TrimSpace(c.Query("ChannelName"))
|
||||
filters.Title = strings.TrimSpace(c.Query("Title"))
|
||||
|
||||
filters.ChannelName = channelname
|
||||
filters.LanguageId, _ = strconv.Atoi(LanguageId)
|
||||
filters.Status = status
|
||||
|
||||
if limit == "" {
|
||||
@@ -116,37 +118,15 @@ func Entries(c *gin.Context) {
|
||||
ErrorLog.Printf("Entries get channel data error :%s", cerr)
|
||||
}
|
||||
|
||||
flag := true
|
||||
// flag := true
|
||||
|
||||
channelist, _, clerr := ChannelConfig.ListChannel(chn.Channels{Limit: 100, Offset: 0, IsActive: flag, TenantId: TenantId})
|
||||
channelist, clerr := ChannelConfig.GetPermissionChannel(TenantId)
|
||||
if clerr != nil {
|
||||
ErrorLog.Printf("channellist error :%s", clerr)
|
||||
ErrorLog.Printf(" Entry listchannel error: %s", clerr)
|
||||
}
|
||||
|
||||
// routeName := c.FullPath()
|
||||
|
||||
var htmlname string
|
||||
|
||||
// if strings.Contains(routeName, "entrylist") {
|
||||
|
||||
// filters.Status = "Published"
|
||||
|
||||
// htmlname = "entries.html"
|
||||
|
||||
// }
|
||||
// if strings.Contains(routeName, "unpublishentrieslist") {
|
||||
|
||||
// filters.Status = "Unpublished"
|
||||
|
||||
// htmlname = "entryunpublish.html"
|
||||
// }
|
||||
// if strings.Contains(routeName, "draftentrieslist") {
|
||||
|
||||
// filters.Status = "Draft"
|
||||
|
||||
// htmlname = "entrydraft.html"
|
||||
// }
|
||||
|
||||
var chnallist []chn.Tblchannel
|
||||
|
||||
for _, val := range channelist {
|
||||
@@ -172,7 +152,7 @@ func Entries(c *gin.Context) {
|
||||
ChannelConfig.DataAccess = c.GetInt("dataaccess")
|
||||
ChannelConfig.Userid = c.GetInt("userid")
|
||||
|
||||
chnentry, filtercount, _, _ := ChannelConfig.ChannelEntriesList(chn.Entries{ChannelId: id, Limit: limt, Offset: offset, Keyword: filters.Keyword, ChannelName: filters.ChannelName, Title: filters.Title, Status: filters.Status, Sorting: sorting, EntriesTitle: entriestitle}, TenantId)
|
||||
chnentry, filtercount, _, _ := ChannelConfig.ChannelEntriesList(chn.Entries{ChannelId: id, Limit: limt, Offset: offset, Keyword: filters.Keyword, ChannelName: filters.ChannelName, Title: filters.Title, Status: filters.Status, Sorting: sorting, EntriesTitle: entriestitle, LanguageId: filters.LanguageId}, TenantId)
|
||||
|
||||
// _, filtercount, _, _ := ChannelConfig.ChannelEntriesList(chn.Entries{ChannelId: id, Limit: 0, Offset: 0, Keyword: filters.Keyword, ChannelName: filters.ChannelName, Title: filters.Title, Status: filters.Status})
|
||||
|
||||
@@ -192,6 +172,9 @@ func Entries(c *gin.Context) {
|
||||
if entry.ProfileImagePath != "" {
|
||||
entry.ProfileImagePath = "/image-resize?name=" + entry.ProfileImagePath
|
||||
}
|
||||
entry.ChannelName = strings.ToLower(strings.ReplaceAll(entry.ChannelName, " ", "-"))
|
||||
|
||||
entry.Slug = entry.Slug + "-" + entry.Uuid
|
||||
_, _, responseCount, _ = FormConfig.FormBuildersList(limt, offset, forms.Filter{}, TenantId, 0, entry.Id, "", 0)
|
||||
// entry.ChannelName = ""
|
||||
allchnentry = append(allchnentry, entry)
|
||||
@@ -206,7 +189,7 @@ func Entries(c *gin.Context) {
|
||||
}
|
||||
|
||||
var filterflag bool
|
||||
if filters.Status != "" || entriestitle != "" || channelname != "" {
|
||||
if filters.Status != "" || entriestitle != "" || LanguageId != "" {
|
||||
filterflag = true
|
||||
} else {
|
||||
filterflag = false
|
||||
@@ -223,24 +206,12 @@ func Entries(c *gin.Context) {
|
||||
|
||||
viewurl := os.Getenv("VIEW_BASE_URL")
|
||||
|
||||
// if filters.Keyword == "" {
|
||||
|
||||
// unpublishroute = "/entries/unpublishentrieslist/" + c.Param("id")
|
||||
|
||||
// draftroute = "/entries/draftentrieslist/" + c.Param("id")
|
||||
|
||||
// publishroute = "/entries/entrylist/" + c.Param("id")
|
||||
|
||||
// } else {
|
||||
|
||||
// unpublishroute = "/entries/unpublishentrieslist/" + c.Param("id") + "?keyword=" + filters.Keyword
|
||||
|
||||
// draftroute = "/entries/draftentrieslist/" + c.Param("id") + "?keyword=" + filters.Keyword
|
||||
|
||||
// publishroute = "/entries/entrylist/" + c.Param("id") + "?keyword=" + filters.Keyword
|
||||
// }
|
||||
fmt.Println("htmlname", htmlname)
|
||||
|
||||
var language1 []models.TblLanguage
|
||||
|
||||
Language, _ := query.GetLanguageList(&language1, 0, 0, models.Filter{}, true, TenantId)
|
||||
|
||||
c.HTML(200, "entrieslist.html", gin.H{"Pagination": PaginationData{
|
||||
NextPage: pageno + 1,
|
||||
PreviousPage: pageno - 1,
|
||||
@@ -248,7 +219,7 @@ func Entries(c *gin.Context) {
|
||||
TwoAfter: pageno + 2,
|
||||
TwoBelow: pageno - 2,
|
||||
ThreeAfter: pageno + 3,
|
||||
}, "Viewbaseurl": viewurl, "Menu": menu, "linktitle": ModuleName, "chcount1": entrcount, "csrf": csrf.GetToken(c), "channelname": chnanem.ChannelName, "chnid": id, "ChanEntrtlist": allchnentry, "entrycount": entrcount, "Next": Next, "Previous": Previous, "PageCount": PageCount, "CurrentPage": pageno, "limit": limt, "paginationendcount": paginationendcount, "paginationstartcount": paginationstartcount, "filter": filters, "title": ModuleName, "heading": chnanem.ChannelName, "translate": translate, "channellist": chnallist, "Page": Page, "HeadTitle": translate.Channell.Channels, "chentrycount": filtercount, "Cmsmenu": true, "searchflag": searchflag, "filterflag": filterflag, "Entriestab": true, "Tabmenu": TabName, "StorageType": selectedtype.SelectedType, "unpublishroute": unpublishroute, "draftroute": draftroute, "publishroute": publishroute, "channelfilter": "true", "responseCount": responseCount, "ChannelName": channelname, "EntriesTitle": entriestitle, "Status": status})
|
||||
}, "Viewbaseurl": viewurl, "Menu": menu, "linktitle": ModuleName, "chcount1": entrcount, "csrf": csrf.GetToken(c), "channelname": chnanem.ChannelName, "chnid": id, "ChanEntrtlist": allchnentry, "entrycount": entrcount, "Next": Next, "Previous": Previous, "PageCount": PageCount, "CurrentPage": pageno, "limit": limt, "paginationendcount": paginationendcount, "paginationstartcount": paginationstartcount, "filter": filters, "title": ModuleName, "heading": chnanem.ChannelName, "translate": translate, "channellist": chnallist, "Page": Page, "HeadTitle": translate.Channell.Channels, "chentrycount": filtercount, "Cmsmenu": true, "searchflag": searchflag, "filterflag": filterflag, "Entriestab": true, "Tabmenu": TabName, "StorageType": selectedtype.SelectedType, "unpublishroute": unpublishroute, "draftroute": draftroute, "publishroute": publishroute, "channelfilter": "true", "responseCount": responseCount, "LanguageId": filters.LanguageId, "EntriesTitle": entriestitle, "Status": status, "Language": Language, "Sorting": sorting})
|
||||
|
||||
// }
|
||||
|
||||
@@ -261,15 +232,11 @@ func CreateEntry(c *gin.Context) {
|
||||
|
||||
id, _ := strconv.Atoi(c.Param("id"))
|
||||
|
||||
// flag := true
|
||||
|
||||
_, perr := NewAuth.IsGranted("Entries", auth.CRUD, TenantId)
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("create Entry authorization error: %s", perr)
|
||||
}
|
||||
|
||||
// if permisison {
|
||||
|
||||
channelist, clerr := ChannelConfig.GetPermissionChannel(TenantId)
|
||||
if clerr != nil {
|
||||
ErrorLog.Printf("create Entry listchannel error: %s", clerr)
|
||||
@@ -310,13 +277,8 @@ func CreateEntry(c *gin.Context) {
|
||||
translate, _ := TranslateHandler(c)
|
||||
menu := NewMenuController(c)
|
||||
|
||||
// Folder, File, Media, NextCont, merr := GetMedia()
|
||||
// if merr != nil {
|
||||
// ErrorLog.Printf("createEntry media error: %s", perr)
|
||||
// }
|
||||
var (
|
||||
filter blocks.Filter
|
||||
// collectionlist []blocks.TblBlock
|
||||
)
|
||||
|
||||
filter.Keyword = strings.Trim(c.DefaultQuery("keyword", ""), " ")
|
||||
@@ -327,12 +289,6 @@ func CreateEntry(c *gin.Context) {
|
||||
ErrorLog.Printf("block collection list authorization error: %s", perr)
|
||||
}
|
||||
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("block authorization error: %s", perr)
|
||||
c.Redirect(301, "/403-page")
|
||||
return
|
||||
}
|
||||
|
||||
var bytedata1 []byte
|
||||
|
||||
var bytedata2 []byte
|
||||
@@ -405,7 +361,6 @@ func CreateEntry(c *gin.Context) {
|
||||
|
||||
client := &http.Client{}
|
||||
resp, err := client.Do(req)
|
||||
|
||||
masterconnect := true
|
||||
|
||||
if err != nil || resp.StatusCode != http.StatusOK {
|
||||
@@ -439,19 +394,6 @@ func CreateEntry(c *gin.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
permisison, perr := NewAuth.IsGranted("Blocks", auth.CRUD, TenantId)
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("block collection list authorization error: %s", perr)
|
||||
c.Redirect(301, "/403-page")
|
||||
return
|
||||
}
|
||||
if !permisison {
|
||||
|
||||
ErrorLog.Printf("Block authorization error: %s", perr)
|
||||
c.Redirect(301, "/403-page")
|
||||
return
|
||||
}
|
||||
|
||||
blockBannerValue, _ := c.Cookie("blockbanner")
|
||||
if blockBannerValue == "" {
|
||||
blockBannerValue = "true"
|
||||
@@ -493,7 +435,7 @@ func CreateEntry(c *gin.Context) {
|
||||
if val.LastName != "" {
|
||||
lastn += strings.ToUpper(val.LastName[:1])
|
||||
}
|
||||
fmt.Println(val.FormImagePath, val.FormDescription, "getdetailsforms")
|
||||
|
||||
// NameString = firstn + lastn
|
||||
|
||||
FormsBuidlersList = append(FormsBuidlersList, val)
|
||||
@@ -515,19 +457,17 @@ func CreateEntry(c *gin.Context) {
|
||||
|
||||
ModuleName, _, _ := ModuleRouteName(c)
|
||||
|
||||
selectedchannel := channelist[len(channelist)-1]
|
||||
var slchannelid int
|
||||
|
||||
slchannelid := selectedchannel.Id
|
||||
if len(channelist) != 0 {
|
||||
|
||||
channelslist, _, err := ChannelConfig.ListChannel(chn.Channels{IsActive: false, CreateOnly: true, TenantId: TenantId})
|
||||
selectedchannel := channelist[len(channelist)-1]
|
||||
|
||||
c.HTML(200, "addentry.html", gin.H{"Menu": menu, "Ctalist": FormsBuidlersList, "EntryId": id, "linktitle": "Create Entry", "title": ModuleName, "Fields": field, "translate": translate, "csrf": csrf.GetToken(c), "channellist": channelist, "CategoryName": FinalSelectedCategories, "entrycount": entrcount, "HeadTitle": translate.Channell.Channels, "Cmsmenu": true, "Entriestab": true, "currentdate": cdate, "StorageType": selectedtype.SelectedType, "blocks": string(bytedata1), "defaultblocks": string(bytedata2), "channel": channelslist, "Mode": "create", "Slchannelid": slchannelid, "Storagepath": string(ubyte), "uploadurl": newpath})
|
||||
slchannelid = selectedchannel.Id
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// }
|
||||
|
||||
// c.Redirect(301, "/403-page")
|
||||
c.HTML(200, "addentry.html", gin.H{"Menu": menu, "Ctalist": FormsBuidlersList, "EntryId": id, "linktitle": "Create Entry", "title": ModuleName, "Fields": field, "translate": translate, "csrf": csrf.GetToken(c), "channellist": channelist, "CategoryName": FinalSelectedCategories, "entrycount": entrcount, "HeadTitle": translate.Channell.Channels, "Cmsmenu": true, "Entriestab": true, "currentdate": cdate, "StorageType": selectedtype.SelectedType, "blocks": string(bytedata1), "defaultblocks": string(bytedata2), "Mode": "create", "Slchannelid": slchannelid, "Storagepath": string(ubyte), "uploadurl": newpath})
|
||||
|
||||
}
|
||||
|
||||
@@ -554,6 +494,7 @@ func AllEntries(c *gin.Context) {
|
||||
channelname := strings.TrimSpace(c.Query("channelname"))
|
||||
entriestitle := strings.TrimSpace(c.Query("entriestitle"))
|
||||
status := strings.TrimSpace(c.Query("status"))
|
||||
LanguageId := strings.TrimSpace(c.Query("LanguageId"))
|
||||
|
||||
var filters EntriesFilter
|
||||
filters.Keyword = strings.TrimSpace(c.Query("keyword"))
|
||||
@@ -561,6 +502,7 @@ func AllEntries(c *gin.Context) {
|
||||
filters.ChannelName = strings.TrimSpace(c.Query("ChannelName"))
|
||||
filters.Title = strings.TrimSpace(c.Query("Title"))
|
||||
|
||||
filters.LanguageId, _ = strconv.Atoi(LanguageId)
|
||||
var searchflag bool
|
||||
if filters.Keyword != "" {
|
||||
searchflag = true
|
||||
@@ -592,33 +534,11 @@ func AllEntries(c *gin.Context) {
|
||||
entrystatus = status
|
||||
filters.ChannelName = channelname
|
||||
|
||||
var htmlname string
|
||||
|
||||
// if strings.Contains(routeName, "entrylist") {
|
||||
|
||||
// entrystatus = "Published"
|
||||
|
||||
// htmlname = "entries.html"
|
||||
|
||||
// }
|
||||
// if strings.Contains(routeName, "unpublishentries") {
|
||||
|
||||
// entrystatus = "Unpublished"
|
||||
|
||||
// htmlname = "entryunpublish.html"
|
||||
// }
|
||||
// if strings.Contains(routeName, "draftentries") {
|
||||
|
||||
// entrystatus = "Draft"
|
||||
|
||||
// htmlname = "entrydraft.html"
|
||||
// }
|
||||
|
||||
_, Totalentris, _, _ := ChannelConfig.ChannelEntriesList(chn.Entries{ChannelId: 0, Limit: 0, Offset: 0, Keyword: filters.Keyword, ChannelName: filters.ChannelName, Title: filters.Title, Status: entrystatus, Sorting: sorting, EntriesTitle: entriestitle}, TenantId)
|
||||
|
||||
_, Totalentris1, _, _ := ChannelConfig.ChannelEntriesList(chn.Entries{}, TenantId)
|
||||
|
||||
chlist, _, _, _ := ChannelConfig.ChannelEntriesList(chn.Entries{ChannelId: 0, Limit: limt, Offset: offset, Keyword: filters.Keyword, ChannelName: filters.ChannelName, Title: filters.Title, Status: entrystatus, Sorting: sorting, EntriesTitle: entriestitle}, TenantId)
|
||||
chlist, _, _, _ := ChannelConfig.ChannelEntriesList(chn.Entries{ChannelId: 0, Limit: limt, Offset: offset, Keyword: filters.Keyword, ChannelName: filters.ChannelName, Title: filters.Title, Status: entrystatus, Sorting: sorting, EntriesTitle: entriestitle, LanguageId: filters.LanguageId}, TenantId)
|
||||
|
||||
var chlist1 []chn.Tblchannelentries
|
||||
|
||||
@@ -665,6 +585,8 @@ func AllEntries(c *gin.Context) {
|
||||
|
||||
childrenlist1 = append(childrenlist1, val)
|
||||
}
|
||||
entry.ChannelName = strings.ToLower(strings.ReplaceAll(entry.ChannelName, " ", "-"))
|
||||
entry.Slug = entry.Slug + "-" + entry.Uuid
|
||||
entry.ChildrenList = childrenlist1
|
||||
|
||||
chlist1 = append(chlist1, entry)
|
||||
@@ -697,11 +619,19 @@ func AllEntries(c *gin.Context) {
|
||||
|
||||
viewurl := os.Getenv("VIEW_BASE_URL")
|
||||
|
||||
id, err := ChannelConfig.DefaultChannel("default_channel", TenantId)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
var id int
|
||||
|
||||
if len(channelist) != 0 {
|
||||
|
||||
selectedchannel := channelist[len(channelist)-1]
|
||||
|
||||
id = selectedchannel.Id
|
||||
|
||||
}
|
||||
fmt.Println("htmlname:", htmlname)
|
||||
|
||||
var language1 []models.TblLanguage
|
||||
|
||||
Language, _ := query.GetLanguageList(&language1, 0, 0, models.Filter{}, true, TenantId)
|
||||
|
||||
c.HTML(200, "entrieslist.html", gin.H{"Pagination": PaginationData{
|
||||
NextPage: pageno + 1,
|
||||
@@ -710,7 +640,7 @@ func AllEntries(c *gin.Context) {
|
||||
TwoAfter: pageno + 2,
|
||||
TwoBelow: pageno - 2,
|
||||
ThreeAfter: pageno + 3,
|
||||
}, "Viewbaseurl": viewurl, "Menu": menu, "translate": translate, "Page": Page, "chentrycount": Totalentris, "linktitle": ModuleName, "entrycount": Totalentris1, "Previous": Previous, "Next": Next, "PageCount": PageCount, "CurrentPage": pageno, "limit": limt, "paginationendcount": paginationendcount, "paginationstartcount": paginationstartcount, "filter": filters, "ChanEntrtlist": chlist1, "csrf": csrf.GetToken(c), "channellist": channelist, "title": ModuleName, "HeadTitle": translate.Channell.Channels, "Cmsmenu": true, "searchflag": searchflag, "filterflag": filterflag, "Entriestab": true, "Tabmenu": tabname, "StorageType": selectedtype.SelectedType, "chnid": id, "Membergroup": membergroup, "responseCount": responseCount, "Sorting": sorting, "ChannelName": channelname, "EntriesTitle": entriestitle, "Status": status})
|
||||
}, "Viewbaseurl": viewurl, "Menu": menu, "translate": translate, "Page": Page, "chentrycount": Totalentris, "linktitle": ModuleName, "entrycount": Totalentris1, "Previous": Previous, "Next": Next, "PageCount": PageCount, "CurrentPage": pageno, "limit": limt, "paginationendcount": paginationendcount, "paginationstartcount": paginationstartcount, "filter": filters, "ChanEntrtlist": chlist1, "csrf": csrf.GetToken(c), "channellist": channelist, "title": ModuleName, "HeadTitle": translate.Channell.Channels, "Cmsmenu": true, "searchflag": searchflag, "filterflag": filterflag, "Entriestab": true, "Tabmenu": tabname, "StorageType": selectedtype.SelectedType, "chnid": id, "Membergroup": membergroup, "responseCount": responseCount, "Sorting": sorting, "ChannelName": channelname, "EntriesTitle": entriestitle, "Status": status, "Language": Language, "LanguageId": filters.LanguageId})
|
||||
|
||||
}
|
||||
|
||||
@@ -733,17 +663,17 @@ func DeleteEntries(c *gin.Context) {
|
||||
|
||||
if pagename == "publish" {
|
||||
|
||||
route = "/entries/entrylist/"
|
||||
route = "/admin/entries/entrylist/"
|
||||
|
||||
}
|
||||
if pagename == "unpublish" {
|
||||
|
||||
route = "/entries/unpublishentries/"
|
||||
route = "/admin/entries/unpublishentries/"
|
||||
|
||||
}
|
||||
if pagename == "draft" {
|
||||
|
||||
route = "/entries/draftentries/"
|
||||
route = "/admin/entries/draftentries/"
|
||||
|
||||
}
|
||||
|
||||
@@ -791,6 +721,9 @@ func DeleteEntries(c *gin.Context) {
|
||||
|
||||
c.Redirect(301, url)
|
||||
|
||||
// }
|
||||
|
||||
// c.Redirect(301, "/403-page")
|
||||
|
||||
}
|
||||
|
||||
@@ -814,6 +747,7 @@ func EntryStatus(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
json.NewEncoder(c.Writer).Encode(true)
|
||||
|
||||
}
|
||||
|
||||
@@ -838,6 +772,7 @@ func PublishEntry(c *gin.Context) {
|
||||
status, _ := strconv.Atoi(c.Request.PostFormValue("status"))
|
||||
categoryids := c.PostFormArray("categoryids[]")
|
||||
membershiplevels := c.PostFormArray("membershiplevels[]")
|
||||
languageid, _ := strconv.Atoi(c.Request.PostFormValue("languageid"))
|
||||
|
||||
userid := c.GetInt("userid")
|
||||
ctaid, _ := strconv.Atoi(c.PostForm("ctaid"))
|
||||
@@ -887,6 +822,7 @@ func PublishEntry(c *gin.Context) {
|
||||
Excerpt: extxt,
|
||||
OrderIndex: orderindex,
|
||||
CtaId: ctaid,
|
||||
LanguageId: languageid,
|
||||
|
||||
SEODetails: chn.SEODetails{
|
||||
|
||||
@@ -943,7 +879,22 @@ func PublishEntry(c *gin.Context) {
|
||||
|
||||
}
|
||||
|
||||
if eid != 0 {
|
||||
entryies, _ := ChannelConfig.EntryDetailsById(chn.IndivEntriesReq{EntryId: eid}, TenantId)
|
||||
|
||||
fmt.Println("entryies:::", entryies.LanguageId)
|
||||
var Lang bool
|
||||
var ReferenceId = 0
|
||||
if entryies.LanguageId == languageid || entryies.LanguageId == 0 {
|
||||
|
||||
Lang = true
|
||||
|
||||
} else {
|
||||
|
||||
ReferenceId = entryies.Id
|
||||
|
||||
}
|
||||
|
||||
if eid != 0 && Lang {
|
||||
|
||||
entries.ModifiedBy = userid
|
||||
_, err := ChannelConfig.UpdateEntry(entries, cname, eid, TenantId)
|
||||
@@ -985,7 +936,7 @@ func PublishEntry(c *gin.Context) {
|
||||
|
||||
}
|
||||
entries.CreatedBy = userid
|
||||
chenid, _, err1 := ChannelConfig.CreateEntry(entries, TenantId)
|
||||
chenid, _, err1 := ChannelConfig.CreateEntry(entries, TenantId, ReferenceId)
|
||||
ChannelConfig.CreateChannelEntryFields(chenid.Id, userid, AdditionalFields, TenantId)
|
||||
channeldet, _, _ := ChannelConfig.GetChannelsById(chenid.ChannelId, TenantId)
|
||||
|
||||
@@ -1012,7 +963,6 @@ func PublishEntry(c *gin.Context) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
func EditEntry(c *gin.Context) {
|
||||
@@ -1020,13 +970,11 @@ func EditEntry(c *gin.Context) {
|
||||
flag := true
|
||||
id, _ := strconv.Atoi(c.Param("id"))
|
||||
entries, _ := ChannelConfig.EntryDetailsById(chn.IndivEntriesReq{EntryId: id}, TenantId)
|
||||
_, perr := NewAuth.IsGranted("Entries", auth.CRUD, TenantId)
|
||||
permission, perr := NewAuth.IsGranted("Entries", auth.CRUD, TenantId)
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("edit entry page authorization error: %s", perr)
|
||||
}
|
||||
|
||||
// if permisison {
|
||||
|
||||
channelist, _, cherr := ChannelConfig.ListChannel(chn.Channels{Limit: 100, Offset: 0, IsActive: flag, TenantId: TenantId})
|
||||
if cherr != nil {
|
||||
ErrorLog.Printf("edit entry get channel list error: %s", cherr)
|
||||
@@ -1040,127 +988,64 @@ func EditEntry(c *gin.Context) {
|
||||
AllCategorieswithSubCategories, _ := CategoryConfig.AllCategoriesWithSubList(TenantId)
|
||||
|
||||
menu := NewMenuController(c)
|
||||
|
||||
translate, _ := TranslateHandler(c)
|
||||
selectedtype, _ := GetSelectedType()
|
||||
var (
|
||||
filter blocks.Filter
|
||||
collectionlist []blocks.TblBlock
|
||||
)
|
||||
|
||||
permisison, perr := NewAuth.IsGranted("Blocks", auth.CRUD, TenantId)
|
||||
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("block collection list authorization error: %s", perr)
|
||||
}
|
||||
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("block authorization error: %s", perr)
|
||||
c.Redirect(301, "/403-page")
|
||||
return
|
||||
}
|
||||
// Get collection list
|
||||
var finalcollectionlist []blocks.TblBlock
|
||||
if permission, perr := NewAuth.IsGranted("Blocks", auth.CRUD, TenantId); permission {
|
||||
|
||||
if permisison {
|
||||
|
||||
BlockConfig.DataAccess = c.GetInt("dataaccess")
|
||||
BlockConfig.UserId = c.GetInt("userid")
|
||||
|
||||
collectionlist, _, err = BlockConfig.CollectionList(blocks.Filter(filter), TenantId, strconv.Itoa(id))
|
||||
|
||||
for _, value := range collectionlist {
|
||||
|
||||
img := value.CoverImage
|
||||
imgcontain := "/image-resize?name="
|
||||
flag := strings.Contains(img, imgcontain)
|
||||
if !flag {
|
||||
value.CoverImage = "/image-resize?name=" + value.CoverImage
|
||||
}
|
||||
|
||||
finalcollectionlist = append(finalcollectionlist, value)
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("blocks permission list error: %s", cherr)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
fmt.Println("collection list", err)
|
||||
}
|
||||
|
||||
var filter blocks.Filter
|
||||
finalcollectionlist, _ = FetchCollectionList(c, filter, TenantId, id)
|
||||
}
|
||||
var (
|
||||
lastn string
|
||||
)
|
||||
|
||||
var FormsBuidlersList []forms.TblForms
|
||||
if permisison {
|
||||
// Get master block list
|
||||
responseData, err := FetchMasterBlockList(c)
|
||||
if err != nil {
|
||||
responseData = ResponseData{
|
||||
DefaultList: []models.TblMstrBlocks{},
|
||||
AllList: []models.TblMstrBlocks{},
|
||||
FinalblockList: []models.TblMstrBlocks{},
|
||||
BlockCount: 0,
|
||||
}
|
||||
}
|
||||
|
||||
var FormsBuildersList []forms.TblForms
|
||||
if permission {
|
||||
var filter forms.Filter
|
||||
|
||||
filter.Keyword = strings.Trim(c.DefaultQuery("keyword", ""), " ")
|
||||
filter.FromDate = c.Query("fromdate")
|
||||
filter.ToDate = c.Query("todate")
|
||||
FormConfig.DataAccess = c.GetInt("dataaccess")
|
||||
FormConfig.UserId = c.GetInt("userid")
|
||||
channeldetails, _, _ := ChannelConfig.GetChannelsById(id, TenantId)
|
||||
Formlist, TotalFormsCount, responseCount, err := FormConfig.FormBuildersList(100, 0, forms.Filter(filter), TenantId, 1, 0, channeldetails.SlugName, 0)
|
||||
|
||||
fmt.Println(TotalFormsCount, responseCount)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
for _, val := range Formlist {
|
||||
|
||||
val.DateString = val.ModifiedOn.In(TZONE).Format(Datelayout)
|
||||
|
||||
if val.FirstName != "" {
|
||||
lastn = strings.ToUpper(val.FirstName[:1])
|
||||
}
|
||||
if val.LastName != "" {
|
||||
lastn += strings.ToUpper(val.LastName[:1])
|
||||
}
|
||||
|
||||
// NameString = firstn + lastn
|
||||
|
||||
FormsBuidlersList = append(FormsBuidlersList, val)
|
||||
|
||||
//NameString if profileimage is not there
|
||||
|
||||
}
|
||||
FormsBuildersList, _ = FetchFormBuildersList(c, filter, TenantId, id, "")
|
||||
}
|
||||
|
||||
ddata := map[string]interface{}{"data": responseData.FinalblockList}
|
||||
bytedata2, _ := json.Marshal(ddata)
|
||||
data := map[string]interface{}{"data": finalcollectionlist}
|
||||
bytedata, _ := json.Marshal(data)
|
||||
|
||||
baseurl := os.Getenv("BASE_URL")
|
||||
|
||||
urlpath := map[string]interface{}{"path": baseurl + "uploadb64image", "payload": "imagedata", "success": map[string]interface{}{"imagepath": "imagepath", "imagename": "imagename"}}
|
||||
|
||||
newpath := os.Getenv("BASE_URL")
|
||||
|
||||
ubyte, _ := json.Marshal(urlpath)
|
||||
|
||||
bytedata, _ := json.Marshal(data)
|
||||
|
||||
ModuleName, _, _ := ModuleRouteName(c)
|
||||
|
||||
var slchannelid int
|
||||
|
||||
if entries.ChannelId != 0 {
|
||||
|
||||
slchannelid = entries.ChannelId
|
||||
|
||||
} else {
|
||||
selectedchannel := channelist[len(channelist)-1]
|
||||
|
||||
slchannelid = selectedchannel.Id
|
||||
slchannelid = channelist[len(channelist)-1].Id
|
||||
}
|
||||
viewurl := os.Getenv("VIEW_BASE_URL")
|
||||
|
||||
c.HTML(200, "addentry.html", gin.H{"Menu": menu, "Ctalist": FormsBuidlersList, "Viewbaseurl": viewurl, "linktitle": "Edit Entry", "title": ModuleName, "Entries": entries, "Fields": field, "translate": translate, "csrf": csrf.GetToken(c), "channellist": channelist, "AllCategories": AllCategorieswithSubCategories, "HeadTitle": translate.Channell.Channels, "Cmsmenu": true, "Entriestab": true, "StorageType": selectedtype.SelectedType, "editbread": "Edit Entry", "blocks": string(bytedata), "Mode": "edit", "Slchannelid": slchannelid, "EntryId": slchannelid, "Storagepath": string(ubyte), "uploadurl": newpath})
|
||||
var filters memship.Filter
|
||||
MembershiplevelList, _, err := MembershipConfig.MembershipLevelsList(0, 0, filters, TenantId)
|
||||
|
||||
return
|
||||
var language1 []models.TblLanguage
|
||||
|
||||
// }
|
||||
Language, _ := query.GetLanguageList(&language1, 0, 0, models.Filter{}, true, TenantId)
|
||||
|
||||
// c.Redirect(301, "/403-page")
|
||||
c.HTML(200, "addentry.html", gin.H{"Menu": menu, "Ctalist": FormsBuildersList, "Viewbaseurl": viewurl, "linktitle": "Edit Entry", "title": ModuleName, "Entries": entries, "Fields": field, "translate": translate, "csrf": csrf.GetToken(c), "channellist": channelist, "AllCategories": AllCategorieswithSubCategories, "HeadTitle": translate.Channell.Channels, "Cmsmenu": true, "Entriestab": true, "StorageType": selectedtype.SelectedType, "editbread": "Edit Entry", "blocks": string(bytedata), "Mode": "edit", "Slchannelid": slchannelid, "EntryId": slchannelid, "Storagepath": string(ubyte), "uploadurl": baseurl, "Membershiplevellist": MembershiplevelList, "defaultblocks": string(bytedata2), "Language": Language})
|
||||
|
||||
}
|
||||
|
||||
@@ -1781,7 +1666,6 @@ func DeleteSelectedEntry(c *gin.Context) {
|
||||
|
||||
c.JSON(200, gin.H{"value": true, "url": url})
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Multi selected entry Unpublish //
|
||||
@@ -1847,7 +1731,6 @@ func UnpublishSelectedEntry(c *gin.Context) {
|
||||
|
||||
c.JSON(200, gin.H{"value": true, "status": statusint, "url": url})
|
||||
|
||||
|
||||
}
|
||||
|
||||
func CheckMandatoryFields(c *gin.Context) {
|
||||
@@ -2073,3 +1956,76 @@ func FormDetails(c *gin.Context) {
|
||||
c.Redirect(301, "/403-page")
|
||||
|
||||
}
|
||||
func FetchFormBuildersList(c *gin.Context, filter forms.Filter, tenantId string, entryId int, channelSlug string) ([]forms.TblForms, error) {
|
||||
FormConfig.DataAccess = c.GetInt("dataaccess")
|
||||
FormConfig.UserId = c.GetInt("userid")
|
||||
|
||||
channeldetails, _, _ := ChannelConfig.GetChannelsById(entryId, tenantId)
|
||||
formlist, _, _, err := FormConfig.FormBuildersList(100, 0, filter, tenantId, 1, 0, channeldetails.SlugName, 0)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var FormsBuildersList []forms.TblForms
|
||||
for _, val := range formlist {
|
||||
val.DateString = val.ModifiedOn.In(TZONE).Format(Datelayout)
|
||||
var lastn string
|
||||
if val.FirstName != "" {
|
||||
lastn = strings.ToUpper(val.FirstName[:1])
|
||||
}
|
||||
if val.LastName != "" {
|
||||
lastn += strings.ToUpper(val.LastName[:1])
|
||||
}
|
||||
FormsBuildersList = append(FormsBuildersList, val)
|
||||
}
|
||||
return FormsBuildersList, nil
|
||||
}
|
||||
|
||||
func FetchCollectionList(c *gin.Context, filter blocks.Filter, tenantId string, entryId int) ([]blocks.TblBlock, error) {
|
||||
BlockConfig.DataAccess = c.GetInt("dataaccess")
|
||||
BlockConfig.UserId = c.GetInt("userid")
|
||||
|
||||
collectionlist, _, err := BlockConfig.CollectionList(filter, tenantId, strconv.Itoa(entryId))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var finalcollectionlist []blocks.TblBlock
|
||||
for _, value := range collectionlist {
|
||||
img := value.CoverImage
|
||||
imgcontain := "/image-resize?name="
|
||||
if !strings.Contains(img, imgcontain) {
|
||||
value.CoverImage = "/image-resize?name=" + value.CoverImage
|
||||
}
|
||||
finalcollectionlist = append(finalcollectionlist, value)
|
||||
}
|
||||
return finalcollectionlist, nil
|
||||
}
|
||||
|
||||
func FetchMasterBlockList(c *gin.Context) (ResponseData, error) {
|
||||
endurl := os.Getenv("MASTER_BLOCKS_ENDPOINTURL")
|
||||
req, err := http.NewRequest("GET", endurl, nil)
|
||||
if err != nil {
|
||||
return ResponseData{}, err
|
||||
}
|
||||
|
||||
req.Header.Set("Content-Type", "application/json")
|
||||
req.Header.Set("Accept", "application/json")
|
||||
|
||||
client := &http.Client{}
|
||||
resp, err := client.Do(req)
|
||||
if err != nil || resp.StatusCode != http.StatusOK {
|
||||
return ResponseData{}, err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
var responseData ResponseData
|
||||
bodyBytes, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return ResponseData{}, err
|
||||
}
|
||||
if err := json.Unmarshal(bodyBytes, &responseData); err != nil {
|
||||
return ResponseData{}, err
|
||||
}
|
||||
return responseData, nil
|
||||
}
|
||||
Executable → Regular
@@ -257,16 +257,7 @@ func DefaultCtaList(c *gin.Context) {
|
||||
|
||||
client := &http.Client{}
|
||||
resp, err := client.Do(req)
|
||||
// client := &http.Client{
|
||||
// Transport: &http.Transport{
|
||||
// TLSClientConfig: &tls.Config{
|
||||
// InsecureSkipVerify: true, // This disables certificate verification
|
||||
// },
|
||||
// },
|
||||
// }
|
||||
|
||||
// // Use this client to make requests
|
||||
// resp, err := client.Do(req)
|
||||
masterconnect := true
|
||||
|
||||
if err != nil || resp.StatusCode != http.StatusOK {
|
||||
@@ -363,7 +354,7 @@ func DefaultCtaList(c *gin.Context) {
|
||||
TwoAfter: pageno + 2,
|
||||
TwoBelow: pageno - 2,
|
||||
ThreeAfter: pageno + 3,
|
||||
}, "ctabanner": ctabannerval, "chnid": filter.ChannelName, "keywordtrue": keywordtrue, "Count": responseData.BlockCount, "Searchtrue": filterflag, "linktitle": "Forms", "Limit": limt, "UserId": c.GetInt("userid"), "Formlist": responseData.FinalctaList, "Previous": Previous, "Page": Page, "Next": Next, "PageCount": PageCount, "CurrentPage": pageno, "Paginationendcount": paginationendcount, "Paginationstartcount": paginationstartcount, "StorageType": storagetype.SelectedType, "Filter": filter, "title": ModuleName, "csrf": csrf.GetToken(c), "Active": active, "translate": translate, "channelist": finalChannelList})
|
||||
}, "ctabanner": ctabannerval, "chnid": filter.ChannelName, "keywordtrue": keywordtrue, "Count": responseData.BlockCount, "Searchtrue": filterflag, "linktitle": "Forms", "Limit": limt, "UserId": c.GetInt("userid"), "Formlist": responseData.FinalctaList, "Previous": Previous, "Page": Page, "Next": Next, "PageCount": PageCount, "CurrentPage": pageno, "Paginationendcount": paginationendcount, "Paginationstartcount": paginationstartcount, "StorageType": storagetype.SelectedType, "Filter": filter, "title": ModuleName, "csrf": csrf.GetToken(c), "Active": active, "translate": translate, "channelist": finalChannelList})
|
||||
|
||||
}
|
||||
|
||||
@@ -457,13 +448,13 @@ func CreateForms(c *gin.Context) {
|
||||
fmt.Println("checkformtitle")
|
||||
ErrorLog.Printf("form creation error: %s", err)
|
||||
c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
c.Redirect(http.StatusMovedPermanently, "/cta/")
|
||||
c.Redirect(http.StatusMovedPermanently, "/admin/admin/cta/")
|
||||
return
|
||||
}
|
||||
|
||||
c.SetCookie("get-toast", "Form Created Successfully", 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
c.Redirect(http.StatusMovedPermanently, "/cta/")
|
||||
c.Redirect(http.StatusMovedPermanently, "/admin/admin/cta/")
|
||||
}
|
||||
|
||||
func Status(c *gin.Context) {
|
||||
@@ -497,11 +488,11 @@ func Status(c *gin.Context) {
|
||||
|
||||
if pageno != "" {
|
||||
|
||||
homeurl = "/cta?page=" + pageno
|
||||
homeurl = "/admin/cta?page=" + pageno
|
||||
|
||||
} else {
|
||||
|
||||
homeurl = "/cta"
|
||||
homeurl = "/admin/cta"
|
||||
|
||||
}
|
||||
|
||||
@@ -513,11 +504,11 @@ func Status(c *gin.Context) {
|
||||
|
||||
if pageno != "" {
|
||||
|
||||
homeurl = "/cta/unpublished?page=" + pageno
|
||||
homeurl = "/admin/cta/unpublished?page=" + pageno
|
||||
|
||||
} else {
|
||||
|
||||
homeurl = "/cta/unpublished"
|
||||
homeurl = "/admin/cta/unpublished"
|
||||
|
||||
}
|
||||
|
||||
@@ -529,11 +520,11 @@ func Status(c *gin.Context) {
|
||||
|
||||
if pageno != "" {
|
||||
|
||||
homeurl = "/cta/draft?page=" + pageno
|
||||
homeurl = "/admin/cta/draft?page=" + pageno
|
||||
|
||||
} else {
|
||||
|
||||
homeurl = "/cta/draft"
|
||||
homeurl = "/admin/cta/draft"
|
||||
|
||||
}
|
||||
|
||||
@@ -575,11 +566,11 @@ func DeleteForm(c *gin.Context) {
|
||||
|
||||
if pageno != "" {
|
||||
|
||||
homeurl = "/cta?page=" + pageno
|
||||
homeurl = "/admin/cta?page=" + pageno
|
||||
|
||||
} else {
|
||||
|
||||
homeurl = "/cta"
|
||||
homeurl = "/admin/cta"
|
||||
|
||||
}
|
||||
|
||||
@@ -587,11 +578,11 @@ func DeleteForm(c *gin.Context) {
|
||||
|
||||
if pageno != "" {
|
||||
|
||||
homeurl = "/cta/unpublished?page=" + pageno
|
||||
homeurl = "/admin/cta/unpublished?page=" + pageno
|
||||
|
||||
} else {
|
||||
|
||||
homeurl = "/cta/unpublished"
|
||||
homeurl = "/admin/cta/unpublished"
|
||||
|
||||
}
|
||||
|
||||
@@ -599,11 +590,11 @@ func DeleteForm(c *gin.Context) {
|
||||
|
||||
if pageno != "" {
|
||||
|
||||
homeurl = "/cta/draft?page=" + pageno
|
||||
homeurl = "/admin/cta/draft?page=" + pageno
|
||||
|
||||
} else {
|
||||
|
||||
homeurl = "/cta/draft"
|
||||
homeurl = "/admin/cta/draft"
|
||||
|
||||
}
|
||||
|
||||
@@ -640,7 +631,7 @@ func FormEdit(c *gin.Context) {
|
||||
if err != nil {
|
||||
ErrorLog.Printf("formbuilders error: %s", perr)
|
||||
c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
c.Redirect(http.StatusMovedPermanently, "/cta")
|
||||
c.Redirect(http.StatusMovedPermanently, "/admin/cta")
|
||||
}
|
||||
|
||||
menu := NewMenuController(c)
|
||||
@@ -680,7 +671,7 @@ func FormDuplicate(c *gin.Context) {
|
||||
if err != nil {
|
||||
ErrorLog.Printf("formbuilders error: %s", perr)
|
||||
c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
c.Redirect(http.StatusMovedPermanently, "/cta")
|
||||
c.Redirect(http.StatusMovedPermanently, "/admin/cta")
|
||||
}
|
||||
|
||||
menu := NewMenuController(c)
|
||||
@@ -756,13 +747,13 @@ func FormUpdate(c *gin.Context) {
|
||||
if errr != nil {
|
||||
ErrorLog.Printf("formbuilders error: %s", errr) // Corrected: Use errr
|
||||
c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
c.Redirect(http.StatusMovedPermanently, "/cta")
|
||||
c.Redirect(http.StatusMovedPermanently, "/admin/cta")
|
||||
return
|
||||
}
|
||||
|
||||
c.SetCookie("get-toast", "Form Updated Successfully", 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
c.Redirect(http.StatusMovedPermanently, "/cta")
|
||||
c.Redirect(http.StatusMovedPermanently, "/admin/cta")
|
||||
}
|
||||
|
||||
func MultiDelete(c *gin.Context) {
|
||||
@@ -803,7 +794,7 @@ func MultiDelete(c *gin.Context) {
|
||||
|
||||
if pageno == "" {
|
||||
|
||||
homeurl = "/cta/unpublished"
|
||||
homeurl = "/admin/cta/unpublished"
|
||||
|
||||
} else {
|
||||
|
||||
@@ -814,12 +805,12 @@ func MultiDelete(c *gin.Context) {
|
||||
multi := page * 10
|
||||
multiInt64 := int64(multi)
|
||||
if TotalFormsCount > multiInt64 {
|
||||
homeurl = "/cta/unpublished/?page=" + pageno
|
||||
homeurl = "/admin/cta/unpublished/?page=" + pageno
|
||||
} else {
|
||||
pagee, _ := strconv.Atoi(pageno)
|
||||
_page := pagee - 1
|
||||
pages := strconv.Itoa(_page)
|
||||
homeurl = "/cta/unpublished/?page=" + pages
|
||||
homeurl = "/admin/cta/unpublished/?page=" + pages
|
||||
}
|
||||
|
||||
}
|
||||
@@ -828,7 +819,7 @@ func MultiDelete(c *gin.Context) {
|
||||
fmt.Println("draft:")
|
||||
if pageno == "" {
|
||||
|
||||
homeurl = "/cta/draft"
|
||||
homeurl = "/admin/cta/draft"
|
||||
|
||||
} else {
|
||||
|
||||
@@ -839,12 +830,12 @@ func MultiDelete(c *gin.Context) {
|
||||
multi := page * 10
|
||||
multiInt64 := int64(multi)
|
||||
if TotalFormsCount > multiInt64 {
|
||||
homeurl = "/cta/draft/?page=" + pageno
|
||||
homeurl = "/admin/cta/draft/?page=" + pageno
|
||||
} else {
|
||||
pagee, _ := strconv.Atoi(pageno)
|
||||
_page := pagee - 1
|
||||
pages := strconv.Itoa(_page)
|
||||
homeurl = "/cta/draft/?page=" + pages
|
||||
homeurl = "/admin/cta/draft/?page=" + pages
|
||||
}
|
||||
|
||||
}
|
||||
@@ -854,7 +845,7 @@ func MultiDelete(c *gin.Context) {
|
||||
|
||||
if pageno == "" {
|
||||
|
||||
homeurl = "/cta"
|
||||
homeurl = "/admin/cta"
|
||||
|
||||
} else {
|
||||
|
||||
@@ -865,12 +856,12 @@ func MultiDelete(c *gin.Context) {
|
||||
multi := page * 10
|
||||
multiInt64 := int64(multi)
|
||||
if TotalFormsCount > multiInt64 {
|
||||
homeurl = "/cta/?page=" + pageno
|
||||
homeurl = "/admin/cta/?page=" + pageno
|
||||
} else {
|
||||
pagee, _ := strconv.Atoi(pageno)
|
||||
_page := pagee - 1
|
||||
pages := strconv.Itoa(_page)
|
||||
homeurl = "/cta/?page=" + pages
|
||||
homeurl = "/admin/cta/?page=" + pages
|
||||
}
|
||||
|
||||
}
|
||||
@@ -897,11 +888,11 @@ func MultiSelectStatusChange(c *gin.Context) {
|
||||
toast = "Form Published Successfully"
|
||||
if page == "" {
|
||||
|
||||
homeurl = "/cta/unpublished"
|
||||
homeurl = "/admin/cta/unpublished"
|
||||
|
||||
} else {
|
||||
|
||||
homeurl = "/cta/unpublished/?page=" + page
|
||||
homeurl = "/admin/cta/unpublished/?page=" + page
|
||||
|
||||
}
|
||||
|
||||
@@ -911,11 +902,11 @@ func MultiSelectStatusChange(c *gin.Context) {
|
||||
toast = "Form Published Successfully"
|
||||
if page == "" {
|
||||
|
||||
homeurl = "/cta/draft"
|
||||
homeurl = "/admin/cta/draft"
|
||||
|
||||
} else {
|
||||
|
||||
homeurl = "/cta/draft/?page=" + page
|
||||
homeurl = "/admin/cta/draft/?page=" + page
|
||||
|
||||
}
|
||||
|
||||
@@ -925,11 +916,11 @@ func MultiSelectStatusChange(c *gin.Context) {
|
||||
toast = "Form Unpublished Successfully"
|
||||
if page == "" {
|
||||
|
||||
homeurl = "/cta/"
|
||||
homeurl = "/admin/cta/"
|
||||
|
||||
} else {
|
||||
|
||||
homeurl = "/cta/?page=" + page
|
||||
homeurl = "/admin/cta/?page=" + page
|
||||
|
||||
}
|
||||
|
||||
@@ -1002,10 +993,13 @@ func Formdetail(c *gin.Context) {
|
||||
|
||||
FormId, _ := strconv.Atoi(id)
|
||||
|
||||
|
||||
var Formsresponselist []forms.TblFormResponses
|
||||
|
||||
responselist, TotalResponseCount, formname, _ := FormConfig.FormDetailLists(limt, offset, forms.Filter(filter), FormId, userid, EntryId, TenantId)
|
||||
|
||||
fmt.Println("Formdetail::",responselist)
|
||||
|
||||
var FormData []string
|
||||
|
||||
for _, val := range responselist {
|
||||
@@ -1177,7 +1171,7 @@ func RemoveCta(c *gin.Context) {
|
||||
|
||||
c.SetCookie("get-toast", "Collection Remove Successfully", 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/cta")
|
||||
c.Redirect(301, "/admin/cta")
|
||||
|
||||
}
|
||||
}
|
||||
Executable → Regular
File diff suppressed because one or more lines are too long
@@ -0,0 +1,854 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"spurt-cms/models"
|
||||
storagecontroller "spurt-cms/storage-controller"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/spurtcms/auth"
|
||||
"github.com/spurtcms/blocks"
|
||||
menu "github.com/spurtcms/menu"
|
||||
csrf "github.com/utrack/gin-csrf"
|
||||
)
|
||||
|
||||
func GoTemplates(c *gin.Context) {
|
||||
permisison, perr := NewAuth.IsGranted("Menu", auth.CRUD, TenantId)
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("menu authorization error: %s", perr)
|
||||
}
|
||||
if !permisison {
|
||||
ErrorLog.Printf("Menu authorization error")
|
||||
c.Redirect(301, "/403-page")
|
||||
return
|
||||
}
|
||||
|
||||
var (
|
||||
goTemplateList []menu.TblGoTemplates
|
||||
count int
|
||||
err error
|
||||
count2 int64
|
||||
)
|
||||
goTemplateList, count1, err := MenuConfig.GoTemplatesList(TenantId)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
count = int(count1)
|
||||
if count == 0 {
|
||||
goTemplateList, count2, err = MenuConfig.GoTemplatesList("")
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
count = int(count2)
|
||||
}
|
||||
|
||||
var modulenames []string
|
||||
moduleNameSet := make(map[string]struct{})
|
||||
|
||||
for _, tpl := range goTemplateList {
|
||||
if tpl.TemplateModuleName != "" {
|
||||
if _, exists := moduleNameSet[tpl.TemplateModuleName]; !exists {
|
||||
modulenames = append(modulenames, tpl.TemplateModuleName)
|
||||
moduleNameSet[tpl.TemplateModuleName] = struct{}{}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
go_template_default, _ := c.Get("go_template_default")
|
||||
webbanner, _ := c.Cookie("webbanner")
|
||||
if webbanner == "" {
|
||||
webbanner = "true"
|
||||
}
|
||||
ModuleName, _, _ := ModuleRouteName(c)
|
||||
translate, _ := TranslateHandler(c)
|
||||
|
||||
c.HTML(200, "go_template.html", gin.H{
|
||||
"csrf": csrf.GetToken(c),
|
||||
"modulenames": modulenames, // always sorted!
|
||||
"webbanner": webbanner,
|
||||
"Menu": NewMenuController(c),
|
||||
"linktitle": "Website",
|
||||
"translate": translate,
|
||||
"title": ModuleName,
|
||||
"goTemplateList": goTemplateList,
|
||||
"count": count,
|
||||
"go_template_default": go_template_default,
|
||||
})
|
||||
}
|
||||
|
||||
func GoTemplateUpdate(c *gin.Context) {
|
||||
|
||||
templateId, _ := strconv.Atoi(c.Param("id"))
|
||||
|
||||
permisison, perr := NewAuth.IsGranted("Menu", auth.CRUD, TenantId)
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("menu authorization error: %s", perr)
|
||||
}
|
||||
|
||||
if !permisison {
|
||||
ErrorLog.Printf("Menu authorization error")
|
||||
c.Redirect(301, "/403-page")
|
||||
return
|
||||
}
|
||||
|
||||
if permisison {
|
||||
|
||||
userid := c.GetInt("userid")
|
||||
|
||||
err := NewTeam.UpdateGoTemplate(templateId, userid, TenantId)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
c.SetCookie("get-toast", "Template Updated Successfully", 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/admin/website/")
|
||||
}
|
||||
}
|
||||
|
||||
//Template edit Page//
|
||||
|
||||
func TemplateEditPage(c *gin.Context) {
|
||||
var (
|
||||
limt int
|
||||
offset int
|
||||
filter menu.Filter
|
||||
)
|
||||
|
||||
limit := c.Query("limit")
|
||||
|
||||
pageno, _ := strconv.Atoi(c.DefaultQuery("page", "1"))
|
||||
filter.Keyword = strings.Trim(c.DefaultQuery("keyword", ""), " ")
|
||||
filter.Status = strings.Trim(c.DefaultQuery("status", ""), " ")
|
||||
filter.ToDate = strings.Trim(c.DefaultQuery("lastupdated", ""), " ")
|
||||
var filterflag bool
|
||||
if filter.Keyword != "" {
|
||||
filterflag = true
|
||||
} else {
|
||||
filterflag = false
|
||||
}
|
||||
|
||||
if limit == "" {
|
||||
limt = Limit
|
||||
} else {
|
||||
limt, _ = strconv.Atoi(limit)
|
||||
}
|
||||
|
||||
if pageno != 0 {
|
||||
offset = (pageno - 1) * limt
|
||||
}
|
||||
permisison, perr := NewAuth.IsGranted("Website", auth.CRUD, TenantId)
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("website authorization error: %s", perr)
|
||||
}
|
||||
|
||||
if !permisison {
|
||||
ErrorLog.Printf("website authorization error")
|
||||
c.Redirect(301, "/403-page")
|
||||
return
|
||||
}
|
||||
|
||||
webid, _ := strconv.Atoi(c.Param("id"))
|
||||
|
||||
Websitedet, _ := MenuConfig.GetWebsiteById(webid, TenantId)
|
||||
|
||||
templatedetail, err := MenuConfig.GetTemplateById(Websitedet.TemplateId, TenantId)
|
||||
|
||||
if err != nil {
|
||||
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
templatedetail.DateString = templatedetail.CreatedOn.In(TZONE).Format(Datelayout)
|
||||
|
||||
templatepagelist, count, err := MenuConfig.GetTemplatePageList(limt, offset, filter, TenantId, webid)
|
||||
var pagelist []menu.TblTemplatePages
|
||||
|
||||
for _, page := range templatepagelist {
|
||||
|
||||
page.CreatedDate = page.CreatedOn.In(TZONE).Format(Datelayout)
|
||||
if !page.ModifiedOn.IsZero() {
|
||||
page.ModifiedDate = page.ModifiedOn.In(TZONE).Format(Datelayout)
|
||||
} else {
|
||||
page.ModifiedDate = page.CreatedOn.In(TZONE).Format(Datelayout)
|
||||
}
|
||||
|
||||
pagelist = append(pagelist, page)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
paginationendcount := len(pagelist) + offset
|
||||
paginationstartcount := offset + 1
|
||||
Previous, Next, PageCount, Page := Pagination(pageno, int(count), limt)
|
||||
|
||||
ModuleName, _, _ := ModuleRouteName(c)
|
||||
|
||||
translate, _ := TranslateHandler(c)
|
||||
|
||||
c.HTML(200, "go_template_edit.html", gin.H{"Pagination": PaginationData{
|
||||
NextPage: pageno + 1,
|
||||
PreviousPage: pageno - 1,
|
||||
TotalPages: PageCount,
|
||||
TwoAfter: pageno + 2,
|
||||
TwoBelow: pageno - 2,
|
||||
ThreeAfter: pageno + 3}, "csrf": csrf.GetToken(c), "Searchtrue": filterflag, "Count": count, "Limit": limt, "templatepagelist": pagelist, "templatedetail": templatedetail, "websitedetail": Websitedet, "Menu": NewMenuController(c), "linktitle": "Website Page", "translate": translate, "title": ModuleName, "Paginationendcount": paginationendcount, "Previous": Previous, "Next": Next, "PageCount": PageCount, "CurrentPage": pageno, "Page": Page, "Filter": filter, "Paginationstartcount": paginationstartcount})
|
||||
|
||||
}
|
||||
|
||||
// Template Add Page//
|
||||
func AddPageInWebsite(c *gin.Context) {
|
||||
|
||||
permisison, perr := NewAuth.IsGranted("Website", auth.CRUD, TenantId)
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("menu authorization error: %s", perr)
|
||||
}
|
||||
|
||||
if !permisison {
|
||||
ErrorLog.Printf("Menu authorization error")
|
||||
c.Redirect(301, "/403-page")
|
||||
return
|
||||
}
|
||||
var editpage bool
|
||||
var mode string
|
||||
pageid, _ := strconv.Atoi(c.Param("id"))
|
||||
|
||||
if pageid != 0 {
|
||||
|
||||
editpage = true
|
||||
|
||||
mode = "edit"
|
||||
} else {
|
||||
|
||||
mode = "create"
|
||||
}
|
||||
webid, _ := strconv.Atoi(c.Query("webid"))
|
||||
|
||||
PageDetail, _ := MenuConfig.GetPageById(pageid, TenantId)
|
||||
|
||||
fmt.Println(PageDetail.PageDescription, "descriptionnnn")
|
||||
|
||||
Websitedet, _ := MenuConfig.GetWebsiteById(webid, TenantId)
|
||||
|
||||
templatedetail, err := MenuConfig.GetTemplateById(Websitedet.TemplateId, TenantId)
|
||||
|
||||
if err != nil {
|
||||
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
channelist, clerr := ChannelConfig.GetPermissionChannel(TenantId)
|
||||
if clerr != nil {
|
||||
ErrorLog.Printf("create Entry listchannel error: %s", clerr)
|
||||
}
|
||||
|
||||
templatedetail.DateString = templatedetail.CreatedOn.In(TZONE).Format(Datelayout)
|
||||
|
||||
var bytedata1 []byte
|
||||
|
||||
var bytedata2 []byte
|
||||
|
||||
var finalblocklist []blocks.TblBlock
|
||||
|
||||
blocklist, _, err := BlockConfig.BlockList(0, 0, blocks.Filter{}, TenantId)
|
||||
|
||||
if err != nil {
|
||||
fmt.Println("collection list", err)
|
||||
}
|
||||
|
||||
for _, val := range blocklist {
|
||||
var first = val.FirstName
|
||||
var last = val.LastName
|
||||
var firstn = strings.ToUpper(first[:1])
|
||||
var lastn string
|
||||
if val.LastName != "" {
|
||||
lastn = strings.ToUpper(last[:1])
|
||||
}
|
||||
|
||||
val.ChannelNames = strings.Split(val.ChannelSlugname, ",")
|
||||
|
||||
var Name = firstn + lastn
|
||||
val.NameString = Name
|
||||
|
||||
tagname := strings.Split(val.TagValue, ",")
|
||||
|
||||
val.TagValueArr = append(val.TagValueArr, tagname...)
|
||||
img := val.CoverImage
|
||||
imgcontain := "/image-resize?name="
|
||||
flag := strings.Contains(img, imgcontain)
|
||||
if !flag {
|
||||
val.CoverImage = "/image-resize?name=" + val.CoverImage
|
||||
}
|
||||
if val.ProfileImagePath != "" {
|
||||
userimg := val.ProfileImagePath
|
||||
imgflag := strings.Contains(userimg, imgcontain)
|
||||
if !imgflag {
|
||||
val.ProfileImagePath = "/image-resize?name=" + val.ProfileImagePath
|
||||
}
|
||||
}
|
||||
|
||||
finalblocklist = append(finalblocklist, val)
|
||||
|
||||
}
|
||||
|
||||
data := map[string]interface{}{"data": finalblocklist}
|
||||
|
||||
bytedata1, _ = json.Marshal(data)
|
||||
|
||||
if permisison {
|
||||
|
||||
endurl := os.Getenv("MASTER_BLOCKS_ENDPOINTURL")
|
||||
req, err := http.NewRequest("GET", endurl, nil)
|
||||
if err != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": "Failed to create request: " + err.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
query := req.URL.Query()
|
||||
|
||||
req.URL.RawQuery = query.Encode()
|
||||
req.Header.Set("Content-Type", "application/json")
|
||||
req.Header.Set("Accept", "application/json")
|
||||
|
||||
client := &http.Client{}
|
||||
resp, err := client.Do(req)
|
||||
masterconnect := true
|
||||
|
||||
if err != nil || resp.StatusCode != http.StatusOK {
|
||||
fmt.Println("Error connecting to master server:", err)
|
||||
masterconnect = false
|
||||
} else {
|
||||
defer resp.Body.Close()
|
||||
}
|
||||
|
||||
var responseData ResponseData
|
||||
if masterconnect {
|
||||
bodyBytes, err := io.ReadAll(resp.Body)
|
||||
if err == nil {
|
||||
fmt.Println("Error response:", err)
|
||||
resp.Body = io.NopCloser(bytes.NewBuffer(bodyBytes))
|
||||
err = json.NewDecoder(resp.Body).Decode(&responseData)
|
||||
if err != nil {
|
||||
masterconnect = false
|
||||
}
|
||||
} else {
|
||||
masterconnect = false
|
||||
}
|
||||
}
|
||||
|
||||
if !masterconnect {
|
||||
responseData = ResponseData{
|
||||
DefaultList: []models.TblMstrBlocks{},
|
||||
AllList: []models.TblMstrBlocks{},
|
||||
FinalblockList: []models.TblMstrBlocks{},
|
||||
BlockCount: 0,
|
||||
}
|
||||
}
|
||||
|
||||
permisison, perr := NewAuth.IsGranted("Blocks", auth.CRUD, TenantId)
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("block collection list authorization error: %s", perr)
|
||||
c.Redirect(301, "/403-page")
|
||||
return
|
||||
}
|
||||
if !permisison {
|
||||
|
||||
ErrorLog.Printf("Block authorization error: %s", perr)
|
||||
c.Redirect(301, "/403-page")
|
||||
return
|
||||
}
|
||||
|
||||
blockBannerValue, _ := c.Cookie("blockbanner")
|
||||
if blockBannerValue == "" {
|
||||
blockBannerValue = "true"
|
||||
}
|
||||
|
||||
// fmt.Println(responseData.FinalblockList,"checkdata")
|
||||
data := map[string]interface{}{"data": responseData.FinalblockList}
|
||||
|
||||
bytedata2, _ = json.Marshal(data)
|
||||
}
|
||||
selectedtype, _ := GetSelectedType()
|
||||
|
||||
baseurl := os.Getenv("BASE_URL")
|
||||
|
||||
urlpath := map[string]interface{}{"path": baseurl + "uploadb64image", "payload": "imagedata", "success": map[string]interface{}{"imagepath": "imagepath", "imagename": "imagename"}}
|
||||
|
||||
newpath := os.Getenv("BASE_URL")
|
||||
|
||||
ubyte, _ := json.Marshal(urlpath)
|
||||
|
||||
templatepagelist, _, err := MenuConfig.GetTemplatePageList(100, 0, menu.Filter{}, TenantId, webid)
|
||||
|
||||
ModuleName, _, _ := ModuleRouteName(c)
|
||||
|
||||
translate, _ := TranslateHandler(c)
|
||||
|
||||
c.HTML(200, "go_template_addpage.html", gin.H{"csrf": csrf.GetToken(c), "channellist": channelist, "websitedetail": Websitedet, "pagelist": templatepagelist, "PageDetail": PageDetail, "editpage": editpage, "Storagepath": string(ubyte), "uploadurl": newpath, "StorageType": selectedtype.SelectedType, "blocks": string(bytedata1), "defaultblocks": string(bytedata2), "Mode": mode, "templatedetail": templatedetail, "Menu": NewMenuController(c), "linktitle": "Website", "translate": translate, "title": ModuleName})
|
||||
|
||||
}
|
||||
|
||||
//save page Name//
|
||||
|
||||
func SavePage(c *gin.Context) {
|
||||
|
||||
permisison, perr := NewAuth.IsGranted("Website", auth.CRUD, TenantId)
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("website authorization error: %s", perr)
|
||||
}
|
||||
|
||||
if !permisison {
|
||||
ErrorLog.Printf("website authorization error")
|
||||
c.Redirect(301, "/403-page")
|
||||
return
|
||||
}
|
||||
pagename := c.PostForm("page_name")
|
||||
userid := c.GetInt("userid")
|
||||
webid, _ := strconv.Atoi(c.PostForm("webid"))
|
||||
pageid, _ := strconv.Atoi(c.PostForm("pageid"))
|
||||
pagedata := c.PostForm("pagedata")
|
||||
var pagedet menu.TblTemplatePages
|
||||
var err error
|
||||
|
||||
if pageid != 0 {
|
||||
|
||||
pageinfo := menu.TblTemplatePages{
|
||||
Id: pageid,
|
||||
Name: pagename,
|
||||
TenantId: TenantId,
|
||||
ModifiedBy: userid,
|
||||
PageDescription: pagedata,
|
||||
WebsiteId: webid,
|
||||
}
|
||||
pagedet, err = MenuConfig.EditTemplatePage(&pageinfo)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
c.JSON(500, gin.H{"error": err.Error()})
|
||||
return
|
||||
}
|
||||
} else {
|
||||
|
||||
pageinfo := menu.TblTemplatePages{
|
||||
Name: pagename,
|
||||
TenantId: TenantId,
|
||||
CreatedBy: userid,
|
||||
IsDeleted: 0,
|
||||
Status: 1,
|
||||
WebsiteId: webid,
|
||||
}
|
||||
pagedet, err = MenuConfig.CreateTemplatePage(&pageinfo)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
c.JSON(500, gin.H{"error": err.Error()})
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
c.JSON(200, gin.H{"page": pagedet})
|
||||
}
|
||||
|
||||
//Delete Page
|
||||
|
||||
func DeletePage(c *gin.Context) {
|
||||
permisison, perr := NewAuth.IsGranted("Website", auth.CRUD, TenantId)
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("website authorization error: %s", perr)
|
||||
}
|
||||
|
||||
if !permisison {
|
||||
ErrorLog.Printf("website authorization error")
|
||||
c.Redirect(301, "/403-page")
|
||||
return
|
||||
}
|
||||
|
||||
pageid, _ := strconv.Atoi(c.Param("id"))
|
||||
|
||||
pageno := c.Query("page")
|
||||
userid := c.GetInt("userid")
|
||||
webid := c.Query("webid")
|
||||
|
||||
var url string
|
||||
if pageno != "" {
|
||||
url = "/admin/website/pages/" + webid + "?page=" + pageno
|
||||
} else {
|
||||
url = "/admin/website/pages/" + webid
|
||||
|
||||
}
|
||||
|
||||
err := MenuConfig.DeletePage(pageid, userid, TenantId)
|
||||
|
||||
if strings.Contains(fmt.Sprint(err), "given some values is empty") {
|
||||
ErrorLog.Printf("deletemenu mandatory field error: %s", perr)
|
||||
c.SetCookie("Alert-msg", "Pleaseenterthemandatoryfields", 3600, "", "", false, false)
|
||||
c.Redirect(301, url)
|
||||
return
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
ErrorLog.Printf("deletemenu error: %s", perr)
|
||||
c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
c.Redirect(301, url)
|
||||
return
|
||||
}
|
||||
|
||||
c.SetCookie("get-toast", "Page Deleted Successfully", 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
c.Redirect(301, url)
|
||||
|
||||
}
|
||||
|
||||
//Status Change
|
||||
|
||||
func PageStatusChange(c *gin.Context) {
|
||||
|
||||
pageid, _ := strconv.Atoi(c.PostForm("id"))
|
||||
|
||||
fmt.Println(pageid, "pageiddd")
|
||||
userid := c.GetInt("userid")
|
||||
val, _ := strconv.Atoi(c.Request.PostFormValue("isactive"))
|
||||
|
||||
permisison, perr := NewAuth.IsGranted("Website", auth.Update, TenantId)
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("delete menu authorization error: %s", perr)
|
||||
}
|
||||
|
||||
if !permisison {
|
||||
ErrorLog.Printf("Website authorization error")
|
||||
c.Redirect(301, "/403-page")
|
||||
return
|
||||
}
|
||||
|
||||
flg, err := MenuConfig.PageStatusChange(pageid, val, userid, TenantId)
|
||||
|
||||
if err != nil {
|
||||
ErrorLog.Printf("menu status change error: %s", perr)
|
||||
json.NewEncoder(c.Writer).Encode(flg)
|
||||
|
||||
} else {
|
||||
json.NewEncoder(c.Writer).Encode(flg)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//SEO Page
|
||||
|
||||
func Seo(c *gin.Context) {
|
||||
|
||||
webid, _ := strconv.Atoi(c.Query("webid"))
|
||||
|
||||
seodetail, err := MenuConfig.SeoDetail(TenantId, webid)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
webbanner, _ := c.Cookie("webbanner")
|
||||
|
||||
if webbanner == "" {
|
||||
|
||||
webbanner = "true"
|
||||
}
|
||||
|
||||
permisison, perr := NewAuth.IsGranted("Menu", auth.CRUD, TenantId)
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("menu authorization error: %s", perr)
|
||||
}
|
||||
|
||||
if !permisison {
|
||||
ErrorLog.Printf("Menu authorization error")
|
||||
c.Redirect(301, "/403-page")
|
||||
return
|
||||
}
|
||||
|
||||
var pages bool
|
||||
|
||||
if webid != 0 {
|
||||
pages = true
|
||||
|
||||
}
|
||||
Websitedet, _ := MenuConfig.GetWebsiteById(webid, TenantId)
|
||||
templatedetail, err := MenuConfig.GetTemplateById(Websitedet.TemplateId, TenantId)
|
||||
|
||||
if err != nil {
|
||||
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
templatedetail.DateString = templatedetail.CreatedOn.In(TZONE).Format(Datelayout)
|
||||
|
||||
ModuleName, _, _ := ModuleRouteName(c)
|
||||
|
||||
translate, _ := TranslateHandler(c)
|
||||
|
||||
c.HTML(200, "seo.html", gin.H{"csrf": csrf.GetToken(c), "websitedetail": Websitedet, "gotemplatepageheader": pages, "templatedetail": templatedetail, "webbanner": webbanner, "Menu": NewMenuController(c), "linktitle": "SEO", "translate": translate, "title": ModuleName, "seodetail": seodetail})
|
||||
|
||||
}
|
||||
|
||||
func SeoPage(c *gin.Context) {
|
||||
|
||||
pagetitle := c.PostForm("pagetitle")
|
||||
|
||||
pagedescription := c.PostForm("pagedescription")
|
||||
|
||||
pagekeyword := c.PostForm("pagekeyword")
|
||||
|
||||
storetitle := c.PostForm("storetitle")
|
||||
|
||||
storedescription := c.PostForm("storedescription")
|
||||
|
||||
storekeyword := c.PostForm("storekeyword")
|
||||
|
||||
imagedata := c.PostForm("sitemapimage")
|
||||
|
||||
webid := c.Query("webid")
|
||||
|
||||
websiteid, _ := strconv.Atoi(c.Query("webid"))
|
||||
|
||||
var url string
|
||||
|
||||
if webid != "" && webid != "0" {
|
||||
|
||||
url = "?webid=" + webid
|
||||
|
||||
}
|
||||
|
||||
permisison, perr := NewAuth.IsGranted("Menu", auth.CRUD, TenantId)
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("menu authorization error: %s", perr)
|
||||
}
|
||||
|
||||
if !permisison {
|
||||
ErrorLog.Printf("Menu authorization error")
|
||||
c.Redirect(301, "/403-page")
|
||||
return
|
||||
}
|
||||
|
||||
if permisison {
|
||||
|
||||
var imageName, imagePath string
|
||||
|
||||
var imageByte []byte
|
||||
|
||||
tenantDetails, err := NewTeam.GetTenantDetails(TenantId)
|
||||
if err != nil {
|
||||
ErrorLog.Printf("error get storage type error: %s", err)
|
||||
}
|
||||
|
||||
if imagedata != "" {
|
||||
imageName, imagePath, imageByte, _ = ConvertBase64toByte(imagedata, "seo")
|
||||
|
||||
imagePath = tenantDetails.S3FolderName + imagePath
|
||||
|
||||
uerr := storagecontroller.UploadCropImageS3(imageName, imagePath, imageByte)
|
||||
if uerr != nil {
|
||||
c.SetCookie("Alert-msg", "ERRORAWScredentialsnotfound", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/admin/website/seo"+url)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
seo := menu.TblGoTemplateSeo{
|
||||
PageTitle: pagetitle,
|
||||
PageDescription: pagedescription,
|
||||
PageKeyword: pagekeyword,
|
||||
StoreTitle: storetitle,
|
||||
StoreDescription: storedescription,
|
||||
StoreKeyword: storekeyword,
|
||||
SiteMapName: imageName,
|
||||
SiteMapPath: imagePath,
|
||||
TenantId: TenantId,
|
||||
WebsiteId: websiteid,
|
||||
}
|
||||
|
||||
if pagetitle != "" || storetitle != "" || imageName != "" {
|
||||
|
||||
err := MenuConfig.SeoUpdate(seo)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
c.SetCookie("get-toast", "SEO Details Updated Successfully", 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
|
||||
}
|
||||
|
||||
c.Redirect(301, "/admin/website/seo"+url)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//Settings Page
|
||||
|
||||
func Settings(c *gin.Context) {
|
||||
|
||||
webid, _ := strconv.Atoi(c.Query("webid"))
|
||||
|
||||
settingsdetail, err := MenuConfig.SettingsDetail(TenantId, webid)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
webbanner, _ := c.Cookie("webbanner")
|
||||
|
||||
if webbanner == "" {
|
||||
|
||||
webbanner = "true"
|
||||
}
|
||||
|
||||
permisison, perr := NewAuth.IsGranted("Menu", auth.CRUD, TenantId)
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("menu authorization error: %s", perr)
|
||||
}
|
||||
|
||||
if !permisison {
|
||||
ErrorLog.Printf("Menu authorization error")
|
||||
c.Redirect(301, "/403-page")
|
||||
return
|
||||
}
|
||||
|
||||
var pages bool
|
||||
|
||||
if webid != 0 {
|
||||
pages = true
|
||||
|
||||
}
|
||||
Websitedet, _ := MenuConfig.GetWebsiteById(webid, TenantId)
|
||||
templatedetail, err := MenuConfig.GetTemplateById(Websitedet.TemplateId, TenantId)
|
||||
|
||||
if err != nil {
|
||||
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
templatedetail.DateString = templatedetail.CreatedOn.In(TZONE).Format(Datelayout)
|
||||
|
||||
ModuleName, _, _ := ModuleRouteName(c)
|
||||
|
||||
translate, _ := TranslateHandler(c)
|
||||
|
||||
c.HTML(200, "template_setting.html", gin.H{"csrf": csrf.GetToken(c), "websitedetail": Websitedet, "gotemplatepageheader": pages, "templatedetail": templatedetail, "webbanner": webbanner, "Menu": NewMenuController(c), "linktitle": "Setting", "translate": translate, "title": ModuleName, "settingsdetail": settingsdetail})
|
||||
|
||||
}
|
||||
|
||||
func SettingPage(c *gin.Context) {
|
||||
|
||||
siteName := c.PostForm("siteName")
|
||||
|
||||
sitelogoimage := c.PostForm("sitelogoimage")
|
||||
|
||||
sitefaviconimage := c.PostForm("sitefaviconimage")
|
||||
|
||||
websiteInput := c.PostForm("websiteInput")
|
||||
|
||||
webid := c.Query("webid")
|
||||
|
||||
websiteid, _ := strconv.Atoi(c.Query("webid"))
|
||||
|
||||
var url string
|
||||
|
||||
if webid != "" && webid != "0" {
|
||||
|
||||
url = "?webid=" + webid
|
||||
|
||||
}
|
||||
|
||||
permisison, perr := NewAuth.IsGranted("Menu", auth.CRUD, TenantId)
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("menu authorization error: %s", perr)
|
||||
}
|
||||
|
||||
if !permisison {
|
||||
ErrorLog.Printf("Menu authorization error")
|
||||
c.Redirect(301, "/403-page")
|
||||
return
|
||||
}
|
||||
|
||||
if permisison {
|
||||
|
||||
var imageName, imagePath, favimageName, favimagePath string
|
||||
|
||||
var imageByte, favimageByte []byte
|
||||
|
||||
tenantDetails, err := NewTeam.GetTenantDetails(TenantId)
|
||||
if err != nil {
|
||||
ErrorLog.Printf("error get storage type error: %s", err)
|
||||
}
|
||||
|
||||
if sitelogoimage != "" {
|
||||
|
||||
imageName, imagePath, imageByte, _ = ConvertBase64toByte(sitelogoimage, "setting")
|
||||
|
||||
imagePath = tenantDetails.S3FolderName + imagePath
|
||||
|
||||
uerr := storagecontroller.UploadCropImageS3(imageName, imagePath, imageByte)
|
||||
if uerr != nil {
|
||||
c.SetCookie("Alert-msg", "ERRORAWScredentialsnotfound", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/admin/website/setting"+url)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if sitefaviconimage != "" {
|
||||
favimageName, favimagePath, favimageByte, _ = ConvertBase64toByte(sitefaviconimage, "setting")
|
||||
|
||||
favimagePath = tenantDetails.S3FolderName + favimagePath
|
||||
|
||||
uerr := storagecontroller.UploadCropImageS3(favimageName, favimagePath, favimageByte)
|
||||
if uerr != nil {
|
||||
c.SetCookie("Alert-msg", "ERRORAWScredentialsnotfound", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/admin/website/setting"+url)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
setting := menu.TblGoTemplateSettings{
|
||||
SiteName: siteName,
|
||||
SiteLogo: imageName,
|
||||
SiteLogoPath: imagePath,
|
||||
SiteFavIcon: favimageName,
|
||||
SiteFavIconPath: favimagePath,
|
||||
WebsiteUrl: websiteInput,
|
||||
TenantId: TenantId,
|
||||
WebsiteId: websiteid,
|
||||
}
|
||||
|
||||
if siteName != "" || imageName != "" || favimageName != "" || websiteInput != "" {
|
||||
|
||||
err := MenuConfig.SettingUpdate(setting)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
c.SetCookie("get-toast", "Settings Details Updated Successfully", 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
|
||||
}
|
||||
|
||||
c.Redirect(301, "/admin/website/setting"+url)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
func CheckDomainName(c *gin.Context) {
|
||||
|
||||
subdomain := c.PostForm("subdomain")
|
||||
|
||||
userid := c.GetInt("userid")
|
||||
|
||||
err := NewTeamWP.CheckDomainName(subdomain, userid, TenantId)
|
||||
|
||||
if err != nil {
|
||||
|
||||
c.JSON(200, gin.H{"status": true})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(200, gin.H{"status": false})
|
||||
}
|
||||
@@ -0,0 +1,348 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/spurtcms/auth"
|
||||
chn "github.com/spurtcms/channels"
|
||||
menu "github.com/spurtcms/menu"
|
||||
csrf "github.com/utrack/gin-csrf"
|
||||
"gopkg.in/yaml.v2"
|
||||
)
|
||||
|
||||
type TemplateInfo struct {
|
||||
TemplateName string `yaml:"template_name"`
|
||||
TemplateImage string `yaml:"template_image"`
|
||||
Description string `yaml:"description"`
|
||||
Type string `yaml:"type"`
|
||||
Channel string `yaml:"channel"`
|
||||
}
|
||||
|
||||
func WebsiteList(c *gin.Context) {
|
||||
|
||||
var (
|
||||
limt int
|
||||
offset int
|
||||
filter menu.Filter
|
||||
)
|
||||
|
||||
limit := c.Query("limit")
|
||||
|
||||
pageno, _ := strconv.Atoi(c.DefaultQuery("page", "1"))
|
||||
filter.Keyword = strings.Trim(c.DefaultQuery("keyword", ""), " ")
|
||||
filter.Status = strings.Trim(c.DefaultQuery("status", ""), " ")
|
||||
filter.ToDate = strings.Trim(c.DefaultQuery("lastupdated", ""), " ")
|
||||
var filterflag bool
|
||||
if filter.Keyword != "" {
|
||||
filterflag = true
|
||||
} else {
|
||||
filterflag = false
|
||||
}
|
||||
|
||||
fmt.Println(filterflag)
|
||||
|
||||
if limit == "" {
|
||||
limt = Limit
|
||||
} else {
|
||||
limt, _ = strconv.Atoi(limit)
|
||||
}
|
||||
|
||||
if pageno != 0 {
|
||||
offset = (pageno - 1) * limt
|
||||
}
|
||||
permisison, perr := NewAuth.IsGranted("Menu", auth.CRUD, TenantId)
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("menu authorization error: %s", perr)
|
||||
}
|
||||
if !permisison {
|
||||
ErrorLog.Printf("Menu authorization error")
|
||||
c.Redirect(301, "/403-page")
|
||||
return
|
||||
}
|
||||
channelslist, _, err := ChannelConfig.ListChannel(chn.Channels{Limit: 100, Offset: 0, IsActive: false, TenantId: TenantId})
|
||||
|
||||
if err != nil {
|
||||
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
// goTemplateList, _, err := MenuConfig.GoTemplatesList("")
|
||||
// if err != nil {
|
||||
// fmt.Println(err)
|
||||
// }
|
||||
goTemplateList, err := ReadYamlFile("websites/themes")
|
||||
if err != nil {
|
||||
fmt.Println("Failed to read YAML files:", err)
|
||||
|
||||
}
|
||||
|
||||
host := c.Request.Host
|
||||
isLocal := false
|
||||
|
||||
if strings.Contains(host, "localhost") {
|
||||
isLocal = true
|
||||
}
|
||||
|
||||
baseurl := os.Getenv("BASE_URL")
|
||||
baseurl = strings.TrimPrefix(baseurl, "https://")
|
||||
baseurl = strings.TrimPrefix(baseurl, "http://")
|
||||
baseurl = strings.TrimSuffix(baseurl, "/")
|
||||
|
||||
fmt.Println(goTemplateList, "templatelist")
|
||||
|
||||
var FinalwebsiteList []menu.TblWebsite
|
||||
websitelist, count, err := MenuConfig.WebsiteList(limt, offset, menu.Filter{Keyword: filter.Keyword}, TenantId)
|
||||
|
||||
for _, val := range websitelist {
|
||||
val.CreatedDate = val.CreatedOn.In(TZONE).Format(Datelayout)
|
||||
if !val.ModifiedOn.IsZero() {
|
||||
val.DateString = val.ModifiedOn.In(TZONE).Format(Datelayout)
|
||||
} else {
|
||||
val.DateString = val.CreatedOn.In(TZONE).Format(Datelayout)
|
||||
}
|
||||
|
||||
if strings.Contains(host, "localhost") {
|
||||
val.Subdomain = "http://" + val.Name + "." + baseurl
|
||||
} else {
|
||||
val.Subdomain = "https://" + val.Name + "." + baseurl
|
||||
}
|
||||
FinalwebsiteList = append(FinalwebsiteList, val)
|
||||
|
||||
}
|
||||
|
||||
go_template_default, _ := c.Get("go_template_default")
|
||||
webbanner, _ := c.Cookie("webbanner")
|
||||
if webbanner == "" {
|
||||
webbanner = "true"
|
||||
}
|
||||
ModuleName, _, _ := ModuleRouteName(c)
|
||||
translate, _ := TranslateHandler(c)
|
||||
|
||||
//pagination calc
|
||||
paginationendcount := len(websitelist) + offset
|
||||
paginationstartcount := offset + 1
|
||||
Previous, Next, PageCount, Page := Pagination(pageno, int(count), limt)
|
||||
|
||||
c.HTML(200, "websitelist.html", gin.H{"Pagination": PaginationData{
|
||||
NextPage: pageno + 1,
|
||||
PreviousPage: pageno - 1,
|
||||
TotalPages: PageCount,
|
||||
TwoAfter: pageno + 2,
|
||||
TwoBelow: pageno - 2,
|
||||
ThreeAfter: pageno + 3},
|
||||
"csrf": csrf.GetToken(c),
|
||||
"webbanner": webbanner,
|
||||
"Menu": NewMenuController(c),
|
||||
"linktitle": "Website",
|
||||
"translate": translate,
|
||||
"title": ModuleName,
|
||||
"baseurl": baseurl,
|
||||
"go_template_default": go_template_default,
|
||||
"channelslist": channelslist,
|
||||
"templatelist": goTemplateList,
|
||||
"count": count,
|
||||
"websitelist": FinalwebsiteList,
|
||||
"isLocal": isLocal,
|
||||
"baseurlpath": os.Getenv("BASE_URL"),
|
||||
"Count": count, "Limit": limt, "Paginationendcount": paginationendcount, "Previous": Previous, "Next": Next, "PageCount": PageCount, "CurrentPage": pageno, "Page": Page, "Filter": filter, "Paginationstartcount": paginationstartcount,
|
||||
})
|
||||
}
|
||||
|
||||
func ReadYamlFile(path string) ([]TemplateInfo, error) {
|
||||
var allTemplateInfos []TemplateInfo
|
||||
|
||||
themes, err := os.ReadDir(path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
for _, theme := range themes {
|
||||
if !theme.IsDir() {
|
||||
continue
|
||||
}
|
||||
themeDir := filepath.Join(path, theme.Name())
|
||||
|
||||
files, err := ioutil.ReadDir(themeDir)
|
||||
if err != nil {
|
||||
log.Println("Error reading theme dir:", themeDir, err)
|
||||
continue
|
||||
}
|
||||
for _, file := range files {
|
||||
if file.IsDir() || filepath.Ext(file.Name()) != ".yaml" {
|
||||
continue
|
||||
}
|
||||
data, err := ioutil.ReadFile(filepath.Join(themeDir, file.Name()))
|
||||
if err != nil {
|
||||
log.Println("Error reading file:", file.Name(), err)
|
||||
continue
|
||||
}
|
||||
var TemplateInfo TemplateInfo
|
||||
if err := yaml.Unmarshal(data, &TemplateInfo); err != nil {
|
||||
log.Println("Error parsing YAML:", file.Name(), err)
|
||||
continue
|
||||
}
|
||||
allTemplateInfos = append(allTemplateInfos, TemplateInfo)
|
||||
}
|
||||
}
|
||||
return allTemplateInfos, nil
|
||||
}
|
||||
|
||||
//Create Website Function//
|
||||
|
||||
func CreateWebsite(c *gin.Context) {
|
||||
|
||||
sitename := c.PostForm("site_name")
|
||||
channelname := c.PostForm("channel_name")
|
||||
template_name := c.PostForm("template_name")
|
||||
template_desc := c.PostForm("template_desc")
|
||||
template_image := c.PostForm("template_img")
|
||||
template_channel := c.PostForm("template_type")
|
||||
userid := c.GetInt("userid")
|
||||
fmt.Println(sitename, channelname, template_name, "checkdata")
|
||||
|
||||
temp := menu.TblGoTemplates{
|
||||
|
||||
TemplateName: template_name,
|
||||
TemplateDescription: template_desc,
|
||||
TemplateImage: template_image,
|
||||
IsDeleted: 0,
|
||||
TenantId: TenantId,
|
||||
CreatedBy: userid,
|
||||
ChannelSlugName: template_channel,
|
||||
}
|
||||
|
||||
templateinfo, _ := MenuConfig.CreateTemplate(temp)
|
||||
|
||||
websiteinfo := menu.TblWebsite{
|
||||
Name: sitename,
|
||||
ChannelNames: channelname,
|
||||
TemplateId: templateinfo.Id,
|
||||
CreatedBy: userid,
|
||||
TenantId: TenantId,
|
||||
IsDeleted: 0,
|
||||
Status: 0,
|
||||
}
|
||||
|
||||
_, err1 := MenuConfig.CreateWebsite(websiteinfo)
|
||||
|
||||
if err1 != nil {
|
||||
|
||||
fmt.Println(err1)
|
||||
}
|
||||
c.SetCookie("get-toast", "Website Created Successfully", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/admin/website/")
|
||||
}
|
||||
|
||||
func UpdateWebsite(c *gin.Context) {
|
||||
webid, _ := strconv.Atoi(c.PostForm("website_id"))
|
||||
sitename := c.PostForm("site_name")
|
||||
channelname := c.PostForm("channel_name")
|
||||
template_id, _ := strconv.Atoi(c.PostForm("template_id"))
|
||||
template_name := c.PostForm("template_name")
|
||||
template_desc := c.PostForm("template_desc")
|
||||
template_image := c.PostForm("template_img")
|
||||
template_channel := c.PostForm("template_type")
|
||||
userid := c.GetInt("userid")
|
||||
fmt.Println(sitename, channelname, "checkdata")
|
||||
var templateid int
|
||||
temp := menu.TblGoTemplates{
|
||||
|
||||
TemplateName: template_name,
|
||||
TemplateDescription: template_desc,
|
||||
TemplateImage: template_image,
|
||||
IsDeleted: 0,
|
||||
TenantId: TenantId,
|
||||
CreatedBy: userid,
|
||||
ChannelSlugName: template_channel,
|
||||
}
|
||||
|
||||
if template_id == 0 {
|
||||
templateinfo, _ := MenuConfig.CreateTemplate(temp)
|
||||
|
||||
templateid = templateinfo.Id
|
||||
} else {
|
||||
|
||||
templateid = template_id
|
||||
}
|
||||
|
||||
websiteinfo := menu.TblWebsite{
|
||||
Id: webid,
|
||||
Name: sitename,
|
||||
ChannelNames: channelname,
|
||||
TemplateId: templateid,
|
||||
ModifiedBy: userid,
|
||||
TenantId: TenantId,
|
||||
}
|
||||
|
||||
_, err1 := MenuConfig.UpdateWebsite(websiteinfo)
|
||||
|
||||
if err1 != nil {
|
||||
|
||||
fmt.Println(err1)
|
||||
}
|
||||
c.SetCookie("get-toast", "Website Updated Successfully", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/admin/website/")
|
||||
|
||||
}
|
||||
|
||||
func DeleteWebsite(c *gin.Context) {
|
||||
|
||||
websiteid, _ := strconv.Atoi(c.Param("id"))
|
||||
|
||||
pageno := c.Query("page")
|
||||
|
||||
var url string
|
||||
|
||||
if pageno != "" {
|
||||
url = "/admin/website/?page=" + pageno
|
||||
} else {
|
||||
url = "/admin/website/"
|
||||
}
|
||||
|
||||
userid := c.GetInt("userid")
|
||||
|
||||
permisison, perr := NewAuth.IsGranted("Menu", auth.CRUD, TenantId)
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("Delete authorization error: %s", perr)
|
||||
}
|
||||
|
||||
if !permisison {
|
||||
c.Redirect(301, "/403-page")
|
||||
return
|
||||
}
|
||||
|
||||
err := MenuConfig.DeleteWebsite(websiteid, userid, TenantId)
|
||||
if err != nil {
|
||||
ErrorLog.Printf("Delete error: %s", perr)
|
||||
c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
return
|
||||
}
|
||||
|
||||
c.SetCookie("get-toast", "Website Deleted Successfully", 3600, "", "", false, false)
|
||||
c.Redirect(http.StatusMovedPermanently, url)
|
||||
}
|
||||
func CheckSiteName(c *gin.Context) {
|
||||
|
||||
subdomain := c.PostForm("sitename")
|
||||
|
||||
id, _ := strconv.Atoi(c.PostForm("webid"))
|
||||
|
||||
err := MenuConfig.CheckSiteName(subdomain, id)
|
||||
|
||||
if err != nil {
|
||||
|
||||
c.JSON(200, false)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(200, true)
|
||||
}
|
||||
Executable → Regular
+4
-4
@@ -194,7 +194,7 @@ func DeleteToken(c *gin.Context) {
|
||||
c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
}
|
||||
|
||||
c.Redirect(301, "/graphql/")
|
||||
c.Redirect(301, "/admin/graphql/")
|
||||
}
|
||||
|
||||
func GenerateApiToken(length int) (string, error) {
|
||||
@@ -230,9 +230,9 @@ func MultiDeleteGraphqlToken(c *gin.Context) {
|
||||
var url string
|
||||
|
||||
if pageno != "" {
|
||||
url = "/graphql/?page=" + pageno
|
||||
url = "/admin/graphql/?page=" + pageno
|
||||
} else {
|
||||
url = "/graphql/"
|
||||
url = "/admin/graphql/"
|
||||
|
||||
}
|
||||
|
||||
@@ -263,7 +263,7 @@ func MultiDeleteGraphqlToken(c *gin.Context) {
|
||||
|
||||
if currentPage > totalPages && totalPages > 0 {
|
||||
|
||||
url = "/graphql?page=" + strconv.Itoa(totalPages)
|
||||
url = "/admin/graphql?page=" + strconv.Itoa(totalPages)
|
||||
}
|
||||
|
||||
c.JSON(200, gin.H{"value": true, "url": url})
|
||||
Executable → Regular
+23
-23
@@ -120,7 +120,7 @@ func SetDefaultLanguage(c *gin.Context) {
|
||||
editedLang, err := models.SetDefaultLang(langId, isDefault, TenantId)
|
||||
if err != nil {
|
||||
c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
c.Redirect(301, "/settings/languages/")
|
||||
c.Redirect(301, "/admin/settings/languages/")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ func SetDefaultLanguage(c *gin.Context) {
|
||||
|
||||
// if c.PostForm("flag_imgpath") == "" || c.PostForm("lang_name") == "" || c.PostForm("lang_code") == "" {
|
||||
// c.SetCookie("Alert-msg", "Pleaseenterthemandatoryfields", 3600, "", "", false, false)
|
||||
// c.Redirect(301, "/settings/languages/")
|
||||
// c.Redirect(301, "/admin/languages/")
|
||||
// return
|
||||
// }
|
||||
|
||||
@@ -185,7 +185,7 @@ func SetDefaultLanguage(c *gin.Context) {
|
||||
|
||||
// ErrorLog.Printf("Add Language error: %s", err)
|
||||
// c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
// c.Redirect(301, "/settings/languages/")
|
||||
// c.Redirect(301, "/admin/languages/")
|
||||
|
||||
// return
|
||||
// }
|
||||
@@ -199,7 +199,7 @@ func SetDefaultLanguage(c *gin.Context) {
|
||||
|
||||
// ErrorLog.Printf("Add Language error: %s", err)
|
||||
// c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
// c.Redirect(301, "/settings/languages/")
|
||||
// c.Redirect(301, "/admin/languages/")
|
||||
|
||||
// return
|
||||
// }
|
||||
@@ -224,7 +224,7 @@ func SetDefaultLanguage(c *gin.Context) {
|
||||
|
||||
// ErrorLog.Printf("Add Language error: %s", err)
|
||||
// c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
// c.Redirect(301, "/settings/languages/")
|
||||
// c.Redirect(301, "/admin/languages/")
|
||||
|
||||
// return
|
||||
// }
|
||||
@@ -240,7 +240,7 @@ func SetDefaultLanguage(c *gin.Context) {
|
||||
|
||||
// ErrorLog.Printf("Add Language error: %s", err)
|
||||
// c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
// c.Redirect(301, "/settings/languages/")
|
||||
// c.Redirect(301, "/admin/languages/")
|
||||
|
||||
// return
|
||||
// }
|
||||
@@ -253,7 +253,7 @@ func SetDefaultLanguage(c *gin.Context) {
|
||||
|
||||
// ErrorLog.Printf("Add Language error: %s", err)
|
||||
// c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
// c.Redirect(301, "/settings/languages/")
|
||||
// c.Redirect(301, "/admin/languages/")
|
||||
|
||||
// return
|
||||
// }
|
||||
@@ -270,7 +270,7 @@ func SetDefaultLanguage(c *gin.Context) {
|
||||
|
||||
// ErrorLog.Printf("Add Language error: %s", err)
|
||||
// c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
// c.Redirect(301, "/settings/languages/")
|
||||
// c.Redirect(301, "/admin/languages/")
|
||||
|
||||
// return
|
||||
// }
|
||||
@@ -294,13 +294,13 @@ func SetDefaultLanguage(c *gin.Context) {
|
||||
// if err != nil {
|
||||
// ErrorLog.Printf("Add Language error: %s", err)
|
||||
// c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
// c.Redirect(301, "/settings/languages/")
|
||||
// c.Redirect(301, "/admin/languages/")
|
||||
// return
|
||||
// }
|
||||
|
||||
// c.SetCookie("get-toast", "Language Added Successfully", 3600, "", "", false, false)
|
||||
// c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
// c.Redirect(301, "/settings/languages/")
|
||||
// c.Redirect(301, "/admin/languages/")
|
||||
// }
|
||||
|
||||
// func EditLanguage(c *gin.Context) {
|
||||
@@ -328,7 +328,7 @@ func SetDefaultLanguage(c *gin.Context) {
|
||||
|
||||
// language.DefaultLanguageId = CurrentLanugageId
|
||||
|
||||
// c.JSON(200, gin.H{"csrf": csrf.GetToken(c), "Language": language, "UploadUrl": "/settings/languages/updatelanguage", "Button": "Update"})
|
||||
// c.JSON(200, gin.H{"csrf": csrf.GetToken(c), "Language": language, "UploadUrl": "/admin/languages/updatelanguage", "Button": "Update"})
|
||||
// }
|
||||
|
||||
// func UpdateLanguage(c *gin.Context) {
|
||||
@@ -336,7 +336,7 @@ func SetDefaultLanguage(c *gin.Context) {
|
||||
// if c.PostForm("lang_id") == "" || c.PostForm("lang_name") == "" {
|
||||
|
||||
// c.SetCookie("Alert-msg", "Pleaseenterthemandatoryfields", 3600, "", "", false, false)
|
||||
// c.Redirect(301, "/settings/languages/")
|
||||
// c.Redirect(301, "/admin/languages/")
|
||||
// return
|
||||
// }
|
||||
|
||||
@@ -357,7 +357,7 @@ func SetDefaultLanguage(c *gin.Context) {
|
||||
|
||||
// ErrorLog.Printf("Add Language error: %s", err)
|
||||
// c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
// c.Redirect(301, "/settings/languages/")
|
||||
// c.Redirect(301, "/admin/languages/")
|
||||
|
||||
// return
|
||||
// }
|
||||
@@ -376,7 +376,7 @@ func SetDefaultLanguage(c *gin.Context) {
|
||||
|
||||
// ErrorLog.Printf("Add Language error: %s", err)
|
||||
// c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
// c.Redirect(301, "/settings/languages/")
|
||||
// c.Redirect(301, "/admin/languages/")
|
||||
|
||||
// return
|
||||
// }
|
||||
@@ -392,7 +392,7 @@ func SetDefaultLanguage(c *gin.Context) {
|
||||
|
||||
// ErrorLog.Printf("Add Language error: %s", err)
|
||||
// c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
// c.Redirect(301, "/settings/languages/")
|
||||
// c.Redirect(301, "/admin/languages/")
|
||||
|
||||
// return
|
||||
// }
|
||||
@@ -405,7 +405,7 @@ func SetDefaultLanguage(c *gin.Context) {
|
||||
|
||||
// ErrorLog.Printf("Add Language error: %s", err)
|
||||
// c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
// c.Redirect(301, "/settings/languages/")
|
||||
// c.Redirect(301, "/admin/languages/")
|
||||
|
||||
// return
|
||||
// }
|
||||
@@ -420,7 +420,7 @@ func SetDefaultLanguage(c *gin.Context) {
|
||||
|
||||
// ErrorLog.Printf("Add Language error: %s", err)
|
||||
// c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
// c.Redirect(301, "/settings/languages/")
|
||||
// c.Redirect(301, "/admin/languages/")
|
||||
|
||||
// return
|
||||
// }
|
||||
@@ -472,7 +472,7 @@ func SetDefaultLanguage(c *gin.Context) {
|
||||
// err = models.UpdateLanguage(&editLanguage, c.GetInt("userid"), TenantId)
|
||||
// if err != nil {
|
||||
// c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
// c.Redirect(301, "/settings/languages/")
|
||||
// c.Redirect(301, "/admin/languages/")
|
||||
// return
|
||||
// }
|
||||
|
||||
@@ -500,7 +500,7 @@ func SetDefaultLanguage(c *gin.Context) {
|
||||
|
||||
// c.SetCookie("get-toast", "Language Updated Successfully", 3600, "", "", false, false)
|
||||
// c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
// c.Redirect(301, "/settings/languages/")
|
||||
// c.Redirect(301, "/admin/languages/")
|
||||
|
||||
// }
|
||||
|
||||
@@ -522,7 +522,7 @@ func SetDefaultLanguage(c *gin.Context) {
|
||||
// if languageId == default_lang.Id || languageId == 1 {
|
||||
|
||||
// c.SetCookie("Alert-msg", "DefaultLanguageNotAllowedToDelete", 3600, "", "", false, false)
|
||||
// c.Redirect(301, "/settings/languages/")
|
||||
// c.Redirect(301, "/admin/languages/")
|
||||
// return
|
||||
// }
|
||||
|
||||
@@ -560,7 +560,7 @@ func SetDefaultLanguage(c *gin.Context) {
|
||||
|
||||
// c.SetCookie("get-toast", "Language Deleted Successfully", 3600, "", "", false, false)
|
||||
// c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
// c.Redirect(301, "/settings/languages/")
|
||||
// c.Redirect(301, "/admin/languages/")
|
||||
// }
|
||||
|
||||
// func DownloadLanguage(c *gin.Context) {
|
||||
@@ -663,7 +663,7 @@ func SetDefaultLanguage(c *gin.Context) {
|
||||
// return
|
||||
// }
|
||||
|
||||
// c.JSON(200, gin.H{"value": true, "url": "/settings/languages/"})
|
||||
// c.JSON(200, gin.H{"value": true, "url": "/admin/languages/"})
|
||||
// }
|
||||
|
||||
// func MultiSelectLanguageStatus(c *gin.Context) {
|
||||
@@ -706,6 +706,6 @@ func SetDefaultLanguage(c *gin.Context) {
|
||||
// return
|
||||
// }
|
||||
|
||||
// c.JSON(200, gin.H{"value": true, "status": status, "url": "/settings/languages/"})
|
||||
// c.JSON(200, gin.H{"value": true, "status": status, "url": "/admin/languages/"})
|
||||
|
||||
// }
|
||||
@@ -403,6 +403,8 @@ func DocumentResize(c *gin.Context) {
|
||||
c.Data(http.StatusOK, "application/vnd.openxmlformats-officedocument.wordprocessingml.document", documentData)
|
||||
case ".txt":
|
||||
c.Data(http.StatusOK, "text/plain", documentData)
|
||||
case ".zip":
|
||||
c.Data(http.StatusOK, "application/zip", documentData)
|
||||
default:
|
||||
c.JSON(http.StatusUnsupportedMediaType, gin.H{"error": "Unsupported document format"})
|
||||
}
|
||||
Executable → Regular
Executable → Regular
+20
-20
@@ -175,7 +175,7 @@ func CreateMember(c *gin.Context) {
|
||||
uerr := storagecontroller.UploadCropImageS3(imageName, imagePath, imageByte)
|
||||
if uerr != nil {
|
||||
c.SetCookie("Alert-msg", "ERRORAWScredentialsnotfound", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/user/")
|
||||
c.Redirect(301, "/admin/user/")
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -245,7 +245,7 @@ func CreateMember(c *gin.Context) {
|
||||
|
||||
if strings.Contains(fmt.Sprint(err), "given some values is empty") {
|
||||
c.SetCookie("Alert-msg", "Pleaseenterthemandatoryfields", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/user/")
|
||||
c.Redirect(301, "/admin/user/")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -253,13 +253,13 @@ func CreateMember(c *gin.Context) {
|
||||
ErrorLog.Printf("memberprofile create error: %s", merr)
|
||||
c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "alert", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/user/")
|
||||
c.Redirect(301, "/admin/user/")
|
||||
return
|
||||
}
|
||||
|
||||
c.SetCookie("get-toast", "Member Created Successfully", 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/user/")
|
||||
c.Redirect(301, "/admin/user/")
|
||||
|
||||
// var email models.TblEmailTemplate
|
||||
// err = models.GetTemplates(&email, "Createmember", TenantId)
|
||||
@@ -408,9 +408,9 @@ func UpdateMember(c *gin.Context) {
|
||||
|
||||
var url string
|
||||
if pageno != "" {
|
||||
url = "/user?page=" + pageno
|
||||
url = "/admin/user?page=" + pageno
|
||||
} else {
|
||||
url = "/user/"
|
||||
url = "/admin/user/"
|
||||
}
|
||||
|
||||
var MemberGroupId, _ = strconv.Atoi(c.PostForm("membergroupvalue"))
|
||||
@@ -467,7 +467,7 @@ func UpdateMember(c *gin.Context) {
|
||||
uerr := storagecontroller.UploadCropImageS3(imageName, imagePath, imageByte)
|
||||
if uerr != nil {
|
||||
c.SetCookie("Alert-msg", "ERRORAWScredentialsnotfound", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/user/")
|
||||
c.Redirect(301, "/admin/user/")
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -490,7 +490,7 @@ func UpdateMember(c *gin.Context) {
|
||||
uerr := storagecontroller.UploadCropImageS3(imageName, companystoragepath, imageByte)
|
||||
if uerr != nil {
|
||||
c.SetCookie("Alert-msg", "ERRORAWScredentialsnotfound", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/user/")
|
||||
c.Redirect(301, "/admin/user/")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -620,9 +620,9 @@ func DeleteMember(c *gin.Context) {
|
||||
var url string
|
||||
|
||||
if pageno != "" {
|
||||
url = "/user?page=" + pageno
|
||||
url = "/admin/user?page=" + pageno
|
||||
} else {
|
||||
url = "/user/"
|
||||
url = "/admin/user/"
|
||||
}
|
||||
|
||||
userid := c.GetInt("userid")
|
||||
@@ -660,14 +660,14 @@ func DeleteMember(c *gin.Context) {
|
||||
|
||||
if currentPage > totalPages && totalPages > 0 {
|
||||
|
||||
url = "/user?page=" + strconv.Itoa(totalPages)
|
||||
url = "/admin/user?page=" + strconv.Itoa(totalPages)
|
||||
}
|
||||
|
||||
c.SetCookie("get-toast", "Member Deleted Successfully", 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
|
||||
if totalRecords == 0 {
|
||||
url = "/user?page=1"
|
||||
url = "/admin/user?page=1"
|
||||
}
|
||||
|
||||
c.Redirect(301, url)
|
||||
@@ -852,9 +852,9 @@ func MultiSelectDeleteMember(c *gin.Context) {
|
||||
|
||||
var url string
|
||||
if pageno != "" {
|
||||
url = "/user?page=" + pageno
|
||||
url = "/admin/user?page=" + pageno
|
||||
} else {
|
||||
url = "/user/"
|
||||
url = "/admin/user/"
|
||||
}
|
||||
|
||||
permisison, perr := NewAuth.IsGranted("Member", auth.Delete, TenantId)
|
||||
@@ -889,11 +889,11 @@ func MultiSelectDeleteMember(c *gin.Context) {
|
||||
|
||||
if currentPage > totalPages && totalPages > 0 {
|
||||
|
||||
url = "/user?page=" + strconv.Itoa(totalPages)
|
||||
url = "/admin/user?page=" + strconv.Itoa(totalPages)
|
||||
}
|
||||
|
||||
if totalRecords == 0 {
|
||||
url = "/user?page=1"
|
||||
url = "/admin/user?page=1"
|
||||
}
|
||||
c.JSON(200, gin.H{"value": true, "url": url})
|
||||
}
|
||||
@@ -931,9 +931,9 @@ func MultiSelectMembersStatus(c *gin.Context) {
|
||||
|
||||
var url string
|
||||
if pageno != "" {
|
||||
url = "/user?page=" + pageno
|
||||
url = "/admin/user?page=" + pageno
|
||||
} else {
|
||||
url = "/user/"
|
||||
url = "/admin/user/"
|
||||
}
|
||||
userid := c.GetInt("userid")
|
||||
permisison, perr := NewAuth.IsGranted("Member", auth.Update, TenantId)
|
||||
@@ -1040,7 +1040,7 @@ func ActivateClaimStatus(c *gin.Context) {
|
||||
ErrorLog.Println("member status not enable can't send mail")
|
||||
c.SetCookie("get-toast", "Member Claim Updated Successfully", 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/user")
|
||||
c.Redirect(301, "/admin/user")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1059,7 +1059,7 @@ func ActivateClaimStatus(c *gin.Context) {
|
||||
|
||||
c.SetCookie("get-toast", "Member Claim Updated Successfully", 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/user")
|
||||
c.Redirect(301, "/admin/user")
|
||||
}
|
||||
|
||||
// Get member profile
|
||||
Executable → Regular
+34
-37
@@ -106,7 +106,7 @@ func MemberGroupList(c *gin.Context) {
|
||||
TwoAfter: pageno + 2,
|
||||
TwoBelow: pageno - 2,
|
||||
ThreeAfter: pageno + 3,
|
||||
}, "title": ModuleName, "translate": translate, "Searchtrue": filterflag, "linktitle": "Member Group", "Menu": menu, "Limit": limt, "MemberGroupList": membergrouplist, "Count": Total_members, "Previous": Previous, "Page": Page, "Next": Next, "PageCount": PageCount, "CurrentPage": pageno, "Paginationendcount": paginationendcount, "Paginationstartcount": paginationstartcount, "HeadTitle": translate.Memberss.Members, "Filter": filter, "Membermenu": true, "Groupmenu": true, "Tabmenu": TabName, "permission": uper, "dpermission": dper})
|
||||
}, "title": ModuleName, "translate": translate, "Searchtrue": filterflag, "linktitle": "Users Group", "Menu": menu, "Limit": limt, "MemberGroupList": membergrouplist, "Count": Total_members, "Previous": Previous, "Page": Page, "Next": Next, "PageCount": PageCount, "CurrentPage": pageno, "Paginationendcount": paginationendcount, "Paginationstartcount": paginationstartcount, "HeadTitle": translate.Memberss.Members, "Filter": filter, "Membermenu": true, "Groupmenu": true, "Tabmenu": TabName, "permission": uper, "dpermission": dper})
|
||||
|
||||
}
|
||||
}
|
||||
@@ -145,20 +145,20 @@ func CreateNewMemberGroup(c *gin.Context) {
|
||||
|
||||
if strings.Contains(fmt.Sprint(err), "given some values is empty") {
|
||||
c.SetCookie("Alert-msg", "Pleaseenterthemandatoryfields", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/usergroup/")
|
||||
c.Redirect(301, "/admin/usergroup/")
|
||||
return
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "alert", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/usergroup/")
|
||||
c.Redirect(301, "/admin/usergroup/")
|
||||
return
|
||||
}
|
||||
|
||||
c.SetCookie("get-toast", "Member Group Created Successfully", 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/usergroup/")
|
||||
c.Redirect(301, "/admin/usergroup/")
|
||||
|
||||
} else {
|
||||
c.Redirect(301, "/403-page")
|
||||
@@ -174,9 +174,9 @@ func UpdateMemberGroup(c *gin.Context) {
|
||||
id, _ := strconv.Atoi(c.PostForm("membergroup_id"))
|
||||
pageno := c.PostForm("memgrbpageno")
|
||||
if pageno != "" {
|
||||
url = "/usergroup?page=" + pageno
|
||||
url = "/admin/usergroup?page=" + pageno
|
||||
} else {
|
||||
url = "/usergroup/"
|
||||
url = "/admin/usergroup/"
|
||||
}
|
||||
userid := c.GetInt("userid")
|
||||
|
||||
@@ -233,9 +233,9 @@ func DeleteMemberGroup(c *gin.Context) {
|
||||
MemberGroupId, _ := strconv.Atoi(c.Query("id"))
|
||||
pageno := c.Query("page")
|
||||
if pageno != "" {
|
||||
url = "/usergroup?page=" + pageno
|
||||
url = "/admin/usergroup?page=" + pageno
|
||||
} else {
|
||||
url = "/usergroup/"
|
||||
url = "/admin/usergroup/"
|
||||
}
|
||||
userid := c.GetInt("userid")
|
||||
|
||||
@@ -258,25 +258,24 @@ func DeleteMemberGroup(c *gin.Context) {
|
||||
ErrorLog.Printf("membergroup delete error: %s", err)
|
||||
}
|
||||
|
||||
_, Total_membergrp, err := MemberConfig.ListMemberGroup(mem.MemberGroupListReq{Keyword:""}, TenantId)
|
||||
_, Total_membergrp, err := MemberConfig.ListMemberGroup(mem.MemberGroupListReq{Keyword: ""}, TenantId)
|
||||
if err != nil {
|
||||
ErrorLog.Printf("membergroup list details error: %s", err)
|
||||
}
|
||||
|
||||
recordsPerPage := Limit
|
||||
totalPages := (int(Total_membergrp) + recordsPerPage - 1) / recordsPerPage
|
||||
|
||||
recordsPerPage := Limit
|
||||
totalPages := (int(Total_membergrp) + recordsPerPage - 1) / recordsPerPage
|
||||
currentPage := 1
|
||||
if pageno != "" {
|
||||
currentPage, _ = strconv.Atoi(pageno)
|
||||
}
|
||||
|
||||
currentPage := 1
|
||||
if pageno != "" {
|
||||
currentPage, _ = strconv.Atoi(pageno)
|
||||
}
|
||||
if currentPage > totalPages && totalPages > 0 {
|
||||
url = "/admin/usergroup?page=" + strconv.Itoa(totalPages)
|
||||
}
|
||||
|
||||
if currentPage > totalPages && totalPages > 0 {
|
||||
url = "/usergroup?page=" + strconv.Itoa(totalPages)
|
||||
}
|
||||
|
||||
fmt.Println("url",url)
|
||||
fmt.Println("url", url)
|
||||
if err != nil {
|
||||
c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "alert", 3600, "", "", false, false)
|
||||
@@ -378,9 +377,9 @@ func MultiSelectDeleteMembergroup(c *gin.Context) {
|
||||
pageno := c.PostForm("page")
|
||||
|
||||
if pageno != "" {
|
||||
url = "/usergroup?page=" + pageno
|
||||
url = "/admin/usergroup?page=" + pageno
|
||||
} else {
|
||||
url = "/usergroup/"
|
||||
url = "/admin/usergroup/"
|
||||
}
|
||||
|
||||
userid := c.GetInt("userid")
|
||||
@@ -405,23 +404,22 @@ func MultiSelectDeleteMembergroup(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
_, Total_membergrp, err := MemberConfig.ListMemberGroup(mem.MemberGroupListReq{Keyword:""}, TenantId)
|
||||
_, Total_membergrp, err := MemberConfig.ListMemberGroup(mem.MemberGroupListReq{Keyword: ""}, TenantId)
|
||||
if err != nil {
|
||||
ErrorLog.Printf("membergroup list details error: %s", err)
|
||||
}
|
||||
|
||||
recordsPerPage := Limit
|
||||
totalPages := (int(Total_membergrp) + recordsPerPage - 1) / recordsPerPage
|
||||
|
||||
recordsPerPage := Limit
|
||||
totalPages := (int(Total_membergrp) + recordsPerPage - 1) / recordsPerPage
|
||||
currentPage := 1
|
||||
if pageno != "" {
|
||||
currentPage, _ = strconv.Atoi(pageno)
|
||||
}
|
||||
|
||||
currentPage := 1
|
||||
if pageno != "" {
|
||||
currentPage, _ = strconv.Atoi(pageno)
|
||||
}
|
||||
|
||||
if currentPage > totalPages && totalPages > 0 {
|
||||
url = "/usergroup?page=" + strconv.Itoa(totalPages)
|
||||
}
|
||||
if currentPage > totalPages && totalPages > 0 {
|
||||
url = "/admin/usergroup?page=" + strconv.Itoa(totalPages)
|
||||
}
|
||||
|
||||
c.JSON(200, gin.H{"value": true, "url": url})
|
||||
|
||||
@@ -462,9 +460,9 @@ func MultiSelectMembersgroupStatus(c *gin.Context) {
|
||||
|
||||
var url string
|
||||
if pageno != "" {
|
||||
url = "/usergroup?page=" + pageno
|
||||
url = "/admin/usergroup?page=" + pageno
|
||||
} else {
|
||||
url = "/usergroup/"
|
||||
url = "/admin/usergroup/"
|
||||
}
|
||||
|
||||
userid := c.GetInt("userid")
|
||||
@@ -504,7 +502,6 @@ func Chkmemgrphavemember(c *gin.Context) {
|
||||
)
|
||||
memgrp_id, _ := strconv.Atoi(c.PostForm("id"))
|
||||
|
||||
|
||||
if err := json.Unmarshal([]byte(c.Request.PostFormValue("membergrpids")), &membergrpdata); err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
@@ -513,7 +510,7 @@ func Chkmemgrphavemember(c *gin.Context) {
|
||||
Membergrpids = append(Membergrpids, memberid)
|
||||
}
|
||||
|
||||
_, err := MemberConfig.Membergroupcheckmember(memgrp_id,Membergrpids, TenantId)
|
||||
_, err := MemberConfig.Membergroupcheckmember(memgrp_id, Membergrpids, TenantId)
|
||||
|
||||
if err != nil {
|
||||
ErrorLog.Printf("Member group check hane Error :%s", err)
|
||||
Executable → Regular
Executable → Regular
+17
-4
@@ -1,7 +1,6 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"spurt-cms/config"
|
||||
@@ -73,6 +72,7 @@ type USR struct {
|
||||
TblPageTypes []TablePageType
|
||||
ChannelID int
|
||||
LastUpdatedOn string
|
||||
WebsiteUrl string
|
||||
}
|
||||
|
||||
type TblModulePermission struct {
|
||||
@@ -410,11 +410,23 @@ func NewMenuController(c *gin.Context) USR {
|
||||
|
||||
}
|
||||
|
||||
ChannelId, err := ChannelConfig.DefaultChannel("default_channel", TenantId)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
// ChannelId, err := ChannelConfig.DefaultChannel("default_channel", TenantId)
|
||||
// if err != nil {
|
||||
// fmt.Println(err)
|
||||
// }
|
||||
channelist, clerr := ChannelConfig.GetPermissionChannel(TenantId)
|
||||
if clerr != nil {
|
||||
ErrorLog.Printf(" Entry listchannel error: %s", clerr)
|
||||
}
|
||||
var ChannelId int
|
||||
|
||||
if len(channelist) != 0 {
|
||||
|
||||
selectedchannel := channelist[len(channelist)-1]
|
||||
|
||||
ChannelId = selectedchannel.Id
|
||||
|
||||
}
|
||||
Mod := USR{
|
||||
TblModule: Final,
|
||||
Name: user.FirstName + " " + user.LastName,
|
||||
@@ -434,6 +446,7 @@ func NewMenuController(c *gin.Context) USR {
|
||||
TblPageTypes: pagetype,
|
||||
ChannelID: ChannelId,
|
||||
LastUpdatedOn: LastUpdatedTime,
|
||||
WebsiteUrl: os.Getenv("WEBSITE_URL"),
|
||||
}
|
||||
|
||||
return Mod
|
||||
Executable → Regular
+75
@@ -7,9 +7,14 @@ import (
|
||||
"github.com/spurtcms/blocks"
|
||||
cat "github.com/spurtcms/categories"
|
||||
chn "github.com/spurtcms/channels"
|
||||
courses "github.com/spurtcms/courses"
|
||||
forms "github.com/spurtcms/forms-builders"
|
||||
listing "github.com/spurtcms/listing"
|
||||
mem "github.com/spurtcms/member"
|
||||
memaccess "github.com/spurtcms/member-access"
|
||||
memship "github.com/spurtcms/membership"
|
||||
"github.com/spurtcms/menu"
|
||||
menus "github.com/spurtcms/menu"
|
||||
"github.com/spurtcms/team"
|
||||
role "github.com/spurtcms/team-roles"
|
||||
)
|
||||
@@ -28,6 +33,11 @@ var (
|
||||
MemberaccessConfig *memaccess.AccessControl
|
||||
BlockConfig *blocks.Block
|
||||
FormConfig *forms.Formbuilders
|
||||
MembershipConfig *memship.Membership
|
||||
CoursesConfig *courses.Courses
|
||||
MenuConfig *menus.Menu
|
||||
MenuConfigWp *menus.Menu
|
||||
ListingConfig *listing.Listing
|
||||
)
|
||||
|
||||
// AuthCofing
|
||||
@@ -209,6 +219,66 @@ func GetFormInstance() *forms.Formbuilders {
|
||||
return FormConfig
|
||||
}
|
||||
|
||||
func GetMembershipInstance() *memship.Membership {
|
||||
|
||||
MembershipConfig = memship.MembershipSetup(memship.Config{
|
||||
DB: DB,
|
||||
AuthEnable: true,
|
||||
PermissionEnable: false,
|
||||
Auth: NewAuth,
|
||||
})
|
||||
|
||||
return MembershipConfig
|
||||
}
|
||||
|
||||
func GetCoursesInstance() *courses.Courses {
|
||||
|
||||
CoursesConfig = courses.CoursesSetup(courses.Config{
|
||||
DB: DB,
|
||||
AuthEnable: true,
|
||||
PermissionEnable: false,
|
||||
Auth: NewAuth,
|
||||
})
|
||||
|
||||
return CoursesConfig
|
||||
}
|
||||
|
||||
func GetListingInstance() *listing.Listing {
|
||||
|
||||
ListingConfig = listing.ListingSetup(listing.Config{
|
||||
DB: DB,
|
||||
AuthEnable: true,
|
||||
PermissionEnable: false,
|
||||
Auth: NewAuth,
|
||||
})
|
||||
|
||||
return ListingConfig
|
||||
}
|
||||
|
||||
func GetMenuInstrance() *menu.Menu {
|
||||
|
||||
MenuConfig = menu.MenuSetup(menu.Config{
|
||||
|
||||
DB: DB,
|
||||
AuthEnable: true,
|
||||
PermissionEnable: true,
|
||||
Auth: NewAuth,
|
||||
})
|
||||
|
||||
return MenuConfig
|
||||
}
|
||||
func GetMenuInstranceWithoutPermission() *menu.Menu {
|
||||
|
||||
MenuConfigWp = menu.MenuSetup(menu.Config{
|
||||
|
||||
DB: DB,
|
||||
AuthEnable: true,
|
||||
PermissionEnable: false,
|
||||
Auth: NewAuth,
|
||||
})
|
||||
|
||||
return MenuConfigWp
|
||||
}
|
||||
func PackageInitialize() {
|
||||
AuthConfig()
|
||||
GetTeamInstance()
|
||||
@@ -221,6 +291,11 @@ func PackageInitialize() {
|
||||
GetRoleInstanceWithoutPermission()
|
||||
GetMemberInstanceWithoutPermission()
|
||||
GetChannelInstanceWithoutPermission()
|
||||
GetCoursesInstance()
|
||||
GetBlockInstance()
|
||||
GetFormInstance()
|
||||
GetMenuInstrance()
|
||||
GetMenuInstranceWithoutPermission()
|
||||
GetListingInstance()
|
||||
GetMembershipInstance()
|
||||
}
|
||||
Executable → Regular
+8
-8
@@ -266,9 +266,9 @@ func DeleteRole(c *gin.Context) {
|
||||
|
||||
var url string
|
||||
if pageno != "" {
|
||||
url = "/settings/roles?page=" + pageno
|
||||
url = "/admin/settings/roles?page=" + pageno
|
||||
} else {
|
||||
url = "/settings/roles/"
|
||||
url = "/admin/settings/roles/"
|
||||
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@ func DeleteRole(c *gin.Context) {
|
||||
}
|
||||
|
||||
if currentPage > totalPages && totalPages > 0 {
|
||||
url = "/settings/roles?page=" + strconv.Itoa(totalPages)
|
||||
url = "/admin/settings/roles?page=" + strconv.Itoa(totalPages)
|
||||
}
|
||||
|
||||
c.SetCookie("get-toast", "Role Deleted Successfully", 3600, "", "", false, false)
|
||||
@@ -370,9 +370,9 @@ func MultiselectRoleDelete(c *gin.Context) {
|
||||
pageno := c.PostForm("page")
|
||||
var url string
|
||||
if pageno != "" {
|
||||
url = "/settings/roles?page=" + pageno
|
||||
url = "/admin/settings/roles?page=" + pageno
|
||||
} else {
|
||||
url = "/settings/roles/"
|
||||
url = "/admin/settings/roles/"
|
||||
|
||||
}
|
||||
|
||||
@@ -408,7 +408,7 @@ func MultiselectRoleDelete(c *gin.Context) {
|
||||
}
|
||||
|
||||
if currentPage > totalPages && totalPages > 0 {
|
||||
url = "/settings/roles?page=" + strconv.Itoa(totalPages)
|
||||
url = "/admin/settings/roles?page=" + strconv.Itoa(totalPages)
|
||||
}
|
||||
|
||||
c.JSON(200, gin.H{"value": true, "url": url})
|
||||
@@ -447,9 +447,9 @@ func MultiSelectRoleStatus(c *gin.Context) {
|
||||
pageno := c.PostForm("page")
|
||||
var url string
|
||||
if pageno != "" {
|
||||
url = "/settings/roles?page=" + pageno
|
||||
url = "/admin/settings/roles?page=" + pageno
|
||||
} else {
|
||||
url = "/settings/roles/"
|
||||
url = "/admin/settings/roles/"
|
||||
|
||||
}
|
||||
|
||||
Executable → Regular
+13
-63
@@ -64,7 +64,7 @@ func MyProfile(c *gin.Context) {
|
||||
var Name = firstn + lastn
|
||||
users.NameString = Name
|
||||
|
||||
Role, err := NewRole.GetRoleById(users.RoleId, users.TenantId)
|
||||
Role, err := NewRole.GetRoleById(users.RoleId, "")
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
}
|
||||
@@ -74,7 +74,7 @@ func MyProfile(c *gin.Context) {
|
||||
// Folder, File, Media, _, _ := GetMedia()
|
||||
selectedtype, _ := GetSelectedType()
|
||||
|
||||
c.HTML(200, "myaccount.html", gin.H{"Menu": menu, "title": "My Account", "linktitle": "My Account", "csrf": csrf.GetToken(c), "HeadTitle": translate.Myprofile, "translate": translate, "user": users, "rolename": Role.Name, "SettingsHead": true, "Myprofmenu": true, "Tooltiptitle": translate.Setting.Myprofiletooltip, "StorageType": selectedtype.SelectedType})
|
||||
c.HTML(200, "myaccount.html", gin.H{"Menu": menu, "title": "My Account", "linktitle": "My Account", "csrf": csrf.GetToken(c), "HeadTitle": translate.Myprofile, "translate": translate, "user": users, "rolename": Role.Name, "SettingsHead": true, "Myprofmenu": true, "Tooltiptitle": translate.Setting.Myprofiletooltip,"StorageType": selectedtype.SelectedType})
|
||||
}
|
||||
|
||||
func ChangePassword(c *gin.Context) {
|
||||
@@ -90,7 +90,7 @@ func UpdateProfile(c *gin.Context) {
|
||||
|
||||
if c.PostForm("user_fname") == "" || c.PostForm("user_email") == "" || c.PostForm("user_mob") == "" || c.PostForm("user_name") == "" {
|
||||
c.SetCookie("Alert-msg", "Pleaseenterthemandatoryfields", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/settings/myprofile/")
|
||||
c.Redirect(301, "/admin/settings/myprofile/")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -100,14 +100,10 @@ func UpdateProfile(c *gin.Context) {
|
||||
)
|
||||
|
||||
storageType, err := GetSelectedType()
|
||||
|
||||
fmt.Println("storageType:", storageType.SelectedType)
|
||||
fmt.Println("storageType:", storageType)
|
||||
if err != nil {
|
||||
|
||||
c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "alert", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/settings/myprofile/")
|
||||
c.Redirect(301, "/admin/settings/myprofile/")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -119,7 +115,7 @@ func UpdateProfile(c *gin.Context) {
|
||||
if err != nil {
|
||||
c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "alert", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/settings/myprofile/")
|
||||
c.Redirect(301, "/admin/settings/myprofile/")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -133,7 +129,7 @@ func UpdateProfile(c *gin.Context) {
|
||||
if err != nil {
|
||||
c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "alert", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/settings/myprofile/")
|
||||
c.Redirect(301, "/admin/settings/myprofile/")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -141,9 +137,8 @@ func UpdateProfile(c *gin.Context) {
|
||||
|
||||
err = storagecontroller.UploadCropImageS3(imageName, tempString, imageByte)
|
||||
if err != nil {
|
||||
fmt.Println("ERRORAWScredentialsnotfound:")
|
||||
c.SetCookie("Alert-msg", "ERRORAWScredentialsnotfound", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/settings/myprofile/")
|
||||
c.Redirect(301, "/admin/settings/myprofile/")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -157,7 +152,7 @@ func UpdateProfile(c *gin.Context) {
|
||||
if err != nil {
|
||||
c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "alert", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/settings/myprofile/")
|
||||
c.Redirect(301, "/admin/settings/myprofile/")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -190,20 +185,18 @@ func UpdateProfile(c *gin.Context) {
|
||||
if err != nil {
|
||||
c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "alert", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/settings/myprofile/")
|
||||
c.Redirect(301, "/admin/settings/myprofile/")
|
||||
return
|
||||
}
|
||||
|
||||
c.SetCookie("get-toast", "My Profile Updated Successfully", 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/settings/myprofile/")
|
||||
c.Redirect(301, "/admin/settings/myprofile/")
|
||||
|
||||
}
|
||||
|
||||
func UptPassword(c *gin.Context) {
|
||||
|
||||
fmt.Println("checkpass")
|
||||
|
||||
userid := c.GetInt("userid")
|
||||
|
||||
pswd := c.PostForm("pass")
|
||||
@@ -214,7 +207,7 @@ func UptPassword(c *gin.Context) {
|
||||
|
||||
c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
|
||||
c.Redirect(301, "/settings/changepassword")
|
||||
c.Redirect(301, "/admin/settings/changepassword")
|
||||
|
||||
return
|
||||
|
||||
@@ -226,7 +219,7 @@ func UptPassword(c *gin.Context) {
|
||||
|
||||
c.SetCookie("Alert-msg", "Pleaseenterthemandatoryfields", 3600, "", "", false, false)
|
||||
|
||||
c.Redirect(301, "/settings/changepassword")
|
||||
c.Redirect(301, "/admin/settings/changepassword")
|
||||
|
||||
return
|
||||
|
||||
@@ -236,54 +229,11 @@ func UptPassword(c *gin.Context) {
|
||||
|
||||
c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
|
||||
c.Redirect(301, "/settings/changepassword")
|
||||
c.Redirect(301, "/admin/settings/changepassword")
|
||||
|
||||
}
|
||||
// id := c.GetInt("userid")
|
||||
|
||||
// userdet, _, _ := NewTeamWP.GetUserById(id, []int{})
|
||||
|
||||
// fname := userdet.FirstName
|
||||
|
||||
// email := userdet.Email
|
||||
|
||||
// var url_prefix = os.Getenv("BASE_URL")
|
||||
|
||||
// linkedin := os.Getenv("LINKEDIN")
|
||||
// facebook := os.Getenv("FACEBOOK")
|
||||
// twitter := os.Getenv("TWITTER")
|
||||
// youtube := os.Getenv("YOUTUBE")
|
||||
// insta := os.Getenv("INSTAGRAM")
|
||||
|
||||
// data := map[string]interface{}{
|
||||
|
||||
// "fname": fname,
|
||||
// "admin_logo": url_prefix + "public/img/SpurtCMSlogo.png",
|
||||
// "fb_logo": url_prefix + "public/img/email-icons/facebook.png",
|
||||
// "linkedin_logo": url_prefix + "public/img/email-icons/linkedin.png",
|
||||
// "twitter_logo": url_prefix + "public/img/email-icons/x.png",
|
||||
// "youtube_logo": url_prefix + "public/img/email-icons/youtube.png",
|
||||
// "insta_log": url_prefix + "public/img/email-icons/instagram.png",
|
||||
// "facebook": facebook,
|
||||
// "instagram": insta,
|
||||
// "youtube": youtube,
|
||||
// "linkedin": linkedin,
|
||||
// "twitter": twitter,
|
||||
// "password": cpswd,
|
||||
// }
|
||||
|
||||
// var wg sync.WaitGroup
|
||||
|
||||
// wg.Add(1)
|
||||
|
||||
// Chan := make(chan string, 1)
|
||||
|
||||
// go ChangePasswordEmail(Chan, &wg, data, email, "changepassword")
|
||||
|
||||
// close(Chan)
|
||||
|
||||
}
|
||||
|
||||
func CheckPassword(c *gin.Context) {
|
||||
|
||||
var Password bool
|
||||
Executable → Regular
+2
-2
@@ -16,11 +16,11 @@ func Personalization(c *gin.Context) {
|
||||
var logo = personalize_data.LogoPath
|
||||
|
||||
menu := NewMenuController(c)
|
||||
// Folder, File, Media, _, _ := GetMedia()
|
||||
Folder, File, Media, _, _ := GetMedia()
|
||||
translate, _ := TranslateHandler(c)
|
||||
selectedtype, _ := GetSelectedType()
|
||||
|
||||
c.HTML(200, "personalize.html", gin.H{"Menu": menu,"linktitle":"Personalize", "title": "Personalize", "csrf": csrf.GetToken(c), "HeadTitle": translate.Setting.Personalize, "translate": translate, "logo": logo, "SettingsHead": true, "Personalizemenu": true, "Tooltiptitle": translate.Setting.Personalizetooltip, "StorageType": selectedtype.SelectedType})
|
||||
c.HTML(200, "personalize.html", gin.H{"Menu": menu,"linktitle":"Personalize", "title": "Personalize", "csrf": csrf.GetToken(c), "HeadTitle": translate.Setting.Personalize, "translate": translate, "Folder": Folder, "File": File, "Media": Media, "logo": logo, "SettingsHead": true, "Personalizemenu": true, "Tooltiptitle": translate.Setting.Personalizetooltip, "StorageType": selectedtype.SelectedType})
|
||||
}
|
||||
|
||||
func PersonalizationUpdate(c *gin.Context) {
|
||||
@@ -0,0 +1,693 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/spurtcms/auth"
|
||||
chn "github.com/spurtcms/channels"
|
||||
"github.com/spurtcms/courses"
|
||||
forms "github.com/spurtcms/forms-builders"
|
||||
"github.com/spurtcms/listing"
|
||||
menu "github.com/spurtcms/menu"
|
||||
csrf "github.com/utrack/gin-csrf"
|
||||
)
|
||||
|
||||
// ContentMenuList
|
||||
func MenuList(c *gin.Context) {
|
||||
|
||||
var (
|
||||
limt int
|
||||
offset int
|
||||
filter menu.Filter
|
||||
FinalMenusList []menu.TblMenus
|
||||
)
|
||||
|
||||
//get values from url query
|
||||
limit := c.Query("limit")
|
||||
pageno, _ := strconv.Atoi(c.DefaultQuery("page", "1"))
|
||||
filter.Keyword = strings.Trim(c.DefaultQuery("keyword", ""), " ")
|
||||
filter.Status = strings.Trim(c.DefaultQuery("status", ""), " ")
|
||||
filter.ToDate = strings.Trim(c.DefaultQuery("lastupdated", ""), " ")
|
||||
webid, _ := strconv.Atoi(c.Query("webid"))
|
||||
var filterflag bool
|
||||
if filter.Keyword != "" {
|
||||
filterflag = true
|
||||
} else {
|
||||
filterflag = false
|
||||
}
|
||||
|
||||
if limit == "" {
|
||||
limt = Limit
|
||||
} else {
|
||||
limt, _ = strconv.Atoi(limit)
|
||||
}
|
||||
|
||||
if pageno != 0 {
|
||||
offset = (pageno - 1) * limt
|
||||
}
|
||||
permission, perr := NewAuth.IsGranted("Menu", auth.CRUD, TenantId)
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("menu authorization error:%s", perr)
|
||||
c.AbortWithStatus(http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
|
||||
if !permission {
|
||||
ErrorLog.Printf("menu authorization error")
|
||||
c.Redirect(http.StatusMovedPermanently, "/403-page")
|
||||
return
|
||||
}
|
||||
|
||||
MenuConfig.DataAccess = c.GetInt("dataaccess")
|
||||
MenuConfig.UserId = c.GetInt("userid")
|
||||
|
||||
Menulist, Total_count, err := MenuConfig.MenuList(limt, offset, menu.Filter(filter), TenantId, webid)
|
||||
|
||||
if err != nil {
|
||||
ErrorLog.Printf("menu list error: %s", err)
|
||||
}
|
||||
for _, val := range Menulist {
|
||||
|
||||
if !val.ModifiedOn.IsZero() {
|
||||
val.DateString = val.ModifiedOn.In(TZONE).Format(Datelayout)
|
||||
} else {
|
||||
val.DateString = val.CreatedOn.In(TZONE).Format(Datelayout)
|
||||
}
|
||||
|
||||
menuitemslist, _ := MenuConfig.GetMenusByParentid(val.Id, TenantId)
|
||||
|
||||
val.MenuitemCount = len(menuitemslist) - 1
|
||||
|
||||
fmt.Println("lengdffd", len(menuitemslist))
|
||||
FinalMenusList = append(FinalMenusList, val)
|
||||
|
||||
}
|
||||
|
||||
//pagination calc
|
||||
paginationendcount := len(Menulist) + offset
|
||||
paginationstartcount := offset + 1
|
||||
Previous, Next, PageCount, Page := Pagination(pageno, int(Total_count), limt)
|
||||
|
||||
webbanner, _ := c.Cookie("webbanner")
|
||||
|
||||
if webbanner == "" {
|
||||
|
||||
webbanner = "true"
|
||||
}
|
||||
|
||||
ModuleName, TabName, _ := ModuleRouteName(c)
|
||||
|
||||
translate, _ := TranslateHandler(c)
|
||||
|
||||
var pages bool
|
||||
|
||||
if webid != 0 {
|
||||
pages = true
|
||||
|
||||
}
|
||||
|
||||
Websitedet, _ := MenuConfig.GetWebsiteById(webid, TenantId)
|
||||
templatedetail, err := MenuConfig.GetTemplateById(Websitedet.TemplateId, TenantId)
|
||||
|
||||
if err != nil {
|
||||
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
templatedetail.DateString = templatedetail.CreatedOn.In(TZONE).Format(Datelayout)
|
||||
|
||||
c.HTML(200, "menulist.html", gin.H{"Pagination": PaginationData{
|
||||
NextPage: pageno + 1,
|
||||
PreviousPage: pageno - 1,
|
||||
TotalPages: PageCount,
|
||||
TwoAfter: pageno + 2,
|
||||
TwoBelow: pageno - 2,
|
||||
ThreeAfter: pageno + 3,
|
||||
}, "Searchtrue": filterflag, "webbanner": webbanner, "websitedetail": Websitedet, "gotemplatepageheader": pages, "templatedetail": templatedetail, "Count": Total_count, "Limit": limt, "csrf": csrf.GetToken(c), "title": ModuleName, "Tabmenu": TabName, "translate": translate, "Menulist": FinalMenusList, "Menu": NewMenuController(c), "linktitle": "Menus", "Paginationendcount": paginationendcount, "Previous": Previous, "Next": Next, "PageCount": PageCount, "CurrentPage": pageno, "Page": Page, "Filter": filter, "Paginationstartcount": paginationstartcount, "HeadTitle": "Menu"})
|
||||
|
||||
}
|
||||
|
||||
// Content MenuItemsList
|
||||
func MenuIemsList(c *gin.Context) {
|
||||
|
||||
permission, perr := NewAuth.IsGranted("Menu", auth.CRUD, TenantId)
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("menu authorization error:%s", perr)
|
||||
c.AbortWithStatus(http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
|
||||
if !permission {
|
||||
ErrorLog.Printf("menu authorization error")
|
||||
c.Redirect(http.StatusMovedPermanently, "/403-page")
|
||||
return
|
||||
}
|
||||
var recentChannels []chn.Tblchannel
|
||||
var recentCourses []courses.TblCourses
|
||||
var recentForms []forms.TblForms
|
||||
TenMinutesAgo := time.Now().Add(-60 * time.Minute)
|
||||
channelist, _, clerr := ChannelConfig.ListChannel(chn.Channels{Limit: 100, Offset: 0, IsActive: true, TenantId: TenantId})
|
||||
if clerr != nil {
|
||||
ErrorLog.Printf("channellist error :%s", clerr)
|
||||
}
|
||||
|
||||
courseslist, _, err := CoursesConfig.CoursesList(100, 0, courses.Filter{}, TenantId)
|
||||
if err != nil {
|
||||
ErrorLog.Printf("courselist error :%s", err)
|
||||
}
|
||||
|
||||
Formlist, _, _, err := FormConfig.FormBuildersList(100, 0, forms.Filter{}, TenantId, 1, 0, "", 0)
|
||||
|
||||
if err != nil {
|
||||
ErrorLog.Printf("formslist error :%s", err)
|
||||
}
|
||||
for _, val := range channelist {
|
||||
if val.CreatedOn.After(TenMinutesAgo) {
|
||||
recentChannels = append(recentChannels, val)
|
||||
}
|
||||
}
|
||||
for _, val := range courseslist {
|
||||
if val.CreatedOn.After(TenMinutesAgo) {
|
||||
recentCourses = append(recentCourses, val)
|
||||
}
|
||||
}
|
||||
for _, val := range Formlist {
|
||||
if val.CreatedOn.After(TenMinutesAgo) {
|
||||
recentForms = append(recentForms, val)
|
||||
}
|
||||
}
|
||||
|
||||
fmt.Println(recentChannels, "channellistsdf")
|
||||
menuid, _ := strconv.Atoi(c.Param("id"))
|
||||
|
||||
menuitemslist, err := MenuConfig.GetMenusByParentid(menuid, TenantId)
|
||||
|
||||
menudetails, _ := MenuConfig.GetmenyById(menuid, TenantId)
|
||||
|
||||
ModuleName, TabName, _ := ModuleRouteName(c)
|
||||
|
||||
translate, _ := TranslateHandler(c)
|
||||
|
||||
webid, _ := strconv.Atoi(c.Query("webid"))
|
||||
|
||||
var pages bool
|
||||
|
||||
if webid != 0 {
|
||||
pages = true
|
||||
|
||||
}
|
||||
|
||||
Websitedet, _ := MenuConfig.GetWebsiteById(webid, TenantId)
|
||||
templatedetail, err := MenuConfig.GetTemplateById(Websitedet.TemplateId, TenantId)
|
||||
|
||||
if err != nil {
|
||||
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
Entrylist, _, _, _ := ChannelConfig.ChannelEntriesList(chn.Entries{}, TenantId)
|
||||
|
||||
pagelist, _, err := MenuConfig.GetTemplatePageList(100, 0, menu.Filter{Status: "Active"}, TenantId, webid)
|
||||
|
||||
listinglist, _, err := ListingConfig.ListingsList(0, 0, listing.Filter{}, TenantId)
|
||||
if err != nil {
|
||||
fmt.Printf("Unable to fetch Listings List:%v", err)
|
||||
}
|
||||
|
||||
c.HTML(200, "menuitems.html", gin.H{"csrf": csrf.GetToken(c), "websitedetail": Websitedet, "Entrylist": Entrylist, "pagelist": pagelist, "listinglist": listinglist, "gotemplatepageheader": pages, "templatedetail": templatedetail, "recentChannels": recentChannels, "recentCourses": recentCourses, "recentForms": recentForms, "menudetails": menudetails, "menuitemslist": menuitemslist, "title": ModuleName, "Tabmenu": TabName, "translate": translate, "Menu": NewMenuController(c), "linktitle": "Menus Items", "channelist": channelist, "courselist": courseslist, "Formlist": Formlist, "menuid": menuid})
|
||||
|
||||
}
|
||||
|
||||
// CreateMenu
|
||||
func CreateMenu(c *gin.Context) {
|
||||
|
||||
menuname := c.PostForm("menu_name")
|
||||
|
||||
menudesc := c.PostForm("menu_desc")
|
||||
|
||||
userid := c.GetInt("userid")
|
||||
|
||||
websiteid := c.Query("webid")
|
||||
|
||||
fmt.Println("websiteiddd", websiteid)
|
||||
|
||||
webid, _ := strconv.Atoi(c.Query("webid"))
|
||||
|
||||
menustatus, _ := strconv.Atoi(c.PostForm("menustatus"))
|
||||
|
||||
permission, perr := NewAuth.IsGranted("Menu", auth.CRUD, TenantId)
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("menu authorization error:%s", perr)
|
||||
c.AbortWithStatus(http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
|
||||
if !permission {
|
||||
ErrorLog.Printf("menu authorization error")
|
||||
c.Redirect(http.StatusMovedPermanently, "/403-page")
|
||||
return
|
||||
}
|
||||
|
||||
_, err := MenuConfig.CreateMenus(menu.MenuCreate{MenuName: menuname, WebsiteId: webid, Description: menudesc, Status: menustatus, TenantId: TenantId, CreatedBy: userid, ParentId: 0})
|
||||
|
||||
if strings.Contains(fmt.Sprint(err), "given some values is empty") {
|
||||
ErrorLog.Printf("Menu mandatory field error: %s", err)
|
||||
c.SetCookie("Alert-msg", "Pleaseenterthemandatoryfields", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/admin/website/menu?webid="+websiteid)
|
||||
return
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
ErrorLog.Printf("Menu error: %s", perr)
|
||||
c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
c.Redirect(http.StatusMovedPermanently, "/admin/website/menu?webid="+websiteid)
|
||||
return
|
||||
}
|
||||
|
||||
c.SetCookie("get-toast", "Menu Created Successfully", 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
c.Redirect(http.StatusMovedPermanently, "/admin/website/menu?webid="+websiteid)
|
||||
|
||||
}
|
||||
|
||||
func UpdateMenu(c *gin.Context) {
|
||||
|
||||
userid := c.GetInt("userid")
|
||||
menuid, _ := strconv.Atoi(c.PostForm("menu_id"))
|
||||
menustatus, _ := strconv.Atoi(c.PostForm("menustatus"))
|
||||
pageno := c.Request.PostFormValue("menupageno")
|
||||
menupage := c.PostForm("menupage")
|
||||
templateid := c.Query("webid")
|
||||
webid, _ := strconv.Atoi(c.Query("webid"))
|
||||
menudetails := menu.MenuCreate{
|
||||
MenuName: c.PostForm("menu_name"),
|
||||
Description: c.PostForm("menu_desc"),
|
||||
Status: menustatus,
|
||||
ModifiedBy: userid,
|
||||
TenantId: TenantId,
|
||||
Id: menuid,
|
||||
WebsiteId: webid,
|
||||
}
|
||||
var url string
|
||||
if menupage == "menuitems" {
|
||||
url = "/admin/website/menu/menuitems/" + c.PostForm("menu_id")
|
||||
} else {
|
||||
if pageno != "" {
|
||||
url = "/admin/website/menu?page=" + pageno
|
||||
} else {
|
||||
url = "/admin/website/menu"
|
||||
}
|
||||
}
|
||||
|
||||
if templateid != "" && templateid != "0" {
|
||||
if strings.Contains(url, "?") {
|
||||
url += "&webid=" + templateid
|
||||
} else {
|
||||
url += "?webid=" + templateid
|
||||
}
|
||||
}
|
||||
permisison, perr := NewAuth.IsGranted("Menu", auth.Create, TenantId)
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("Update Menu authorization error: %s", perr)
|
||||
}
|
||||
|
||||
if !permisison {
|
||||
ErrorLog.Printf("Update Menu authorization error")
|
||||
c.Redirect(301, "/403-page")
|
||||
return
|
||||
}
|
||||
|
||||
_, err := MenuConfig.UpdateMenu(menudetails)
|
||||
if strings.Contains(fmt.Sprint(err), "given some values is empty") {
|
||||
ErrorLog.Printf("UpdateMenu mandatory field error: %s", err)
|
||||
c.SetCookie("Alert-msg", "Pleaseenterthemandatoryfields", 3600, "", "", false, false)
|
||||
c.Redirect(301, url)
|
||||
return
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
ErrorLog.Printf("UpdateMenu error: %s", perr)
|
||||
c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
c.Redirect(http.StatusMovedPermanently, url)
|
||||
return
|
||||
}
|
||||
|
||||
c.SetCookie("get-toast", "Menu Updated Successfully", 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
c.Redirect(http.StatusMovedPermanently, url)
|
||||
|
||||
}
|
||||
|
||||
//Delete Menu function//
|
||||
|
||||
func DeleteMenu(c *gin.Context) {
|
||||
|
||||
menuId, _ := strconv.Atoi(c.Param("id"))
|
||||
|
||||
fmt.Println(menuId, "menuiddd")
|
||||
pageno := c.Query("page")
|
||||
userid := c.GetInt("userid")
|
||||
webid := c.Query("webid")
|
||||
|
||||
var url string
|
||||
if pageno != "" {
|
||||
url = "/admin/website/menu?page=" + pageno
|
||||
} else {
|
||||
url = "/admin/website/menu"
|
||||
|
||||
}
|
||||
if webid != "" && webid != "0" {
|
||||
if strings.Contains(url, "?") {
|
||||
url += "&webid=" + webid
|
||||
} else {
|
||||
url += "?webid=" + webid
|
||||
}
|
||||
}
|
||||
permisison, perr := NewAuth.IsGranted("Menu", auth.Delete, TenantId)
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("delete menu authorization error: %s", perr)
|
||||
}
|
||||
|
||||
if !permisison {
|
||||
ErrorLog.Printf("Menu authorization error")
|
||||
c.Redirect(301, "/403-page")
|
||||
return
|
||||
}
|
||||
|
||||
if permisison {
|
||||
|
||||
err := MenuConfig.DeleteMenu(menuId, userid, TenantId)
|
||||
|
||||
if strings.Contains(fmt.Sprint(err), "given some values is empty") {
|
||||
ErrorLog.Printf("deletemenu mandatory field error: %s", perr)
|
||||
c.SetCookie("Alert-msg", "Pleaseenterthemandatoryfields", 3600, "", "", false, false)
|
||||
c.Redirect(301, url)
|
||||
return
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
ErrorLog.Printf("deletemenu error: %s", perr)
|
||||
c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
c.Redirect(301, url)
|
||||
return
|
||||
}
|
||||
|
||||
c.SetCookie("get-toast", "Menu Deleted Successfully", 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
c.Redirect(301, url)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Duplicate Menu Name check function//
|
||||
|
||||
func CheckMenuName(c *gin.Context) {
|
||||
|
||||
// get value from html form data
|
||||
menu_id, _ := strconv.Atoi(c.PostForm("menu_id"))
|
||||
menu_name := c.PostForm("menu_name")
|
||||
websiteid, _ := strconv.Atoi(c.PostForm("webid"))
|
||||
|
||||
permisison, perr := NewAuth.IsGranted("Menu", auth.Read, TenantId)
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("checkmenugroupname authorization error: %s", perr)
|
||||
}
|
||||
|
||||
if !permisison {
|
||||
ErrorLog.Printf("menugroup authorization error")
|
||||
c.Redirect(301, "/403-page")
|
||||
return
|
||||
}
|
||||
if permisison {
|
||||
|
||||
flg, err := MenuConfig.CheckMenuName(menu_id, menu_name, websiteid, TenantId)
|
||||
if err != nil {
|
||||
ErrorLog.Printf("checkmenugroupname error: %s", err)
|
||||
json.NewEncoder(c.Writer).Encode(false)
|
||||
return
|
||||
}
|
||||
|
||||
json.NewEncoder(c.Writer).Encode(flg)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Status change function//
|
||||
|
||||
func MenuStatusChange(c *gin.Context) {
|
||||
|
||||
menuId, _ := strconv.Atoi(c.PostForm("id"))
|
||||
|
||||
fmt.Println(menuId, "menuiddd")
|
||||
|
||||
userid := c.GetInt("userid")
|
||||
val, _ := strconv.Atoi(c.Request.PostFormValue("isactive"))
|
||||
|
||||
permisison, perr := NewAuth.IsGranted("Menu", auth.Update, TenantId)
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("delete menu authorization error: %s", perr)
|
||||
}
|
||||
|
||||
if !permisison {
|
||||
ErrorLog.Printf("Menu authorization error")
|
||||
c.Redirect(301, "/403-page")
|
||||
return
|
||||
}
|
||||
|
||||
if permisison {
|
||||
|
||||
flg, err := MenuConfig.MenuStatusChange(menuId, val, userid, TenantId)
|
||||
|
||||
if err != nil {
|
||||
ErrorLog.Printf("menu status change error: %s", perr)
|
||||
json.NewEncoder(c.Writer).Encode(flg)
|
||||
|
||||
} else {
|
||||
json.NewEncoder(c.Writer).Encode(flg)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
func MenuPublish(c *gin.Context) {
|
||||
|
||||
permisison, perr := NewAuth.IsGranted("Menu", auth.Update, TenantId)
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("delete menu authorization error: %s", perr)
|
||||
}
|
||||
|
||||
if !permisison {
|
||||
ErrorLog.Printf("Menu authorization error")
|
||||
c.Redirect(301, "/403-page")
|
||||
return
|
||||
}
|
||||
|
||||
menuid, _ := strconv.Atoi(c.Param("id"))
|
||||
|
||||
userid := c.GetInt("userid")
|
||||
|
||||
webid := c.Query("webid")
|
||||
|
||||
_, err := MenuConfig.MenuStatusChange(menuid, 1, userid, TenantId)
|
||||
|
||||
if err != nil {
|
||||
|
||||
fmt.Println(err)
|
||||
}
|
||||
c.SetCookie("get-toast", "Menu Updated Successfully", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/admin/website/menu/?webid="+webid)
|
||||
}
|
||||
|
||||
//Menu Item Creation//
|
||||
|
||||
func CreateMenuItem(c *gin.Context) {
|
||||
|
||||
labelname := c.PostForm("menu_name")
|
||||
|
||||
urlpath := c.PostForm("urlpath")
|
||||
|
||||
parentmenuid, _ := strconv.Atoi(c.PostForm("menu_id"))
|
||||
|
||||
mode := c.PostForm("formmode")
|
||||
|
||||
mtype := c.PostForm("type")
|
||||
|
||||
typeid, _ := strconv.Atoi(c.PostForm("cid"))
|
||||
|
||||
listingsids := c.PostForm("listingsids")
|
||||
|
||||
userid := c.GetInt("userid")
|
||||
|
||||
websiteid := c.Query("webid")
|
||||
|
||||
webid, _ := strconv.Atoi(websiteid)
|
||||
|
||||
if urlpath == "" && mtype == "channel" {
|
||||
|
||||
urlpath = "/channel/" + labelname
|
||||
} else if urlpath == "/listings/" {
|
||||
|
||||
urlpath = "/listings/" + strings.ToLower(strings.ReplaceAll(labelname, " ", "-"))
|
||||
mtype = "listings"
|
||||
}
|
||||
|
||||
menu, err := MenuConfig.CreateMenus(menu.MenuCreate{MenuName: labelname, Status: 1, ParentId: parentmenuid, WebsiteId: webid, UrlPath: urlpath, TenantId: TenantId, CreatedBy: userid, Type: mtype, TypeId: typeid, ListingsIds: listingsids})
|
||||
if strings.Contains(fmt.Sprint(err), "given some values is empty") {
|
||||
ErrorLog.Printf("Menu mandatory field error: %s", err)
|
||||
if mode == "1" {
|
||||
c.SetCookie("Alert-msg", "Pleaseenterthemandatoryfields", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/admin/website/menu/menuitems/"+c.PostForm("menu_id")+"?webid="+websiteid)
|
||||
return
|
||||
}
|
||||
c.JSON(200, false)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
ErrorLog.Printf("Menu error: %s", err)
|
||||
|
||||
if mode == "1" {
|
||||
c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
c.Redirect(http.StatusMovedPermanently, "/admin/website/menu/menuitems/"+c.PostForm("menu_id")+"?webid="+websiteid)
|
||||
return
|
||||
}
|
||||
c.JSON(200, false)
|
||||
|
||||
}
|
||||
if mode == "1" {
|
||||
c.SetCookie("get-toast", "Menu Created Successfully", 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
c.Redirect(http.StatusMovedPermanently, "/admin/website/menu/menuitems/"+c.PostForm("menu_id")+"?webid="+websiteid)
|
||||
} else {
|
||||
c.JSON(200, menu)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func UpdateMenuItem(c *gin.Context) {
|
||||
|
||||
labelname := c.PostForm("menu_name")
|
||||
|
||||
urlpath := c.PostForm("urlpath")
|
||||
|
||||
urlpath = "/listings/" + strings.ToLower(strings.ReplaceAll(labelname, " ", "-"))
|
||||
|
||||
parentmenuid, _ := strconv.Atoi(c.PostForm("parentmenu_id"))
|
||||
|
||||
menuid, _ := strconv.Atoi(c.PostForm("id"))
|
||||
|
||||
mtype := c.PostForm("type")
|
||||
|
||||
typeid, _ := strconv.Atoi(c.PostForm("cid"))
|
||||
|
||||
userid := c.GetInt("userid")
|
||||
|
||||
webid, _ := strconv.Atoi(c.PostForm("webid"))
|
||||
|
||||
menudetails := menu.MenuCreate{
|
||||
MenuName: labelname,
|
||||
Status: 1,
|
||||
ModifiedBy: userid,
|
||||
TenantId: TenantId,
|
||||
Id: menuid,
|
||||
ParentId: parentmenuid,
|
||||
UrlPath: urlpath,
|
||||
Type: mtype,
|
||||
TypeId: typeid,
|
||||
WebsiteId: webid,
|
||||
}
|
||||
fmt.Println("checkupdate", menudetails)
|
||||
permisison, perr := NewAuth.IsGranted("Menu", auth.Create, TenantId)
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("Update Menu authorization error: %s", perr)
|
||||
}
|
||||
|
||||
if !permisison {
|
||||
ErrorLog.Printf("Update Menu authorization error")
|
||||
c.Redirect(301, "/403-page")
|
||||
return
|
||||
}
|
||||
|
||||
updatemenu, err := MenuConfig.UpdateMenu(menudetails)
|
||||
|
||||
if err != nil {
|
||||
|
||||
c.JSON(200, false)
|
||||
}
|
||||
|
||||
c.JSON(200, updatemenu)
|
||||
}
|
||||
|
||||
func DeleteMenuItem(c *gin.Context) {
|
||||
|
||||
menuId, _ := strconv.Atoi(c.Param("id"))
|
||||
|
||||
fmt.Println(menuId, "menuiddd")
|
||||
|
||||
templateid := c.Query("webid")
|
||||
userid := c.GetInt("userid")
|
||||
menudeta, _ := MenuConfig.GetmenyById(menuId, TenantId)
|
||||
|
||||
permisison, perr := NewAuth.IsGranted("Menu", auth.Delete, TenantId)
|
||||
if perr != nil {
|
||||
ErrorLog.Printf("delete menu authorization error: %s", perr)
|
||||
}
|
||||
|
||||
if !permisison {
|
||||
ErrorLog.Printf("Menu authorization error")
|
||||
c.Redirect(301, "/403-page")
|
||||
return
|
||||
}
|
||||
|
||||
var parentid int
|
||||
|
||||
fmt.Println("menudetadfd", menudeta.ParentId)
|
||||
|
||||
if menudeta.ParentId != 0 {
|
||||
|
||||
menudet, _ := MenuConfig.GetmenyById(menudeta.ParentId, TenantId)
|
||||
|
||||
if menudet.ParentId == 0 {
|
||||
|
||||
parentid = menudet.Id
|
||||
} else {
|
||||
|
||||
parentid = menudet.ParentId
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
parentid = menudeta.ParentId
|
||||
}
|
||||
|
||||
if permisison {
|
||||
|
||||
err := MenuConfig.DeleteMenu(menuId, userid, TenantId)
|
||||
|
||||
// err := MenuConfig.DeleteMenuItem(menuId, userid, TenantId)
|
||||
|
||||
if strings.Contains(fmt.Sprint(err), "given some values is empty") {
|
||||
ErrorLog.Printf("deletemenu mandatory field error: %s", perr)
|
||||
c.SetCookie("Alert-msg", "Pleaseenterthemandatoryfields", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/admin/website/menu/menuitems/"+strconv.Itoa(parentid)+"?webid="+templateid)
|
||||
return
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
ErrorLog.Printf("deletemenu error: %s", perr)
|
||||
c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
c.Redirect(301, "/admin/website/menu/menuitems/"+strconv.Itoa(parentid)+"?webid="+templateid)
|
||||
return
|
||||
}
|
||||
|
||||
c.SetCookie("get-toast", "Menu Deleted Successfully", 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/admin/website/menu/menuitems/"+strconv.Itoa(parentid)+"?webid="+templateid)
|
||||
|
||||
}
|
||||
}
|
||||
Executable → Regular
+1
-1
@@ -86,7 +86,7 @@ func ListTemplates(c *gin.Context) {
|
||||
|
||||
if template.ImagePath != "" {
|
||||
|
||||
imagePath = template.ImagePath
|
||||
imagePath = "/image-resize?name=" + template.ImagePath
|
||||
|
||||
} else {
|
||||
imagePath = ""
|
||||
Executable → Regular
+19
-19
@@ -131,7 +131,7 @@ func CreateUser(c *gin.Context) {
|
||||
if c.PostForm("user_fname") == "" || c.PostForm("user_email") == "" || c.PostForm("user_mob") == "" || c.PostForm("user_name") == "" || c.PostForm("user_pass") == "" || c.PostForm("user_role") == "" {
|
||||
ErrorLog.Printf("create user error mandatory field error")
|
||||
c.SetCookie("Alert-msg", "Pleaseenterthemandatoryfields", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/settings/users/")
|
||||
c.Redirect(301, "/admin/settings/users/")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ func CreateUser(c *gin.Context) {
|
||||
uerr := storagecontroller.UploadCropImageS3(imageName, imagePath, imageByte)
|
||||
if uerr != nil {
|
||||
c.SetCookie("Alert-msg", "ERRORAWScredentialsnotfound", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/settings/users/")
|
||||
c.Redirect(301, "/admin/settings/users/")
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -247,7 +247,7 @@ func CreateUser(c *gin.Context) {
|
||||
|
||||
if strings.Contains(fmt.Sprint(terr), "given some values is empty") {
|
||||
c.SetCookie("Alert-msg", "Pleaseenterthemandatoryfields", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/settings/users/")
|
||||
c.Redirect(301, "/admin/settings/users/")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ func CreateUser(c *gin.Context) {
|
||||
ErrorLog.Printf("Creating User error: %s", err)
|
||||
c.SetCookie("Alert-msg", ErrInternalServerError, 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "alert", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/settings/users/")
|
||||
c.Redirect(301, "/admin/settings/users/")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -307,7 +307,7 @@ func CreateUser(c *gin.Context) {
|
||||
|
||||
c.SetCookie("get-toast", "User Created Successfully", 3600, "", "", false, false)
|
||||
c.SetCookie("Alert-msg", "success", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/settings/users/")
|
||||
c.Redirect(301, "/admin/settings/users/")
|
||||
}
|
||||
|
||||
// check email already exists
|
||||
@@ -408,16 +408,16 @@ func UpdateUser(c *gin.Context) {
|
||||
)
|
||||
|
||||
if pageno != "" {
|
||||
url = "/settings/users?page=" + pageno
|
||||
url = "/admin/settings/users?page=" + pageno
|
||||
} else {
|
||||
url = "/settings/users/"
|
||||
url = "/admin/settings/users/"
|
||||
|
||||
}
|
||||
|
||||
//check validation
|
||||
if c.PostForm("user_fname") == "" || c.PostForm("user_email") == "" || c.PostForm("user_mob") == "" || c.PostForm("user_name") == "" || c.PostForm("user_role") == "" {
|
||||
c.SetCookie("Alert-msg", "Pleaseenterthemandatoryfields", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/settings/users/")
|
||||
c.Redirect(301, "/admin/settings/users/")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -462,7 +462,7 @@ func UpdateUser(c *gin.Context) {
|
||||
uerr := storagecontroller.UploadCropImageS3(imageName, imagePath, imageByte)
|
||||
if uerr != nil {
|
||||
c.SetCookie("Alert-msg", "ERRORAWScredentialsnotfound", 3600, "", "", false, false)
|
||||
c.Redirect(301, "/settings/users/")
|
||||
c.Redirect(301, "/admin/settings/users/")
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -528,9 +528,9 @@ func DeleteUser(c *gin.Context) {
|
||||
var url string
|
||||
|
||||
if pageno != "" {
|
||||
url = "/settings/users?page=" + pageno
|
||||
url = "/admin/settings/users?page=" + pageno
|
||||
} else {
|
||||
url = "/settings/users/"
|
||||
url = "/admin/settings/users/"
|
||||
}
|
||||
|
||||
userid := c.GetInt("userid")
|
||||
@@ -566,7 +566,7 @@ func DeleteUser(c *gin.Context) {
|
||||
}
|
||||
|
||||
if currentPage > totalPages && totalPages > 0 {
|
||||
url = "/settings/users?page=" + strconv.Itoa(totalPages)
|
||||
url = "/admin/settings/users?page=" + strconv.Itoa(totalPages)
|
||||
}
|
||||
|
||||
c.SetCookie("get-toast", "User Deleted Successfully", 3600, "", "", false, false)
|
||||
@@ -589,9 +589,9 @@ func DeleteMultipleUser(c *gin.Context) {
|
||||
pageNo := c.Request.PostFormValue("page")
|
||||
var url string
|
||||
if pageNo != "" {
|
||||
url = "/settings/users?page=" + pageNo
|
||||
url = "/admin/settings/users?page=" + pageNo
|
||||
} else {
|
||||
url = "/settings/users/"
|
||||
url = "/admin/settings/users/"
|
||||
}
|
||||
|
||||
var userIds []int
|
||||
@@ -634,7 +634,7 @@ func DeleteMultipleUser(c *gin.Context) {
|
||||
}
|
||||
|
||||
if currentPage > totalPages && totalPages > 0 {
|
||||
url = "/settings/users?page=" + strconv.Itoa(totalPages)
|
||||
url = "/admin/settings/users?page=" + strconv.Itoa(totalPages)
|
||||
}
|
||||
|
||||
c.JSON(200, gin.H{"value": true, "url": url})
|
||||
@@ -715,9 +715,9 @@ func SelectedUsersAccessChange(c *gin.Context) {
|
||||
|
||||
pageno := c.PostForm("page")
|
||||
if pageno != "" {
|
||||
url = "/settings/users/?page=" + pageno
|
||||
url = "/admin/settings/users/?page=" + pageno
|
||||
} else {
|
||||
url = "/settings/users/"
|
||||
url = "/admin/settings/users/"
|
||||
}
|
||||
|
||||
userid := c.GetInt("userid")
|
||||
@@ -800,9 +800,9 @@ func SelectedUsersStatusChange(c *gin.Context) {
|
||||
var url string
|
||||
|
||||
if pageno != "" {
|
||||
url = "/settings/users/?page=" + pageno
|
||||
url = "/admin/settings/users/?page=" + pageno
|
||||
} else {
|
||||
url = "/settings/users/"
|
||||
url = "/admin/settings/users/"
|
||||
}
|
||||
|
||||
userid := c.GetInt("userid")
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,40 +0,0 @@
|
||||
|
||||
-- channels default
|
||||
|
||||
INSERT INTO tbl_channels(channel_name, slug_name, field_group_id, is_active, is_deleted, created_on, created_by,channel_description,channel_type,tenant_id) VALUES ('Default Channel', 'default_channel', 0, 1, 0, 'current-time', u_id, 'default description','mychannels',tid);
|
||||
|
||||
INSERT INTO tbl_channel_categories(channel_id, category_id, created_at, created_on,tenant_id) VALUES (chid,'mapcat', u_id, 'current-time',tid);
|
||||
|
||||
|
||||
|
||||
|
||||
INSERT INTO tbl_member_groups(name,slug,description,is_active,is_deleted,created_on,created_by,tenant_id) VALUES ('Default Group', 'default-group', 'Default Group', 1,0, 'current-time', u_id,tid);
|
||||
|
||||
-- only three block is tenant based
|
||||
|
||||
|
||||
INSERT INTO tbl_member_settings (allow_registration,member_login,notification_users,tenant_id) VALUES (1,'password','u_id',tid)
|
||||
|
||||
INSERT INTO tbl_email_configurations (selected_type,tenant_id) VALUES ('environment',tid)
|
||||
|
||||
INSERT INTO tbl_general_settings (date_format,expand_logo_path,language_id,logo_path,storage_type,tenant_id,time_format,time_zone) VALUES ('dd mmm yyyy','/public/img/logo-bg.svg',1,'/public/img/logo1.svg','aws',tid,'12','Asia/Kolkata')
|
||||
|
||||
INSERT INTO tbl_graphql_settings (token_name,description,duration,created_by,created_on,is_deleted,token,is_default,tenant_id) VALUES ('Default Token','Default Token','Unlimited',u_id,'current-time',0,'apikey',1,tid)
|
||||
|
||||
|
||||
-- default Email-template based on tenant
|
||||
|
||||
INSERT INTO tbl_email_templates(template_slug, template_subject, template_message, template_description, module_id, created_on, created_by, is_deleted, is_active,template_name,tenant_id)VALUES ('createuser', 'Confirm user registration', '<tr><td><p style="margin-left:0;"> </p><h1 style="font-size: 1.25rem; font-weight: bold;line-height: 1.6875rem;color:#000000; margin:0 0 .75rem 0;">Dear <strong>{FirstName}</strong>,</h1></td></tr><tr><td><p style="color:#000000;font-size:.875rem;">Congratulations! Your SpurtCMS account has been successfully created.</p><p style="color:#000000;font-size:.875rem;">Log in at</p><p style="color:#000000;font-size:.875rem;">{Loginurl}</p><p style="color:#000000;font-size:.875rem;margin:0 0 1rem;">and start using your Admin Account.</p></td></tr><tr><td><p style="color:#000000;font-size:1rem;line-height:normal;margin:0 0 .75rem;">Best Regards,</p><p style="color:#000000;font-size:1rem;font-weight:500;line-height:1.5rem;margin:0 0 1rem;"><strong>Spurt CMS Admin</strong></p></td></tr>', 'Change Password: Enable this toggle to activate the Change Password email template, which confirms to users that their password has been successfully changed.', 0, 'current-time', 1, 0, 1,'Create Admin User',tid);
|
||||
|
||||
INSERT INTO tbl_email_templates(template_slug,template_subject,template_description,template_message,module_id,created_on,created_by,is_deleted,is_active,template_name,tenant_id)VALUES('OTPGenerate','Confirm OTPs','OTP email template, which sends a One-Time Password (OTP) to users for verification.','<tr><td><p style="margin-left:0;"> </p><h1 style="font-size: 1.25rem; font-weight: bold;line-height: 1.6875rem;color:#000000; margin:0 0 1rem 0;">Dear {FirstName}</h1></td></tr><tr><td><p style="font-size: .875rem; line-height: 1.5rem; color: #000000;margin:0;">As requsted, here is your One-Time Password (OTP) to log in to SpurtCMS:</p><h3 style="font-size: 1.25rem; line-height:1; font-weight: bold; color: #000000; margin:1.25rem 0;">OTP:{OTP}</h3><p style="font-size: .875rem; line-height: 1.5rem; color: #000000;margin:0 0 1.25rem 0;">Please use this OTP within <span style="font-size: 1rem; font-weight:bold;">{Expirytime}</span> to complete the login process. If you do not log in within this time frame, you may request a new OTP.</p><p style="font-size: .875rem; line-height: 1.5rem; color: #000000;margin:0 0 1.25rem 0;">If you encounter any issue or need assistance, feel free to reach out to our support team.</p><p style="font-size: .875rem; line-height: 1.5rem; color: #000000;margin:0 0 1.25rem 0;">Thank you for using <span style="font-size: 1rem;">SpurtCMS.</span></p><p style="font-size: 1rem; line-height: normal; color: #000000;margin:0 0 .9375rem 0;">Best Regards,</p><p style="font-size: 1rem; line-height:normal; color: #000000;margin:0 0 .625rem 0;"><b>SpurtCMS Team</b></p></td></tr>',0,'current-time',1, 0,1,'OTP Generation',tid)
|
||||
|
||||
INSERT INTO tbl_email_templates(template_slug,template_subject,template_description,template_message,module_id,created_on,created_by,is_deleted,is_active,template_name,tenant_id)VALUES('Createmember','Member registration','Notifies member that they have been created as a member on the platform.','<tr><td><p style="margin-left:0;"> </p><h1 style="font-size: 1.25rem; font-weight: bold;line-height: 1.6875rem;color:#000000; margin:0 0 .75rem 0;">Dear <strong>{FirstName}</strong>,</h1></td></tr><tr><td><p style="color:#000000;font-size:.875rem;">Were glad to have you as a member at spurtCMS. Your membership has been confirmed.</p><p style="color:#000000;font-size:.875rem;">Log in at</p><p style="color:#000000;font-size:.875rem;">{Loginurl}</p><p style="color:#000000;font-size:.875rem;margin:0 0 1rem;">and indulge in Member related activities and explore our exclusive content.</p></td></tr><tr><td><p style="color:#000000;font-size:1rem;line-height:normal;margin:0 0 .75rem;">Best Regards,</p><p style="color:#000000;font-size:1rem;font-weight:500;line-height:1.5rem;margin:0 0 1rem;"><strong>Spurt CMS Admin</strong></p></td></tr>' ,6,'current-time',1, 0,1,'Send Member Login credentials',tid)
|
||||
|
||||
INSERT INTO tbl_email_templates(template_slug,template_subject,template_description,template_message,module_id,created_on,created_by,is_deleted,is_active,template_name,tenant_id)VALUES('Logined successfully','User login successfully','User conformation account is login successfully','<tr><td><p style="margin-left:0;"> </p><h1 style="font-size: 1.25rem; font-weight: bold;line-height: 1.6875rem;color:#000000; margin:0 0 .75rem 0;">Dear <strong>{FirstName}</strong>,</h1></td></tr><tr><td><p style="color:#000000;font-size:.875rem;">Congratulations! Your SpurtCMS account has been logged in successfully.</p><p style="color:#000000;font-size:.875rem;margin:0 0 1rem;">Start using your Admin Account.</p></td></tr><tr><td><p style="color:#000000;font-size:1rem;line-height:normal;margin:0 0 .75rem;">Best Regards,</p><p style="color:#000000;font-size:1rem;font-weight:500;line-height:1.5rem;margin:0 0 1rem;"><strong>Spurt CMS Admin</strong></p></td></tr>',0,'current-time',1, 0,1,'Send User Login Email',tid)
|
||||
|
||||
INSERT INTO tbl_email_templates(template_slug,template_subject,template_description,template_message,module_id,created_on,created_by,is_deleted,is_active,template_name,tenant_id)VALUES('Forgot Password','Reset password link','Forgot Password email template, which sends a confirmation and reset password link to users.', '<tr><td style="padding: 1.7188rem 1.5rem;border-bottom: .0625rem solid #F5F5F6;background-color: #FDFDFE;"><a href="javascript:void(0)" style="display: inline-block;"><img src="{AdminLogo}" alt="" style="display: block; height:20px"></a></td></tr><tr><td style="padding:2.5rem 1.5rem 0rem;"><h2 style="font-family: "Lexend", sans-serif;font-size: .875rem;font-weight: 400;line-height: 1.125rem;letter-spacing: 0em;text-align: left;color: #525252;margin-bottom: 1.25rem;">Dear <span style="font-family: "Lexend", sans-serif;font-size: 1rem;font-weight: 500;line-height: 20px;letter-spacing: 0em;text-align: left;color: #152027;">{FirstName},</span></h2></td></tr><tr><td style="padding: 0rem 1.5rem;"><p style="font-family: "Lexend", sans-serif;font-size: 14px;font-weight: 400;line-height: 18px;letter-spacing: 0em;text-align: left;color: #525252;margin: 0;">You recently requested to reset your password for spurtCMS admin login.</p><p style="font-family: "Lexend", sans-serif;font-size: 14px;font-weight: 400;line-height: 18px;letter-spacing: 0em;text-align: left;color: #525252;margin-bottom: 1.5rem">Click the link below to reset it.</p></td></tr><tr><td style="padding: 0rem 1.5rem;"><a href="{Passwordurl}" style="color: #2FACD6;text-decoration: underline;">{Passwordurlpath}</a><p class="mb-1" style="font-family: "Lexend", sans-serif;font-size: 14px;font-weight: 400;line-height: 18px;letter-spacing: 0em;text-align: left;color: #525252;">If you did not request a password reset, please ignore this email.</p></td></tr><tr><td style=" padding: 0rem 1.5rem 2.5rem;"><h2 style="font-family: "Lexend", sans-serif;font-size: .75rem;font-weight: 400;line-height: .9375rem;letter-spacing: 0em;text-align: left;color: #525252;margin-bottom: .5rem;">Best Regards,</h2><p style="font-family: "Lexend", sans-serif;font-size: .875rem;font-weight: 400;line-height: 1.125rem;letter-spacing: 0em;text-align: left;color: #152027;"> Spurt CMS Admin</p></td></tr><tr><td style="padding: 1.5rem 1.5rem 2.5rem;text-align: center;border-top: 1px solid #EDEDED;"><a href="javascript:void(0)" style="font-family: "Lexend", sans-serif;font-size: .75rem;font-weight: 300;line-height: .9375rem;letter-spacing: 0em;text-align: center;color: #525252;text-decoration: none;">Privacy policy • Contact us • Read our blog • Join SpurtCMS</a><div style="margin-top: 1rem;"><a href="javascript:void(0)" style="display: inline-block;"><img style="width:24px" src="{TwitterLogo}" alt="" style="margin-right: 1rem;"></a> <a href="javascript:void(0)" style="display: inline-block;"><img style="width:24px" src="{FbLogo}" alt="" style="margin-right: 1rem;"></a><a href="javascript:void(0)" style="display: inline-block;"><img style="width:24px" src="{LinkedinLogo}" alt="" style="margin-right: 1rem;"></a></div></td></tr></tr>' ,6,'2023-11-24 14:56:12',1, 0,1,'Forgot Password',tid)
|
||||
|
||||
INSERT INTO tbl_email_templates(template_slug,template_subject,template_description,template_message,module_id,created_on,created_by,is_deleted,is_active,template_name,tenant_id)VALUES('Forgot Password','Reset password link','Forgot Password email template, which sends a confirmation and reset password link to users.', '<tr><td style="padding: 1.7188rem 1.5rem;border-bottom: .0625rem solid #F5F5F6;background-color: #FDFDFE;"><a href="javascript:void(0)" style="display: inline-block;"><img src="{AdminLogo}" alt="" style="display: block; height:20px"></a></td></tr><tr><td style="padding:2.5rem 1.5rem 0rem;"><h2 style="font-family: "Lexend", sans-serif;font-size: .875rem;font-weight: 400;line-height: 1.125rem;letter-spacing: 0em;text-align: left;color: #525252;margin-bottom: 1.25rem;">Dear <span style="font-family: "Lexend", sans-serif;font-size: 1rem;font-weight: 500;line-height: 20px;letter-spacing: 0em;text-align: left;color: #152027;">{FirstName},</span></h2></td></tr><tr><td style="padding: 0rem 1.5rem;"><p style="font-family: "Lexend", sans-serif;font-size: 14px;font-weight: 400;line-height: 18px;letter-spacing: 0em;text-align: left;color: #525252;margin: 0;">You recently requested to reset your password for spurtCMS admin login.</p><p style="font-family: "Lexend", sans-serif;font-size: 14px;font-weight: 400;line-height: 18px;letter-spacing: 0em;text-align: left;color: #525252;margin-bottom: 1.5rem">Click the link below to reset it.</p></td></tr><tr><td style="padding: 0rem 1.5rem;"><a href="{Passwordurl}" style="color: #2FACD6;text-decoration: underline;">{Passwordurlpath}</a><p class="mb-1" style="font-family: "Lexend", sans-serif;font-size: 14px;font-weight: 400;line-height: 18px;letter-spacing: 0em;text-align: left;color: #525252;">If you did not request a password reset, please ignore this email.</p></td></tr><tr><td style=" padding: 0rem 1.5rem 2.5rem;"><h2 style="font-family: "Lexend", sans-serif;font-size: .75rem;font-weight: 400;line-height: .9375rem;letter-spacing: 0em;text-align: left;color: #525252;margin-bottom: .5rem;">Best Regards,</h2><p style="font-family: "Lexend", sans-serif;font-size: .875rem;font-weight: 400;line-height: 1.125rem;letter-spacing: 0em;text-align: left;color: #152027;"> Spurt CMS Admin</p></td></tr><tr><td style="padding: 1.5rem 1.5rem 2.5rem;text-align: center;border-top: 1px solid #EDEDED;"><a href="javascript:void(0)" style="font-family: "Lexend", sans-serif;font-size: .75rem;font-weight: 300;line-height: .9375rem;letter-spacing: 0em;text-align: center;color: #525252;text-decoration: none;">Privacy policy • Contact us • Read our blog • Join SpurtCMS</a><div style="margin-top: 1rem;"><a href="javascript:void(0)" style="display: inline-block;"><img style="width:24px" src="{TwitterLogo}" alt="" style="margin-right: 1rem;"></a> <a href="javascript:void(0)" style="display: inline-block;"><img style="width:24px" src="{FbLogo}" alt="" style="margin-right: 1rem;"></a><a href="javascript:void(0)" style="display: inline-block;"><img style="width:24px" src="{LinkedinLogo}" alt="" style="margin-right: 1rem;"></a></div></td></tr></tr>' ,6,'2023-11-24 14:56:12',1, 0,1,'Forgot Password',tid)
|
||||
|
||||
|
||||
|
||||
@@ -1,48 +1,59 @@
|
||||
module spurt-cms
|
||||
|
||||
go 1.19
|
||||
go 1.24.2
|
||||
|
||||
require (
|
||||
github.com/360EntSecGroup-Skylar/excelize v1.4.1
|
||||
github.com/99designs/gqlgen v0.17.49
|
||||
github.com/99designs/gqlgen v0.17.66
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2
|
||||
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2
|
||||
github.com/aws/aws-sdk-go v1.55.5
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible
|
||||
github.com/gin-contrib/sessions v1.0.1
|
||||
github.com/gin-gonic/gin v1.10.0
|
||||
github.com/google/uuid v1.6.0
|
||||
github.com/gorilla/sessions v1.2.2
|
||||
github.com/joho/godotenv v1.5.1
|
||||
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
|
||||
github.com/spurtcms/auth v0.0.37
|
||||
github.com/spurtcms/blocks v0.0.59
|
||||
github.com/spurtcms/categories v0.0.26
|
||||
github.com/spurtcms/channels v0.0.96
|
||||
github.com/spurtcms/member v0.0.23
|
||||
github.com/spurtcms/auth v0.0.44
|
||||
github.com/spurtcms/categories v0.0.27
|
||||
github.com/spurtcms/channels v0.0.107
|
||||
github.com/spurtcms/forms-builders v0.0.27
|
||||
github.com/spurtcms/member v0.0.26
|
||||
github.com/spurtcms/member-access v0.0.10
|
||||
github.com/spurtcms/team v0.0.33
|
||||
github.com/spurtcms/team-roles v0.0.21
|
||||
github.com/spurtcms/team v0.0.40
|
||||
github.com/spurtcms/team-roles v0.0.23
|
||||
github.com/utrack/gin-csrf v0.0.0-20190424104817-40fb8d2c8fca
|
||||
github.com/vektah/gqlparser/v2 v2.5.16
|
||||
golang.org/x/crypto v0.26.0
|
||||
golang.org/x/net v0.28.0
|
||||
github.com/vektah/gqlparser/v2 v2.5.22
|
||||
golang.org/x/crypto v0.33.0
|
||||
golang.org/x/net v0.35.0
|
||||
golang.org/x/oauth2 v0.22.0
|
||||
gorm.io/datatypes v1.2.0
|
||||
gorm.io/driver/mysql v1.5.6
|
||||
gorm.io/driver/postgres v1.5.9
|
||||
gorm.io/gorm v1.25.12
|
||||
gorm.io/gorm v1.30.0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/spurtcms/courses v0.0.31
|
||||
github.com/spurtcms/listing v0.0.8
|
||||
github.com/spurtcms/membership v0.0.26
|
||||
github.com/spurtcms/menu v0.0.32
|
||||
gopkg.in/yaml.v2 v2.4.0
|
||||
)
|
||||
|
||||
require github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
|
||||
|
||||
require (
|
||||
cloud.google.com/go/compute/metadata v0.3.0 // indirect
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 // indirect
|
||||
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 // indirect
|
||||
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect
|
||||
github.com/agnivade/levenshtein v1.1.1 // indirect
|
||||
github.com/agnivade/levenshtein v1.2.1 // indirect
|
||||
github.com/bytedance/sonic v1.11.6 // indirect
|
||||
github.com/bytedance/sonic/loader v0.1.1 // indirect
|
||||
github.com/cloudwego/base64x v0.1.4 // indirect
|
||||
github.com/cloudwego/iasm v0.2.0 // indirect
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect
|
||||
github.com/dchest/uniuri v0.0.0-20160212164326-8902c56451e9 // indirect
|
||||
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
|
||||
github.com/gin-contrib/sse v0.1.0 // indirect
|
||||
@@ -51,8 +62,9 @@ require (
|
||||
github.com/go-playground/validator/v10 v10.20.0 // indirect
|
||||
github.com/go-sql-driver/mysql v1.7.1 // indirect
|
||||
github.com/goccy/go-json v0.10.2 // indirect
|
||||
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
|
||||
github.com/golang-jwt/jwt v3.2.2+incompatible
|
||||
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
|
||||
github.com/google/uuid v1.6.0
|
||||
github.com/gorilla/context v1.1.2 // indirect
|
||||
github.com/gorilla/securecookie v1.1.2 // indirect
|
||||
github.com/gorilla/websocket v1.5.0 // indirect
|
||||
@@ -69,7 +81,6 @@ require (
|
||||
github.com/kylelemons/godebug v1.1.0 // indirect
|
||||
github.com/leodido/go-urn v1.4.0 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
|
||||
@@ -78,17 +89,17 @@ require (
|
||||
github.com/rogpeppe/go-internal v1.12.0 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||
github.com/sosodev/duration v1.3.1 // indirect
|
||||
github.com/spurtcms/forms-builders v0.0.27 // indirect
|
||||
github.com/spurtcms/blocks v0.0.59
|
||||
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
||||
github.com/ugorji/go/codec v1.2.12 // indirect
|
||||
github.com/urfave/cli/v2 v2.27.2 // indirect
|
||||
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect
|
||||
github.com/urfave/cli/v2 v2.27.5 // indirect
|
||||
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
|
||||
golang.org/x/arch v0.8.0 // indirect
|
||||
golang.org/x/mod v0.20.0 // indirect
|
||||
golang.org/x/sync v0.8.0 // indirect
|
||||
golang.org/x/sys v0.23.0 // indirect
|
||||
golang.org/x/text v0.17.0 // indirect
|
||||
golang.org/x/tools v0.24.0 // indirect
|
||||
google.golang.org/protobuf v1.34.1 // indirect
|
||||
golang.org/x/mod v0.23.0 // indirect
|
||||
golang.org/x/sync v0.11.0 // indirect
|
||||
golang.org/x/sys v0.30.0 // indirect
|
||||
golang.org/x/text v0.22.0 // indirect
|
||||
golang.org/x/tools v0.30.0 // indirect
|
||||
google.golang.org/protobuf v1.36.5 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc=
|
||||
cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k=
|
||||
github.com/360EntSecGroup-Skylar/excelize v1.4.1 h1:l55mJb6rkkaUzOpSsgEeKYtS6/0gHwBYyfo5Jcjv/Ks=
|
||||
github.com/360EntSecGroup-Skylar/excelize v1.4.1/go.mod h1:vnax29X2usfl7HHkBrX5EvSCJcmH3dT9luvxzu8iGAE=
|
||||
github.com/99designs/gqlgen v0.17.49 h1:b3hNGexHd33fBSAd4NDT/c3NCcQzcAVkknhN9ym36YQ=
|
||||
github.com/99designs/gqlgen v0.17.49/go.mod h1:tC8YFVZMed81x7UJ7ORUwXF4Kn6SXuucFqQBhN8+BU0=
|
||||
github.com/99designs/gqlgen v0.17.66 h1:2/SRc+h3115fCOZeTtsqrB5R5gTGm+8qCAwcrZa+CXA=
|
||||
github.com/99designs/gqlgen v0.17.66/go.mod h1:gucrb5jK5pgCKzAGuOMMVU9C8PnReecHEHd2UxLQwCg=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 h1:E+OJmp2tPvt1W+amx48v1eqbjDYsgN+RzP4q16yV5eM=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1/go.mod h1:a6xsAQUZg+VsS3TJ05SRp524Hs4pZ/AeFSr5ENf0Yjo=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2 h1:FDif4R1+UUR+00q6wquyX90K7A8dN+R5E8GEadoP7sU=
|
||||
@@ -9,15 +11,19 @@ github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2/go.mod h1:aiYBYui4BJ/BJC
|
||||
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 h1:LqbJ/WzJUwBf8UiaSzgX7aMclParm9/5Vgp+TY51uBQ=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2/go.mod h1:yInRyqWXAuaPrgI7p70+lDDgh3mlBohis29jGMISnmc=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0 h1:AifHbc4mg0x9zW52WOpKbsHaDKuRhlI7TVl47thgQ70=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0/go.mod h1:T5RfihdXtBDxt1Ch2wobif3TvzTdumDy29kahv6AV9A=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2 h1:YUUxeiOWgdAQE3pXt2H7QXzZs0q8UBjgRbl56qo8GYM=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2/go.mod h1:dmXQgZuiSubAecswZE+Sm8jkvEa7kQgTPVRvwL/nd0E=
|
||||
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU=
|
||||
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI=
|
||||
github.com/PuerkitoBio/goquery v1.9.2 h1:4/wZksC3KgkQw7SQgkKotmKljk0M6V8TUvA8Wb4yPeE=
|
||||
github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8=
|
||||
github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo=
|
||||
github.com/PuerkitoBio/goquery v1.9.3 h1:mpJr/ikUA9/GNJB/DBZcGeFDXUtosHRyRrwh7KGdTG0=
|
||||
github.com/PuerkitoBio/goquery v1.9.3/go.mod h1:1ndLHPdTz+DyQPICCWYlYQMPl0oXZj0G6D4LCYA6u4U=
|
||||
github.com/agnivade/levenshtein v1.2.1 h1:EHBY3UOn1gwdy/VbFwgo4cxecRznFk7fKWN1KOX7eoM=
|
||||
github.com/agnivade/levenshtein v1.2.1/go.mod h1:QVVI16kDrtSuwcpd0p1+xMC6Z/VfhtCyDIjcwga4/DU=
|
||||
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ=
|
||||
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
|
||||
github.com/andybalholm/cascadia v1.3.2 h1:3Xi6Dw5lHF15JtdcmAHD3i1+T8plmv7BQ/nsViSLyss=
|
||||
github.com/andybalholm/cascadia v1.3.2/go.mod h1:7gtRlve5FxPPgIgX36uWBX58OdBsSS6lUvCFb+h7KvU=
|
||||
github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q=
|
||||
github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE=
|
||||
github.com/aws/aws-sdk-go v1.55.5 h1:KKUZBfBoyqy5d3swXyiC7Q76ic40rYcbqH7qjh59kzU=
|
||||
@@ -33,8 +39,8 @@ github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/
|
||||
github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w=
|
||||
github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg=
|
||||
github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.6 h1:XJtiaUW6dEEqVuZiMTn1ldk455QWwEIsMIJlo5vtkx0=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
@@ -42,9 +48,10 @@ github.com/dchest/uniuri v0.0.0-20160212164326-8902c56451e9 h1:74lLNRzvsdIlkTgfD
|
||||
github.com/dchest/uniuri v0.0.0-20160212164326-8902c56451e9/go.mod h1:GgB8SF9nRG+GqaDtLcwJZsQFhcogVCJ79j4EdT0c2V4=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||
github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g=
|
||||
github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA=
|
||||
github.com/dgryski/trifles v0.0.0-20230903005119-f50d829f2e54 h1:SG7nF6SRlWhcT7cNTs5R6Hk4V2lcmLz2NsG2VnInyNo=
|
||||
github.com/dgryski/trifles v0.0.0-20230903005119-f50d829f2e54/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA=
|
||||
github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI=
|
||||
github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ=
|
||||
github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0=
|
||||
github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk=
|
||||
github.com/garyburd/redigo v1.6.0/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY=
|
||||
@@ -59,6 +66,7 @@ github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU=
|
||||
github.com/gin-gonic/gin v1.10.0/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y=
|
||||
github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
|
||||
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
|
||||
github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
||||
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
|
||||
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
|
||||
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
|
||||
@@ -68,6 +76,8 @@ github.com/go-playground/validator/v10 v10.20.0/go.mod h1:dbuPbCMFw/DrkbEynArYaC
|
||||
github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
|
||||
github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI=
|
||||
github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
|
||||
github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss=
|
||||
github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
|
||||
github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
|
||||
github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
|
||||
github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY=
|
||||
@@ -75,12 +85,16 @@ github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzq
|
||||
github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk=
|
||||
github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
|
||||
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0ktxqI+Sida1w446QrXBRJ0nee3SNZlA=
|
||||
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
|
||||
github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A=
|
||||
github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EOqtpKwwwHI=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
|
||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
|
||||
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
|
||||
@@ -125,6 +139,7 @@ github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZY
|
||||
github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
|
||||
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
@@ -136,10 +151,10 @@ github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx
|
||||
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
||||
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||
github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y=
|
||||
github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
|
||||
github.com/memcachier/mc v2.0.1+incompatible/go.mod h1:7bkvFE61leUBvXz+yxsOnGBQSZpBSPIMUQSmmSHvuXc=
|
||||
github.com/microsoft/go-mssqldb v0.17.0 h1:Fto83dMZPnYv1Zwx5vHHxpNraeEaUlQ/hhHLgZiaenE=
|
||||
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
||||
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/microsoft/go-mssqldb v0.17.0/go.mod h1:OkoNGhGEs8EZqchVTtochlXruEhEOaO4S0d2sB5aeGQ=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
@@ -162,32 +177,35 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99
|
||||
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8=
|
||||
github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I=
|
||||
github.com/sosodev/duration v1.3.1 h1:qtHBDMQ6lvMQsL15g4aopM4HEfOaYuhWBw3NPTtlqq4=
|
||||
github.com/sosodev/duration v1.3.1/go.mod h1:RQIBBX0+fMLc/D9+Jb/fwvVmo0eZvDDEERAikUR6SDg=
|
||||
github.com/spurtcms/auth v0.0.37 h1:2GKJE53TIsNkO8sXXTI0LMq80YKXDyouSKztLD7hb6Y=
|
||||
github.com/spurtcms/auth v0.0.37/go.mod h1:QDSbAUWyrGmCjvd2UHMPomBAk3TeUmjjZW5wnrInGSU=
|
||||
github.com/spurtcms/blocks v0.0.54 h1:FMNf7vG20kW3BnXL5fX26iB+rpZ5CLJ6FWLaK5v/VtY=
|
||||
github.com/spurtcms/blocks v0.0.54/go.mod h1:s2BXdQjD2qjwi0HCpVBpZpa1OO9zOVUcThfIDSktJgo=
|
||||
github.com/spurtcms/auth v0.0.44 h1:VRfWdorAPLgaQl2hend6oDpquO5Aiuv+HdQXd5VMaU4=
|
||||
github.com/spurtcms/auth v0.0.44/go.mod h1:QDSbAUWyrGmCjvd2UHMPomBAk3TeUmjjZW5wnrInGSU=
|
||||
github.com/spurtcms/blocks v0.0.59 h1:UFqbQr5GAvduEtTjFEzgNsqLttgfJ/CkbBbu4JfZFIc=
|
||||
github.com/spurtcms/blocks v0.0.59/go.mod h1:VcEP1lN4eXyBb/hNwnyFwhPcujTdZupbSgNG7j+vJeI=
|
||||
github.com/spurtcms/categories v0.0.24 h1:f9HsiCApVIiNkMQk1/nHM3QOOsTo/e7TIX6Qh4d7sXQ=
|
||||
github.com/spurtcms/categories v0.0.24/go.mod h1:jFVS8/EoFV4NvdGHp0v8mxD5uPSjaeXFWGvWrMdUyNY=
|
||||
github.com/spurtcms/categories v0.0.26 h1:OtVoRsYc8XqpOoIxj/0AoO5FsVZJz6E9DHKV4SN5Htw=
|
||||
github.com/spurtcms/categories v0.0.26/go.mod h1:5YjyFKoY9vaGxtCCkvcZuA7jFcWnn1dadZ+e4C8OTSs=
|
||||
github.com/spurtcms/channels v0.0.94 h1:iR5YVAfVhNVU4O2O2YUeqv0aDe1O29LqULEuf4Ki2z4=
|
||||
github.com/spurtcms/channels v0.0.94/go.mod h1:ppuno0wAKoL1F3V+/K1uykkXoL2I1+Ggjpc4gwuANZg=
|
||||
github.com/spurtcms/channels v0.0.96 h1:3FMxz6G6TaJarQMYugKH+8OSy+8yM6z0AA76466IkmQ=
|
||||
github.com/spurtcms/channels v0.0.96/go.mod h1:ppuno0wAKoL1F3V+/K1uykkXoL2I1+Ggjpc4gwuANZg=
|
||||
github.com/spurtcms/categories v0.0.27 h1:3fL5bC/RsAgTT6u14bspXy4ovWZkLJqrY2WIVubWA0Q=
|
||||
github.com/spurtcms/categories v0.0.27/go.mod h1:5YjyFKoY9vaGxtCCkvcZuA7jFcWnn1dadZ+e4C8OTSs=
|
||||
github.com/spurtcms/channels v0.0.107 h1:Fnc3WLnrUgeph9bFD5I/0Hwlp+aUk7906W0zMItmsdg=
|
||||
github.com/spurtcms/channels v0.0.107/go.mod h1:ppuno0wAKoL1F3V+/K1uykkXoL2I1+Ggjpc4gwuANZg=
|
||||
github.com/spurtcms/courses v0.0.31 h1:SrruXJ4AgGEYQ8bkywO6I8XF06qUWQIMxpidkN/Gaj4=
|
||||
github.com/spurtcms/courses v0.0.31/go.mod h1:gv/OktzG/VRy6fF4ja6wZmXKLV2fUI73CNKIlwaKnLI=
|
||||
github.com/spurtcms/forms-builders v0.0.27 h1:FNAGn4V3RS2+phDeCoe5brDtZwoUgXTdLoIBHJ/LbQo=
|
||||
github.com/spurtcms/forms-builders v0.0.27/go.mod h1:MD7DOEu99VApmq2/Gl2DOSXaIMO22sLWh+OAW5JpWm0=
|
||||
github.com/spurtcms/member v0.0.23 h1:epCuC1SHYwFBiZ6nQPXwul9xaHQCad+ShSTII8wP4D8=
|
||||
github.com/spurtcms/member v0.0.23/go.mod h1:jNwxQHW/o/MAqPCjnl0z/haMAreuhgEafsfc2DwhXrs=
|
||||
github.com/spurtcms/listing v0.0.8 h1:Vg80tRVlRbFFgDfMj2k5Y00cGGE4PlwtHANeAd93BZM=
|
||||
github.com/spurtcms/listing v0.0.8/go.mod h1:eJPJsnNPSGz6tCoon7yKfAhNKDTctr9rutM17Me4u0E=
|
||||
github.com/spurtcms/member v0.0.26 h1:cdRe12zlH2A86YdC8w2Xyu69DVav6CeqFce3hqMJ9vM=
|
||||
github.com/spurtcms/member v0.0.26/go.mod h1:jNwxQHW/o/MAqPCjnl0z/haMAreuhgEafsfc2DwhXrs=
|
||||
github.com/spurtcms/member-access v0.0.10 h1:4u7y5/+IZGZJ+diB+1k/UrJpTNt0oIQXnSsdJjkKoaw=
|
||||
github.com/spurtcms/member-access v0.0.10/go.mod h1:Ok/+dQX0afYU4WzdRVU3iQw5B1l+3zlTONHQRQMUOl8=
|
||||
github.com/spurtcms/team v0.0.33 h1:7xJXCAmnipsCOURzlbti1DKn+LJu8shDzboFaK8eWGc=
|
||||
github.com/spurtcms/team v0.0.33/go.mod h1:XMtTNJbC605oe99XSKhzvPrr+J5/y3qUSxC2GQNyjf4=
|
||||
github.com/spurtcms/team-roles v0.0.21 h1:HlZP9FSHfCoWC7GFXtSiRR/AndQ4OMGoy1XwddkT9SI=
|
||||
github.com/spurtcms/team-roles v0.0.21/go.mod h1:h4yVYhuFtdloe8h+zS1qGnyyLUyEOEiI+ZkRxynEviM=
|
||||
github.com/spurtcms/membership v0.0.26 h1:42P0fKWs9CA6llHm9GNeAvfRHL0IDzdhRUN49kkglfk=
|
||||
github.com/spurtcms/membership v0.0.26/go.mod h1:uvn6cm4puxilQ2krc74ayOcn9Fns+usqdkn1BmD/Lh8=
|
||||
github.com/spurtcms/menu v0.0.32 h1:9BftEJOkB5F0pX1nf669CMOnfoW232arcEgprhKHoXw=
|
||||
github.com/spurtcms/menu v0.0.32/go.mod h1:7PlQpDFYLQh3jg7Ys419BBHy+86DDtQqbL1oN6uyr50=
|
||||
github.com/spurtcms/team v0.0.40 h1:RWbEefrp6up3VnU92G5Uni0sN5VxqKKlHhasoAfaZSs=
|
||||
github.com/spurtcms/team v0.0.40/go.mod h1:XMtTNJbC605oe99XSKhzvPrr+J5/y3qUSxC2GQNyjf4=
|
||||
github.com/spurtcms/team-roles v0.0.23 h1:ACPFjR/4w8P/p0sLagiswvtQ7LlhIhfRyUsRms2bXak=
|
||||
github.com/spurtcms/team-roles v0.0.23/go.mod h1:h4yVYhuFtdloe8h+zS1qGnyyLUyEOEiI+ZkRxynEviM=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
@@ -200,55 +218,60 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
||||
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
|
||||
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
|
||||
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
|
||||
github.com/ugorji/go/codec v0.0.0-20181209151446-772ced7fd4c2/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
|
||||
github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE=
|
||||
github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
|
||||
github.com/urfave/cli/v2 v2.27.2 h1:6e0H+AkS+zDckwPCUrZkKX38mRaau4nL2uipkJpbkcI=
|
||||
github.com/urfave/cli/v2 v2.27.2/go.mod h1:g0+79LmHHATl7DAcHO99smiR/T7uGLw84w8Y42x+4eM=
|
||||
github.com/urfave/cli/v2 v2.27.5 h1:WoHEJLdsXr6dDWoJgMq/CboDmyY/8HMMH1fTECbih+w=
|
||||
github.com/urfave/cli/v2 v2.27.5/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5hrMvTQ=
|
||||
github.com/utrack/gin-csrf v0.0.0-20190424104817-40fb8d2c8fca h1:lpvAjPK+PcxnbcB8H7axIb4fMNwjX9bE4DzwPjGg8aE=
|
||||
github.com/utrack/gin-csrf v0.0.0-20190424104817-40fb8d2c8fca/go.mod h1:XXKxNbpoLihvvT7orUZbs/iZayg1n4ip7iJakJPAwA8=
|
||||
github.com/vektah/gqlparser/v2 v2.5.16 h1:1gcmLTvs3JLKXckwCwlUagVn/IlV2bwqle0vJ0vy5p8=
|
||||
github.com/vektah/gqlparser/v2 v2.5.16/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww=
|
||||
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 h1:+qGGcbkzsfDQNPPe9UDgpxAWQrhbbBXOYJFQDq/dtJw=
|
||||
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913/go.mod h1:4aEEwZQutDLsQv2Deui4iYQ6DWTxR14g6m8Wv88+Xqk=
|
||||
github.com/vektah/gqlparser/v2 v2.5.22 h1:yaaeJ0fu+nv1vUMW0Hl+aS1eiv1vMfapBNjpffAda1I=
|
||||
github.com/vektah/gqlparser/v2 v2.5.22/go.mod h1:xMl+ta8a5M1Yo1A1Iwt/k7gSpscwSnHZdw7tfhEGfTM=
|
||||
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4=
|
||||
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM=
|
||||
golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
|
||||
golang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc=
|
||||
golang.org/x/arch v0.8.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=
|
||||
golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw=
|
||||
golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54=
|
||||
golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0=
|
||||
golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus=
|
||||
golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M=
|
||||
golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM=
|
||||
golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
|
||||
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE=
|
||||
golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg=
|
||||
golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8=
|
||||
golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk=
|
||||
golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA=
|
||||
golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
|
||||
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w=
|
||||
golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sys v0.0.0-20181228144115-9a3f9b0469bb/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM=
|
||||
golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc=
|
||||
golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
|
||||
golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24=
|
||||
golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ=
|
||||
google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
|
||||
google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
||||
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
|
||||
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM=
|
||||
golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY=
|
||||
golang.org/x/tools v0.30.0 h1:BgcpHewrV5AUp2G9MebG4XPFI1E2W41zU1SaqVA9vJY=
|
||||
golang.org/x/tools v0.30.0/go.mod h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY=
|
||||
google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM=
|
||||
google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE=
|
||||
gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y=
|
||||
gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
@@ -259,9 +282,11 @@ gorm.io/driver/mysql v1.5.6/go.mod h1:sEtPWMiqiN1N1cMXoXmBbd8C6/l+TESwriotuRRpkD
|
||||
gorm.io/driver/postgres v1.5.9 h1:DkegyItji119OlcaLjqN11kHoUgZ/j13E0jkJZgD6A8=
|
||||
gorm.io/driver/postgres v1.5.9/go.mod h1:DX3GReXH+3FPWGrrgffdvCk3DQ1dwDPdmbenSkweRGI=
|
||||
gorm.io/driver/sqlite v1.4.4 h1:gIufGoR0dQzjkyqDyYSCvsYR6fba1Gw5YKDqKeChxFc=
|
||||
gorm.io/driver/sqlite v1.4.4/go.mod h1:0Aq3iPO+v9ZKbcdiz8gLWRw5VOPcBOPUQJFLq5e2ecI=
|
||||
gorm.io/driver/sqlserver v1.4.1 h1:t4r4r6Jam5E6ejqP7N82qAJIJAht27EGT41HyPfXRw0=
|
||||
gorm.io/driver/sqlserver v1.4.1/go.mod h1:DJ4P+MeZbc5rvY58PnmN1Lnyvb5gw5NPzGshHDnJLig=
|
||||
gorm.io/gorm v1.25.7/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
|
||||
gorm.io/gorm v1.25.12 h1:I0u8i2hWQItBq1WfE0o2+WuL9+8L21K9e2HHSTE/0f8=
|
||||
gorm.io/gorm v1.25.12/go.mod h1:xh7N7RHfYlNc5EmcI/El95gXusucDrQnHXe0+CgWcLQ=
|
||||
gorm.io/gorm v1.30.0 h1:qbT5aPv1UH8gI99OsRlvDToLxW5zR7FzS9acZDOZcgs=
|
||||
gorm.io/gorm v1.30.0/go.mod h1:8Z33v652h4//uMA76KjeDH8mJXPm1QNCYrMeatR0DOE=
|
||||
nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50=
|
||||
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
|
||||
|
||||
Executable → Regular
+39
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"spurt-cms/graphql/info"
|
||||
"spurt-cms/graphql/model"
|
||||
"spurt-cms/models"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"gorm.io/gorm"
|
||||
@@ -130,3 +131,41 @@ func CategoryList(ctx context.Context, categoryFilter *model.CategoryFilter, com
|
||||
return &model.CategoryDetails{Categorylist: finalCategoriesList, Count: count}, nil
|
||||
|
||||
}
|
||||
|
||||
func GeneralInfo(ctx context.Context, id *string) (*model.GeneralInfo, error) {
|
||||
|
||||
c, ok := ctx.Value(GinContext).(*gin.Context)
|
||||
if !ok {
|
||||
ErrorLog.Printf("%v", info.ErrGinCtx)
|
||||
return nil, info.ErrGinCtx
|
||||
}
|
||||
|
||||
var tenantid string
|
||||
|
||||
if *id != "" {
|
||||
|
||||
tenantid = *id
|
||||
}
|
||||
|
||||
// models.GetGeneralSettings(tenantid)
|
||||
|
||||
tblgeneralsetting, err :=models.GetGeneralSettings(tenantid)
|
||||
if err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
c.AbortWithStatus(400)
|
||||
return nil, err
|
||||
}
|
||||
ErrorLog.Printf("%v", err)
|
||||
c.AbortWithStatus(500)
|
||||
return nil, err
|
||||
}
|
||||
generalInfo:=model.GeneralInfo{
|
||||
CompanyName: tblgeneralsetting.CompanyName,
|
||||
LogoPath: tblgeneralsetting.LogoPath,
|
||||
ExpandLogoPath: tblgeneralsetting.ExpandLogoPath,
|
||||
TenantID: tenantid,
|
||||
}
|
||||
|
||||
return &generalInfo,nil
|
||||
|
||||
}
|
||||
|
||||
Executable → Regular
+183
-14
@@ -3,9 +3,11 @@ package controller
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"spurt-cms/graphql/info"
|
||||
"spurt-cms/graphql/model"
|
||||
"spurt-cms/graphql/scalars"
|
||||
"strings"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -249,14 +251,14 @@ func ChannelEntriesList(ctx context.Context, commonFilter *model.Filter, sort *m
|
||||
)
|
||||
|
||||
var (
|
||||
limit, offset int = 0, -1
|
||||
order int
|
||||
isActive bool
|
||||
keyword, title, sortBy string
|
||||
channelId, categoryId int
|
||||
categorySlug string
|
||||
status string
|
||||
memberProfFlag, categoriesFlag, fieldsFlg, authorFlag, selectedCategoriesFilter bool
|
||||
limit, offset int = 0, -1
|
||||
order int
|
||||
isActive bool
|
||||
keyword, title, sortBy, Location, Experience, Posteddate string
|
||||
channelId, categoryId, MemberID int
|
||||
categorySlug, ChannelName string
|
||||
status string
|
||||
memberProfFlag, categoriesFlag, fieldsFlg, authorFlag, selectedCategoriesFilter, savedlistFlg bool
|
||||
)
|
||||
|
||||
tenantDetails, err := GetTenantDetails(c)
|
||||
@@ -291,6 +293,18 @@ func ChannelEntriesList(ctx context.Context, commonFilter *model.Filter, sort *m
|
||||
|
||||
keyword = *commonFilter.Keyword.Value()
|
||||
}
|
||||
if commonFilter.Location.IsSet() && commonFilter.Location.Value() != nil {
|
||||
|
||||
Location = *commonFilter.Location.Value()
|
||||
}
|
||||
if commonFilter.Experience.IsSet() && commonFilter.Experience.Value() != nil {
|
||||
|
||||
Experience = *commonFilter.Experience.Value()
|
||||
}
|
||||
if commonFilter.Posteddate.IsSet() && commonFilter.Posteddate.Value() != nil {
|
||||
|
||||
Posteddate = *commonFilter.Posteddate.Value()
|
||||
}
|
||||
}
|
||||
|
||||
if EntryFilter != nil {
|
||||
@@ -309,7 +323,10 @@ func ChannelEntriesList(ctx context.Context, commonFilter *model.Filter, sort *m
|
||||
|
||||
categorySlug = *EntryFilter.CategorySlug.Value()
|
||||
}
|
||||
if EntryFilter.ChannelName.IsSet() && EntryFilter.ChannelName.Value() != nil {
|
||||
|
||||
ChannelName = *EntryFilter.ChannelName.Value()
|
||||
}
|
||||
if EntryFilter.GetChildCategories.IsSet() && EntryFilter.GetChildCategories.Value() != nil && !*EntryFilter.GetChildCategories.Value() {
|
||||
|
||||
selectedCategoriesFilter = true
|
||||
@@ -370,6 +387,14 @@ func ChannelEntriesList(ctx context.Context, commonFilter *model.Filter, sort *m
|
||||
|
||||
fieldsFlg = *additionalData.AdditionalFields.Value()
|
||||
}
|
||||
if additionalData.SavedList.IsSet() && additionalData.SavedList.Value() != nil {
|
||||
|
||||
savedlistFlg = *additionalData.SavedList.Value()
|
||||
}
|
||||
if additionalData.MemberID.IsSet() && additionalData.MemberID.Value() != nil {
|
||||
|
||||
MemberID = *additionalData.MemberID.Value()
|
||||
}
|
||||
}
|
||||
|
||||
// fmt.Printf("limit: %v,offset: %v,isActive: %v,order: %v,sort: %v,title: %v,keyword: %v,channelid: %v,categoryid: %v,categorySlug: %v,status: %v,memflag: %v,categoryFlag: %v,authorflag: %v,fieldsFlag: %v\n", limit, offset, isActive, order, sortBy, title, keyword, channelId, categoryId, categorySlug, status, memberProfFlag, categoriesFlag, authorFlag, fieldsFlg)
|
||||
@@ -383,6 +408,7 @@ func ChannelEntriesList(ctx context.Context, commonFilter *model.Filter, sort *m
|
||||
Title: title,
|
||||
CategoryId: categoryId,
|
||||
CategorySlug: categorySlug,
|
||||
ChannelName: ChannelName,
|
||||
ActiveEntriesonly: isActive,
|
||||
TenantId: tenantDetails.TenantId,
|
||||
GetMemberProfile: memberProfFlag,
|
||||
@@ -395,6 +421,11 @@ func ChannelEntriesList(ctx context.Context, commonFilter *model.Filter, sort *m
|
||||
SortBy: sortBy,
|
||||
SectionFieldTypeId: 12,
|
||||
MemberFieldTypeId: 14,
|
||||
Location: Location,
|
||||
Experience: Experience,
|
||||
Posteddate: Posteddate,
|
||||
GetSavedEntryList: savedlistFlg,
|
||||
MemberId: MemberID,
|
||||
}
|
||||
|
||||
channelEntries, commonCount, _, err := ChannelConfigWP.FlexibleChannelEntriesList(inputs)
|
||||
@@ -484,6 +515,18 @@ func ChannelEntriesList(ctx context.Context, commonFilter *model.Filter, sort *m
|
||||
|
||||
finalChannelEntries[i].TenantID = v.TenantId
|
||||
|
||||
finalChannelEntries[i].SavedFlag = &v.SavedFlag
|
||||
|
||||
viewurl := os.Getenv("VIEW_BASE_URL")
|
||||
|
||||
Channelinfo, _ := ChannelConfigWP.ChannelDetail(channels.Channels{Id: v.ChannelId, TenantId: v.TenantId})
|
||||
|
||||
previewurl := viewurl + "/" + Channelinfo.ChannelName + "/" + v.Slug + "-" + v.Uuid
|
||||
|
||||
finalChannelEntries[i].PreviewLink = &previewurl
|
||||
|
||||
finalChannelEntries[i].UUID = &v.Uuid
|
||||
|
||||
switch {
|
||||
|
||||
case utf8.RuneCountInString(v.Description) > MaxChunkLength:
|
||||
@@ -509,6 +552,19 @@ func ChannelEntriesList(ctx context.Context, commonFilter *model.Filter, sort *m
|
||||
|
||||
authorModby := v.AuthorDetail.ModifiedBy
|
||||
|
||||
authorRole := v.AuthorDetail.RoleId
|
||||
|
||||
authorrolename := v.AuthorDetail.RoleName
|
||||
|
||||
var firstn = strings.ToUpper(v.AuthorDetail.FirstName[:1])
|
||||
|
||||
var lastn string
|
||||
if v.AuthorDetail.LastName != "" {
|
||||
lastn = strings.ToUpper(v.AuthorDetail.LastName[:1])
|
||||
}
|
||||
|
||||
Namestring := firstn + lastn
|
||||
|
||||
authorDetails := &model.Author{
|
||||
ID: v.AuthorDetail.Id,
|
||||
FirstName: v.AuthorDetail.FirstName,
|
||||
@@ -522,6 +578,9 @@ func ChannelEntriesList(ctx context.Context, commonFilter *model.Filter, sort *m
|
||||
ModifiedOn: &authorModon,
|
||||
ModifiedBy: &authorModby,
|
||||
TenantID: v.AuthorDetail.TenantId,
|
||||
RoleID: &authorRole,
|
||||
RoleName: &authorrolename,
|
||||
NameString: &Namestring,
|
||||
}
|
||||
|
||||
finalChannelEntries[i].AuthorDetails = authorDetails
|
||||
@@ -675,7 +734,7 @@ func ChannelEntriesList(ctx context.Context, commonFilter *model.Filter, sort *m
|
||||
CreatedBy: field.FieldValue.CreatedBy,
|
||||
ModifiedOn: &fieldValueModon,
|
||||
ModifiedBy: &fieldValueModBy,
|
||||
TenantId: field.FieldValue.TenantId,
|
||||
TenantID: field.FieldValue.TenantId,
|
||||
}
|
||||
|
||||
conv_fieldOptions := make([]model.FieldOptions, len(field.FieldOptions))
|
||||
@@ -747,7 +806,7 @@ func ChannelEntriesList(ctx context.Context, commonFilter *model.Filter, sort *m
|
||||
return &model.ChannelEntryDetails{ChannelEntriesList: finalChannelEntries, Count: commonCount}, nil
|
||||
}
|
||||
|
||||
func ChannelEntryDetail(ctx context.Context, id *int, slug *string, additionalData *model.EntriesAdditionalData, channelId *int) (*model.ChannelEntries, error) {
|
||||
func ChannelEntryDetail(ctx context.Context, id *int, slug *string, additionalData *model.EntriesAdditionalData, channelId *int, memberid *int) (*model.ChannelEntries, error) {
|
||||
|
||||
c, ok := ctx.Value(GinContext).(*gin.Context)
|
||||
|
||||
@@ -768,8 +827,8 @@ func ChannelEntryDetail(ctx context.Context, id *int, slug *string, additionalDa
|
||||
}
|
||||
|
||||
var (
|
||||
entryId, chanId int
|
||||
entrySlug string
|
||||
entryId, chanId, memid int
|
||||
entrySlug, ctalink string
|
||||
categoryFlag, fieldsFlg, memberProfFlag, authorFlag bool
|
||||
)
|
||||
|
||||
@@ -787,6 +846,10 @@ func ChannelEntryDetail(ctx context.Context, id *int, slug *string, additionalDa
|
||||
chanId = *channelId
|
||||
}
|
||||
|
||||
if memberid != nil && *memberid != 0 {
|
||||
|
||||
memid = *memberid
|
||||
}
|
||||
fmt.Println("chaannan", chanId)
|
||||
|
||||
if additionalData != nil {
|
||||
@@ -828,12 +891,26 @@ func ChannelEntryDetail(ctx context.Context, id *int, slug *string, additionalDa
|
||||
GetAdditionalFields: fieldsFlg,
|
||||
GetAuthorDetails: authorFlag,
|
||||
ChannelId: chanId,
|
||||
MemberId: memid,
|
||||
}
|
||||
|
||||
channelEntry, _, err := ChannelConfigWP.FetchChannelEntryDetail(inputs, nil)
|
||||
|
||||
fmt.Println("aithorDetails", channelEntry.AuthorDetail.CreatedOn)
|
||||
fmt.Println(channelEntry.SavedFlag, "savedflagg")
|
||||
|
||||
if channelEntry.CtaId != 0 {
|
||||
|
||||
formdata, _ := FormConfigwp.GetCtaById(channelEntry.CtaId)
|
||||
|
||||
ctalink = `/forms/` + formdata.FormSlug + `-` + formdata.Uuid
|
||||
|
||||
}
|
||||
|
||||
viewurl := os.Getenv("VIEW_BASE_URL")
|
||||
|
||||
Channelinfo, _ := ChannelConfigWP.ChannelDetail(channels.Channels{Id: channelEntry.ChannelId, TenantId: channelEntry.TenantId})
|
||||
|
||||
previewurl := viewurl + "/" + Channelinfo.ChannelName + "/" + channelEntry.Slug + "-" + channelEntry.Uuid
|
||||
switch {
|
||||
|
||||
case err != nil:
|
||||
@@ -918,6 +995,15 @@ func ChannelEntryDetail(ctx context.Context, id *int, slug *string, additionalDa
|
||||
|
||||
if channelEntry.AuthorDetail.Id != 0 {
|
||||
|
||||
var firstn = strings.ToUpper(channelEntry.AuthorDetail.FirstName[:1])
|
||||
|
||||
var lastn string
|
||||
if channelEntry.AuthorDetail.LastName != "" {
|
||||
lastn = strings.ToUpper(channelEntry.AuthorDetail.LastName[:1])
|
||||
}
|
||||
|
||||
Namestring := firstn + lastn
|
||||
|
||||
authorDetails = model.Author{
|
||||
ID: channelEntry.AuthorDetail.Id,
|
||||
FirstName: channelEntry.AuthorDetail.FirstName,
|
||||
@@ -931,6 +1017,8 @@ func ChannelEntryDetail(ctx context.Context, id *int, slug *string, additionalDa
|
||||
ModifiedOn: &channelEntry.AuthorDetail.ModifiedOn,
|
||||
ModifiedBy: &channelEntry.AuthorDetail.ModifiedBy,
|
||||
TenantID: channelEntry.AuthorDetail.TenantId,
|
||||
RoleName: &channelEntry.AuthorDetail.RoleName,
|
||||
NameString: &Namestring,
|
||||
}
|
||||
|
||||
}
|
||||
@@ -980,7 +1068,7 @@ func ChannelEntryDetail(ctx context.Context, id *int, slug *string, additionalDa
|
||||
CreatedBy: field.FieldValue.CreatedBy,
|
||||
ModifiedOn: &fieldValueModon,
|
||||
ModifiedBy: &fieldValueModBy,
|
||||
TenantId: field.FieldValue.TenantId,
|
||||
TenantID: field.FieldValue.TenantId,
|
||||
}
|
||||
|
||||
conv_fieldOptions := make([]model.FieldOptions, len(field.FieldOptions))
|
||||
@@ -1086,6 +1174,9 @@ func ChannelEntryDetail(ctx context.Context, id *int, slug *string, additionalDa
|
||||
MemberProfile: &memberProfile,
|
||||
AdditionalFields: &additionalFields,
|
||||
AuthorDetails: &authorDetails,
|
||||
CtaLink: &ctalink,
|
||||
SavedFlag: &channelEntry.SavedFlag,
|
||||
PreviewLink: &previewurl,
|
||||
}
|
||||
|
||||
switch {
|
||||
@@ -1166,3 +1257,81 @@ func UpdateEntryViewCount(ctx context.Context, id *int, slug *string) (*model.Co
|
||||
|
||||
return &model.CountUpdate{Count: viewCount, Status: true}, nil
|
||||
}
|
||||
|
||||
func TopAuthorsList(ctx context.Context, id *string) ([]*model.Author, error) {
|
||||
|
||||
c, ok := ctx.Value(GinContext).(*gin.Context)
|
||||
if !ok {
|
||||
ErrorLog.Printf("%v", info.ErrGinCtx)
|
||||
return []*model.Author{}, info.ErrGinCtx
|
||||
}
|
||||
|
||||
var tenantid string
|
||||
|
||||
if *id != "" {
|
||||
|
||||
tenantid = *id
|
||||
}
|
||||
|
||||
Authors, err := ChannelConfigWP.EntryAuthors(tenantid)
|
||||
if err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
c.AbortWithStatus(400)
|
||||
return []*model.Author{}, err
|
||||
}
|
||||
ErrorLog.Printf("%v", err)
|
||||
c.AbortWithStatus(500)
|
||||
return []*model.Author{}, err
|
||||
}
|
||||
|
||||
var authdetails []*model.Author
|
||||
for _, auth := range Authors {
|
||||
authdet := model.Author{
|
||||
ID: auth.AuthorID,
|
||||
FirstName: auth.FirstName,
|
||||
LastName: auth.LastName,
|
||||
Email: auth.Email,
|
||||
MobileNo: auth.MobileNo,
|
||||
ProfileImagePath: auth.ProfileImagePath,
|
||||
}
|
||||
|
||||
authdetails = append(authdetails, &authdet)
|
||||
}
|
||||
|
||||
return authdetails, nil
|
||||
}
|
||||
|
||||
//Entry save Func//
|
||||
|
||||
func EntrySaveUpdate(ctx context.Context, entrydetails *model.EntrySave) (string, error) {
|
||||
|
||||
_, ok := ctx.Value(GinContext).(*gin.Context)
|
||||
|
||||
if !ok {
|
||||
|
||||
ErrorLog.Printf("%v", info.ErrGinCtx)
|
||||
|
||||
return "Entry not Save", info.ErrGinCtx
|
||||
}
|
||||
|
||||
// if entrydetails.EntryID ==0 || entrydetails.UserID ==0 || entrydetails.TenantID ==""{
|
||||
|
||||
// return "Entry not Save",
|
||||
// }
|
||||
var entry channels.EntrySave
|
||||
|
||||
entry = channels.EntrySave{
|
||||
EntryId: entrydetails.EntryID,
|
||||
UserId: entrydetails.UserID,
|
||||
TenantId: entrydetails.TenantID,
|
||||
IsDeleted: 0,
|
||||
}
|
||||
|
||||
err := ChannelConfigWP.EntrySave(&entry, entrydetails.Save)
|
||||
if err != nil {
|
||||
ErrorLog.Printf("entry save create error: %s", err)
|
||||
|
||||
return "Entry not Save", err
|
||||
}
|
||||
return "Entry Saved Sucessfully", nil
|
||||
}
|
||||
|
||||
Executable → Regular
+50
@@ -27,7 +27,10 @@ import (
|
||||
newauth "github.com/spurtcms/auth"
|
||||
"github.com/spurtcms/categories"
|
||||
chn "github.com/spurtcms/channels"
|
||||
"github.com/spurtcms/courses"
|
||||
forms "github.com/spurtcms/forms-builders"
|
||||
"github.com/spurtcms/member"
|
||||
membership "github.com/spurtcms/membership"
|
||||
"github.com/spurtcms/team"
|
||||
role "github.com/spurtcms/team-roles"
|
||||
)
|
||||
@@ -47,10 +50,13 @@ var (
|
||||
NewTeam *team.Teams
|
||||
NewTeamWP *team.Teams
|
||||
MemberInstance *member.Member
|
||||
MembershipConfigWP *membership.Membership
|
||||
MemberAuthInstance *member.Member
|
||||
CategoryInstance *categories.Categories
|
||||
CategoryAuthInstance *categories.Categories
|
||||
MaxChunkLength int = 8388573 //max size of a string response
|
||||
FormConfigwp *forms.Formbuilders
|
||||
CoursesInstance *courses.Courses
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -81,6 +87,12 @@ func init() {
|
||||
GetCategoryInstance()
|
||||
|
||||
GetCategoryAuthInstance()
|
||||
|
||||
GetMembershipInstanceWithoutPermission()
|
||||
|
||||
GetFormInstance()
|
||||
|
||||
GetCoursesInstance()
|
||||
}
|
||||
|
||||
// AuthCofing
|
||||
@@ -123,6 +135,20 @@ func GetChannelInstanceWithoutPermission() *chn.Channel {
|
||||
return ChannelConfigWP
|
||||
}
|
||||
|
||||
// channel config without permission
|
||||
func GetMembershipInstanceWithoutPermission() *membership.Membership {
|
||||
|
||||
MembershipConfigWP = membership.MembershipSetup(membership.Config{
|
||||
DB: models.DB,
|
||||
AuthEnable: false,
|
||||
PermissionEnable: false,
|
||||
Auth: NewAuth,
|
||||
// DataBaseType: os.Getenv("DATABASE_TYPE"),
|
||||
})
|
||||
|
||||
return MembershipConfigWP
|
||||
}
|
||||
|
||||
// TeamConfig
|
||||
func GetTeamInstance() *team.Teams {
|
||||
|
||||
@@ -211,6 +237,30 @@ func GetCategoryAuthInstance() *categories.Categories {
|
||||
return CategoryAuthInstance
|
||||
}
|
||||
|
||||
func GetFormInstance() *forms.Formbuilders {
|
||||
|
||||
FormConfigwp = forms.FormSetup(forms.Config{
|
||||
DB: models.DB,
|
||||
AuthEnable: false,
|
||||
PermissionEnable: false,
|
||||
Auth: NewAuth,
|
||||
})
|
||||
|
||||
return FormConfigwp
|
||||
}
|
||||
|
||||
func GetCoursesInstance() *courses.Courses {
|
||||
|
||||
CoursesInstance = courses.CoursesSetup(courses.Config{
|
||||
DB: models.DB,
|
||||
AuthEnable: true,
|
||||
PermissionEnable: false,
|
||||
Auth: NewAuth,
|
||||
})
|
||||
|
||||
return CoursesInstance
|
||||
}
|
||||
|
||||
func ImageResize(c *gin.Context) {
|
||||
|
||||
fileName := c.Query("name")
|
||||
|
||||
@@ -0,0 +1,171 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
"spurt-cms/graphql/info"
|
||||
"spurt-cms/graphql/model"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
//CourseList Api
|
||||
|
||||
func CourseList(ctx context.Context, tenantId *string, status *int, categoryid *int) (*model.CourseLists, error) {
|
||||
|
||||
c, ok := ctx.Value(GinContext).(*gin.Context)
|
||||
|
||||
if !ok {
|
||||
|
||||
ErrorLog.Printf("%v", info.ErrGinCtx)
|
||||
|
||||
return &model.CourseLists{}, info.ErrGinCtx
|
||||
}
|
||||
|
||||
var tenantid string
|
||||
|
||||
if *tenantId != "" {
|
||||
|
||||
tenantid = *tenantId
|
||||
}
|
||||
|
||||
var Status int
|
||||
|
||||
if *status != 0 {
|
||||
|
||||
Status = *status
|
||||
}
|
||||
|
||||
var CategoryId int
|
||||
|
||||
if *categoryid != 0 {
|
||||
|
||||
CategoryId = *categoryid
|
||||
}
|
||||
|
||||
courselist, count, err := CoursesInstance.CourseList(Status, tenantid, CategoryId)
|
||||
if err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
c.AbortWithStatus(400)
|
||||
return nil, err
|
||||
}
|
||||
ErrorLog.Printf("%v", err)
|
||||
c.AbortWithStatus(500)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var finalCourseList []model.Course
|
||||
|
||||
for _, val := range courselist {
|
||||
|
||||
value := model.Course{
|
||||
ID: val.Id,
|
||||
Title: val.Title,
|
||||
Description: val.Description,
|
||||
ImageName: val.ImageName,
|
||||
ImagePath: val.ImagePath,
|
||||
Category: val.CategoryId,
|
||||
}
|
||||
|
||||
finalCourseList = append(finalCourseList, value)
|
||||
|
||||
}
|
||||
|
||||
list := model.CourseLists{
|
||||
Courselist: finalCourseList,
|
||||
Count: int(count),
|
||||
}
|
||||
|
||||
return &list, nil
|
||||
|
||||
}
|
||||
|
||||
//CourseDetails Api
|
||||
|
||||
func CourseDetails(ctx context.Context, tenantId *string, courseId *int) (*model.CourseDetails, error) {
|
||||
|
||||
c, ok := ctx.Value(GinContext).(*gin.Context)
|
||||
|
||||
if !ok {
|
||||
|
||||
ErrorLog.Printf("%v", info.ErrGinCtx)
|
||||
|
||||
return &model.CourseDetails{}, info.ErrGinCtx
|
||||
}
|
||||
|
||||
var tenantid string
|
||||
|
||||
if *tenantId != "" {
|
||||
|
||||
tenantid = *tenantId
|
||||
}
|
||||
|
||||
var CourseId int
|
||||
|
||||
if *courseId != 0 {
|
||||
|
||||
CourseId = *courseId
|
||||
}
|
||||
|
||||
sectionlist, serr := CoursesInstance.SectionList(CourseId, tenantid)
|
||||
if serr != nil {
|
||||
if serr == gorm.ErrRecordNotFound {
|
||||
c.AbortWithStatus(400)
|
||||
return nil, serr
|
||||
}
|
||||
ErrorLog.Printf("%v", serr)
|
||||
c.AbortWithStatus(500)
|
||||
return nil, serr
|
||||
}
|
||||
|
||||
var FinalSectionList []model.Sections
|
||||
|
||||
for _, sectionValue := range sectionlist {
|
||||
|
||||
SectionList := model.Sections{
|
||||
ID: sectionValue.Id,
|
||||
CourseID: sectionValue.CourseId,
|
||||
Title: sectionValue.Title,
|
||||
Content: sectionValue.Content,
|
||||
OrderIndex: sectionValue.OrderIndex,
|
||||
TenantID: sectionValue.TenantId,
|
||||
}
|
||||
|
||||
FinalSectionList = append(FinalSectionList, SectionList)
|
||||
}
|
||||
|
||||
lessonlist, lerr := CoursesInstance.LessonList(CourseId, tenantid)
|
||||
if lerr != nil {
|
||||
if lerr == gorm.ErrRecordNotFound {
|
||||
c.AbortWithStatus(400)
|
||||
return nil, lerr
|
||||
}
|
||||
ErrorLog.Printf("%v", lerr)
|
||||
c.AbortWithStatus(500)
|
||||
return nil, lerr
|
||||
}
|
||||
|
||||
var FinalLessonList []model.Lesson
|
||||
|
||||
for _, lessonValue := range lessonlist {
|
||||
|
||||
LessonList := model.Lesson{
|
||||
ID: lessonValue.Id,
|
||||
CourseID: lessonValue.CourseId,
|
||||
SectionID: lessonValue.SectionId,
|
||||
Title: lessonValue.Title,
|
||||
Content: lessonValue.Content,
|
||||
EmbedLink: lessonValue.EmbedLink,
|
||||
FileName: lessonValue.FileName,
|
||||
FilePath: lessonValue.FilePath,
|
||||
LessonType: lessonValue.LessonType,
|
||||
OrderIndex: lessonValue.OrderIndex,
|
||||
TenantID: lessonValue.TenantId,
|
||||
}
|
||||
|
||||
FinalLessonList = append(FinalLessonList, LessonList)
|
||||
}
|
||||
|
||||
return &model.CourseDetails{Lesson: FinalLessonList, Section: FinalSectionList}, nil
|
||||
|
||||
}
|
||||
Executable → Regular
+533
-7
@@ -3,14 +3,22 @@ package controller
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
"spurt-cms/controllers"
|
||||
"spurt-cms/graphql/info"
|
||||
"spurt-cms/graphql/model"
|
||||
storagecontroller "spurt-cms/storage-controller"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/golang-jwt/jwt"
|
||||
"github.com/spurtcms/member"
|
||||
"github.com/spurtcms/team"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
@@ -27,8 +35,9 @@ func MemberRegister(ctx context.Context, memberData *model.MemberDetails, argume
|
||||
return false, info.ErrGinCtx
|
||||
}
|
||||
|
||||
tenantDetails := c.GetStringMap("tenant")
|
||||
tenantId := tenantDetails["TenantId"].(string)
|
||||
tenantId := memberData.TenantID
|
||||
createdBy := memberData.UserID
|
||||
fmt.Println("userid:", createdBy, tenantId)
|
||||
|
||||
var (
|
||||
memberSettings member.TblMemberSetting
|
||||
@@ -58,11 +67,9 @@ func MemberRegister(ctx context.Context, memberData *model.MemberDetails, argume
|
||||
memberDetails.LastName = *memberData.LastName.Value()
|
||||
}
|
||||
|
||||
if memberData.Password.IsSet() {
|
||||
if memberData.Password != "" {
|
||||
|
||||
hashPass := controllers.HashingPassword(*memberData.Password.Value())
|
||||
|
||||
memberDetails.Password = hashPass
|
||||
memberDetails.Password = memberData.Password
|
||||
}
|
||||
|
||||
if memberData.Username.IsSet() {
|
||||
@@ -99,11 +106,81 @@ func MemberRegister(ctx context.Context, memberData *model.MemberDetails, argume
|
||||
memberDetails.Username = strings.ToLower(memberData.FirstName)
|
||||
memberDetails.IsActive = 1
|
||||
|
||||
// MemberInstance.CreateMember()
|
||||
memberss := member.MemberCreationUpdation{
|
||||
FirstName: memberDetails.FirstName,
|
||||
LastName: memberDetails.LastName,
|
||||
Username: memberDetails.Username,
|
||||
Email: memberDetails.Email,
|
||||
Password: memberDetails.Password,
|
||||
IsActive: memberDetails.IsActive,
|
||||
CreatedBy: createdBy,
|
||||
TenantId: tenantId,
|
||||
}
|
||||
|
||||
members, _ := MemberInstance.CreateMember(memberss)
|
||||
|
||||
MemberProfile := member.MemberprofilecreationUpdation{
|
||||
MemberId: members.Id,
|
||||
CreatedBy: createdBy,
|
||||
TenantId: tenantId,
|
||||
}
|
||||
|
||||
merr := MemberInstance.CreateMemberProfile(MemberProfile)
|
||||
if merr != nil {
|
||||
ErrorLog.Printf("memberprofile create error: %s", merr)
|
||||
}
|
||||
|
||||
return true, nil
|
||||
}
|
||||
|
||||
func MemberLogin(ctx context.Context, memberData *model.MemberSignin) (*model.MemberCheckLoginResponse, error) {
|
||||
|
||||
c, ok := ctx.Value(GinContext).(*gin.Context)
|
||||
|
||||
if !ok {
|
||||
|
||||
ErrorLog.Printf("%v", info.ErrGinCtx)
|
||||
|
||||
c.AbortWithStatus(500)
|
||||
|
||||
return nil, info.ErrGinCtx
|
||||
}
|
||||
|
||||
Email := memberData.Email
|
||||
Password := memberData.Password
|
||||
UserId := memberData.UserID
|
||||
TenantId := memberData.TenantID
|
||||
|
||||
token, pass, email, _ := model.Model.CheckMemberLogin(Email, Password, UserId, TenantId)
|
||||
if !email {
|
||||
return &model.MemberCheckLoginResponse{
|
||||
Email: false,
|
||||
Message: "Login failed: invalid credentials",
|
||||
Success: false,
|
||||
}, nil
|
||||
}
|
||||
if !pass {
|
||||
return &model.MemberCheckLoginResponse{
|
||||
Email: true,
|
||||
Password: false,
|
||||
Message: "Login failed: invalid credentials",
|
||||
Success: false,
|
||||
}, nil
|
||||
}
|
||||
member, _ := MemberInstance.GetMemberAndProfileData(0, Email, 0, "", TenantId)
|
||||
|
||||
var firstn = strings.ToUpper(member.FirstName[:1])
|
||||
|
||||
var lastn string
|
||||
if member.LastName != "" {
|
||||
lastn = strings.ToUpper(member.LastName[:1])
|
||||
}
|
||||
member.NameString = firstn + lastn
|
||||
|
||||
member.NameString = firstn + lastn
|
||||
return &model.MemberCheckLoginResponse{Email: true, Password: true, Message: "Login successful", Token: token, Success: true,
|
||||
MemberDetails: &model.Members{Email: member.Email, FirstName: member.FirstName, LastName: &member.LastName, ProfileImage: &member.ProfileImage, ProfileImagePath: &member.ProfileImagePath, Mobile: &member.MobileNo, NameString: &member.NameString, ID: &member.Id}}, nil
|
||||
}
|
||||
func MembersList(ctx context.Context, filter *model.Filter) (*model.MembersDetails, error) {
|
||||
|
||||
c, ok := ctx.Value(GinContext).(*gin.Context)
|
||||
@@ -204,3 +281,452 @@ func MembersList(ctx context.Context, filter *model.Filter) (*model.MembersDetai
|
||||
|
||||
return &model.MembersDetails{MembersList: memberlist, Count: int(count)}, nil
|
||||
}
|
||||
|
||||
//Forgot Password API//
|
||||
|
||||
func ForgotPassword(ctx context.Context, memberdetails *model.MemberInfo) (*model.ForgotPasswordResponse, error) {
|
||||
|
||||
_, ok := ctx.Value(GinContext).(*gin.Context)
|
||||
|
||||
if !ok {
|
||||
|
||||
ErrorLog.Printf("%v", info.ErrGinCtx)
|
||||
|
||||
return &model.ForgotPasswordResponse{}, info.ErrGinCtx
|
||||
}
|
||||
|
||||
member, err := MemberInstance.GetMemberAndProfileData(0, memberdetails.Email, 0, "", memberdetails.TenantID)
|
||||
|
||||
id := member.Id
|
||||
token, _ := CreateTokenWithExpireTime(id, memberdetails.TenantID)
|
||||
|
||||
fmt.Println(token, "token")
|
||||
|
||||
if err != nil {
|
||||
|
||||
ErrorLog.Printf("Send Link forget password error: %s", err)
|
||||
return &model.ForgotPasswordResponse{Message: "you are not registered with us", Success: false}, fmt.Errorf("you are not registered with us")
|
||||
}
|
||||
|
||||
var url_prefix = os.Getenv("BASE_URL")
|
||||
|
||||
var resetpassurl = memberdetails.URL
|
||||
|
||||
linkedin := os.Getenv("LINKEDIN")
|
||||
facebook := os.Getenv("FACEBOOK")
|
||||
twitter := os.Getenv("TWITTER")
|
||||
youtube := os.Getenv("YOUTUBE")
|
||||
insta := os.Getenv("INSTAGRAM")
|
||||
data := map[string]interface{}{
|
||||
"fname": member.Username,
|
||||
"resetpassword": resetpassurl + "/auth/change-password?token=" + token,
|
||||
"restpassurl": resetpassurl + "/auth/change-password",
|
||||
"admin_logo": url_prefix + "public/img/SpurtCMSlogo.png",
|
||||
"fb_logo": url_prefix + "public/img/email-icons/facebook.png",
|
||||
"linkedin_logo": url_prefix + "public/img/email-icons/linkedin.png",
|
||||
"twitter_logo": url_prefix + "public/img/email-icons/x.png",
|
||||
"youtube_logo": url_prefix + "public/img/email-icons/youtube.png",
|
||||
"insta_log": url_prefix + "public/img/email-icons/instagram.png",
|
||||
"facebook": facebook,
|
||||
"instagram": insta,
|
||||
"youtube": youtube,
|
||||
"linkedin": linkedin,
|
||||
"twitter": twitter,
|
||||
}
|
||||
var wg sync.WaitGroup
|
||||
|
||||
wg.Add(1)
|
||||
|
||||
Chan := make(chan string, 1)
|
||||
|
||||
go controllers.ForgetPasswordEmail(Chan, &wg, data, member.Email, "Forgot Password", "")
|
||||
|
||||
close(Chan)
|
||||
|
||||
return &model.ForgotPasswordResponse{Message: "Mail sent successfully!", Success: true}, nil
|
||||
}
|
||||
|
||||
//Reset Password API//
|
||||
|
||||
func ResetPassword(ctx context.Context, memberinfo *model.MemberResetpassInfo) (bool, error) {
|
||||
|
||||
_, ok := ctx.Value(GinContext).(*gin.Context)
|
||||
|
||||
if !ok {
|
||||
|
||||
ErrorLog.Printf("%v", info.ErrGinCtx)
|
||||
|
||||
return false, info.ErrGinCtx
|
||||
}
|
||||
newpass := memberinfo.NewPassword
|
||||
|
||||
confrimpass := memberinfo.ConfrimPassword
|
||||
|
||||
token := memberinfo.Token
|
||||
|
||||
Claims := jwt.MapClaims{}
|
||||
_, err := jwt.ParseWithClaims(token, Claims, func(token *jwt.Token) (interface{}, error) {
|
||||
return []byte(os.Getenv("JWT_SECRET")), nil
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
if err == jwt.ErrSignatureInvalid {
|
||||
ErrorLog.Printf("Invalid token change password error: %s", err)
|
||||
return false, err
|
||||
}
|
||||
}
|
||||
|
||||
memberIDStr, ok := Claims["member_id"].(string)
|
||||
if !ok {
|
||||
fmt.Println("member_id is not a string")
|
||||
return false, err
|
||||
}
|
||||
|
||||
memberid, err := strconv.Atoi(memberIDStr)
|
||||
if err != nil {
|
||||
fmt.Println("Error converting member_id:", err)
|
||||
return false, err
|
||||
}
|
||||
|
||||
TenantidStr, ok := Claims["tenant_id"].(string)
|
||||
if !ok {
|
||||
return false, err
|
||||
}
|
||||
|
||||
Tenantid := TenantidStr
|
||||
|
||||
getuserinfo, _ := NewTeamWP.GetTenantDetails(Tenantid)
|
||||
|
||||
if newpass == confrimpass {
|
||||
|
||||
err := MemberInstance.MemberPasswordUpdate(newpass, confrimpass, "", memberid, getuserinfo.Id, Tenantid)
|
||||
if err != nil {
|
||||
ErrorLog.Printf("set new password error: %s", err)
|
||||
return false, err
|
||||
}
|
||||
|
||||
} else {
|
||||
return false, fmt.Errorf("password don't mismatch")
|
||||
}
|
||||
|
||||
return true, nil
|
||||
}
|
||||
|
||||
func CreateTokenWithExpireTime(userid int, tenantid string) (string, error) {
|
||||
atClaims := jwt.MapClaims{}
|
||||
atClaims["authorized"] = true
|
||||
atClaims["member_id"] = (userid)
|
||||
atClaims["tenant_id"] = tenantid
|
||||
|
||||
at := jwt.NewWithClaims(jwt.SigningMethodHS256, atClaims)
|
||||
token, err := at.SignedString([]byte(os.Getenv("JWT_SECRET")))
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return token, nil
|
||||
}
|
||||
|
||||
// social Login //
|
||||
func MemberSocialLogin(ctx context.Context, input *model.SocialLoginInput) (*model.SocialLoginResponse, error) {
|
||||
|
||||
c, ok := ctx.Value(GinContext).(*gin.Context)
|
||||
|
||||
if !ok {
|
||||
ErrorLog.Printf("%v", info.ErrGinCtx)
|
||||
c.AbortWithError(500, nil)
|
||||
}
|
||||
|
||||
apiKey := c.GetHeader("ApiKey")
|
||||
|
||||
tenantdetails, _ := model.Model.GettenantByapikey(apiKey)
|
||||
|
||||
fmt.Println(apiKey, tenantdetails, "tenantdetailsss")
|
||||
|
||||
userinfo, _ := model.Model.GetUserbyTenantId(tenantdetails.TenantId)
|
||||
|
||||
memberinfo, _ := MemberInstance.GetMemberAndProfileData(0, input.Email, 0, "", tenantdetails.TenantId)
|
||||
|
||||
if memberinfo.Id != 0 && memberinfo.IsActive == 0 {
|
||||
message := "This account is inactive. Please contact Admin."
|
||||
return &model.SocialLoginResponse{Message: message}, fmt.Errorf("account is inactive")
|
||||
}
|
||||
|
||||
var response model.SocialLoginResponse
|
||||
var memid int
|
||||
var username string
|
||||
var lastname string
|
||||
var password string
|
||||
|
||||
if memberinfo.Email != input.Email {
|
||||
|
||||
if input.Username.IsSet() && input.Username.Value() != nil {
|
||||
|
||||
username = *input.Username.Value()
|
||||
}
|
||||
if input.LastName.IsSet() && input.LastName.Value() != nil {
|
||||
|
||||
lastname = *input.LastName.Value()
|
||||
}
|
||||
if input.Password.IsSet() && input.Password.Value() != nil {
|
||||
|
||||
password = *input.Password.Value()
|
||||
}
|
||||
|
||||
membergrp, err := model.Model.GetmemberGroup("default-group", tenantdetails.TenantId)
|
||||
|
||||
fmt.Println(membergrp, "membergrbb")
|
||||
|
||||
memberss := member.MemberCreationUpdation{
|
||||
FirstName: input.FirstName,
|
||||
LastName: lastname,
|
||||
Username: username,
|
||||
Email: input.Email,
|
||||
Password: password,
|
||||
IsActive: 1,
|
||||
CreatedBy: userinfo.Id,
|
||||
TenantId: tenantdetails.TenantId,
|
||||
StorageType: "aws",
|
||||
}
|
||||
|
||||
members, err := MemberInstance.CreateMember(memberss)
|
||||
|
||||
if err != nil {
|
||||
fmt.Println("member creation error")
|
||||
return &model.SocialLoginResponse{Message: "member Creation error"}, err
|
||||
|
||||
}
|
||||
|
||||
MemberProfile := member.MemberprofilecreationUpdation{
|
||||
MemberId: members.Id,
|
||||
CreatedBy: userinfo.Id,
|
||||
TenantId: tenantdetails.TenantId,
|
||||
}
|
||||
|
||||
merr := MemberInstance.CreateMemberProfile(MemberProfile)
|
||||
if merr != nil {
|
||||
ErrorLog.Printf("memberprofile create error: %s", merr)
|
||||
return &model.SocialLoginResponse{Message: "memberprofile create error"}, merr
|
||||
}
|
||||
|
||||
memid = members.Id
|
||||
|
||||
} else {
|
||||
memid = memberinfo.Id // Existing user's ID
|
||||
}
|
||||
|
||||
successMessage := "Successfully Logged In"
|
||||
token, _ := CreateTokenWithExpireTime(memid, tenantdetails.TenantId)
|
||||
response.Token = token
|
||||
response.Message = successMessage
|
||||
response.Userid = memid
|
||||
|
||||
return &response, nil
|
||||
}
|
||||
|
||||
//Member Profile Details//
|
||||
|
||||
func MemberProfileDetails(ctx context.Context, id *int) (*model.Members, error) {
|
||||
|
||||
c, ok := ctx.Value(GinContext).(*gin.Context)
|
||||
|
||||
if !ok {
|
||||
ErrorLog.Printf("%v", info.ErrGinCtx)
|
||||
c.AbortWithError(500, nil)
|
||||
}
|
||||
var memberid int
|
||||
var memdet model.Members
|
||||
|
||||
if id != nil {
|
||||
|
||||
memberid = *id
|
||||
}
|
||||
if memberid == 0 {
|
||||
|
||||
err := errors.New("unauthorized access")
|
||||
|
||||
c.AbortWithError(http.StatusUnauthorized, err)
|
||||
|
||||
return &model.Members{}, err
|
||||
|
||||
}
|
||||
tenantData, ok := c.Get("tenantDetails")
|
||||
|
||||
tenantdetails := tenantData.(team.TblUser)
|
||||
|
||||
memberdetails, err := MemberInstance.GetMemberAndProfileData(memberid, "", 0, "", tenantdetails.TenantId)
|
||||
if err != nil {
|
||||
|
||||
return &model.Members{}, err
|
||||
}
|
||||
var firstn = strings.ToUpper(memberdetails.FirstName[:1])
|
||||
var lastn string
|
||||
if memberdetails.LastName != "" {
|
||||
lastn = strings.ToUpper(memberdetails.LastName[:1])
|
||||
}
|
||||
memberdetails.NameString = firstn + lastn
|
||||
|
||||
memberdetails.NameString = firstn + lastn
|
||||
memdet = model.Members{
|
||||
ID: &memberdetails.Id,
|
||||
FirstName: memberdetails.FirstName,
|
||||
LastName: &memberdetails.LastName,
|
||||
Username: &memberdetails.Username,
|
||||
ProfileImage: &memberdetails.ProfileImage,
|
||||
ProfileImagePath: &memberdetails.ProfileImagePath,
|
||||
Email: memberdetails.Email,
|
||||
IsActive: &memberdetails.IsActive,
|
||||
Mobile: &memberdetails.MobileNo,
|
||||
GroupID: &memberdetails.MemberGroupId,
|
||||
NameString: &memberdetails.NameString,
|
||||
}
|
||||
|
||||
return &memdet, nil
|
||||
}
|
||||
|
||||
//Update Memberprofile//
|
||||
|
||||
func UpdateMemberProfile(ctx context.Context, input *model.UpdateMember) (*model.UpdatememberResponse, error) {
|
||||
c, ok := ctx.Value(GinContext).(*gin.Context)
|
||||
|
||||
if !ok {
|
||||
ErrorLog.Printf("%v", info.ErrGinCtx)
|
||||
c.AbortWithError(500, nil)
|
||||
}
|
||||
if input.ID == 0 {
|
||||
return &model.UpdatememberResponse{Message: "Invalid member ID"}, fmt.Errorf("member ID cannot be zero")
|
||||
}
|
||||
var imageName, imagePath, lastname, Password, hasspass string
|
||||
|
||||
tenantData, _ := c.Get("tenantDetails")
|
||||
tenantDetails := tenantData.(team.TblUser)
|
||||
member, err := MemberInstance.GetMemberDetails(input.ID, tenantDetails.TenantId)
|
||||
|
||||
if err != nil {
|
||||
|
||||
return &model.UpdatememberResponse{Message: "Member not found or deleted"}, fmt.Errorf("member with ID %d not found: %v", input.ID, err)
|
||||
}
|
||||
|
||||
if input.RemoveImage.IsSet() && *input.RemoveImage.Value() {
|
||||
imageName = ""
|
||||
imagePath = ""
|
||||
} else if input.ProfileImage.IsSet() && *input.ProfileImage.Value() != "" {
|
||||
|
||||
var err error
|
||||
var imageByte []byte
|
||||
imageName, imagePath, imageByte, err = controllers.ConvertBase64toByte(*input.ProfileImage.Value(), "member")
|
||||
|
||||
if err != nil {
|
||||
return &model.UpdatememberResponse{Message: "Failed to image upload"}, err
|
||||
}
|
||||
|
||||
imagePath = tenantDetails.S3FolderName + imagePath
|
||||
|
||||
if uerr := storagecontroller.UploadCropImageS3(imageName, imagePath, imageByte); uerr != nil {
|
||||
return &model.UpdatememberResponse{Message: "Failed to image upload"}, uerr
|
||||
}
|
||||
} else {
|
||||
|
||||
imageName = member.ProfileImage
|
||||
imagePath = member.ProfileImagePath
|
||||
}
|
||||
|
||||
fmt.Println("imagename", imageName, imagePath)
|
||||
|
||||
if input.LastName.IsSet() && input.LastName.Value() != nil {
|
||||
lastname = *input.LastName.Value()
|
||||
}
|
||||
|
||||
if input.Password.IsSet() && input.Password.Value() != nil {
|
||||
|
||||
Password = *input.Password.Value()
|
||||
}
|
||||
|
||||
// if input.Username.IsSet() && input.Username.Value() != nil {
|
||||
// Username = *input.Username.Value()
|
||||
// }
|
||||
|
||||
if input.Email != "" {
|
||||
|
||||
isExist, err := MemberInstance.CheckEmailInMember(input.ID, input.Email, tenantDetails.TenantId)
|
||||
|
||||
if isExist || err == nil {
|
||||
|
||||
fmt.Println("isexit", isExist, err)
|
||||
|
||||
err = errors.New("Email already exists")
|
||||
|
||||
c.AbortWithError(http.StatusBadRequest, err)
|
||||
|
||||
return &model.UpdatememberResponse{Message: "Email Already Exists"}, err
|
||||
}
|
||||
}
|
||||
|
||||
if input.Mobile != "" {
|
||||
|
||||
isExist, err := MemberInstance.CheckNumberInMember(input.ID, input.Mobile, tenantDetails.TenantId)
|
||||
|
||||
if isExist || err == nil {
|
||||
|
||||
err = errors.New("Mobile Number already exists")
|
||||
|
||||
c.AbortWithError(http.StatusBadRequest, err)
|
||||
|
||||
return &model.UpdatememberResponse{Message: "Mobile Number Already Exists"}, err
|
||||
}
|
||||
}
|
||||
if Password != "" {
|
||||
|
||||
hasspass = hashingPassword(Password)
|
||||
|
||||
} else {
|
||||
|
||||
hasspass = member.Password
|
||||
}
|
||||
|
||||
updateMap := map[string]interface{}{
|
||||
"first_name": input.FirstName,
|
||||
"last_name": lastname,
|
||||
"mobile_no": input.Mobile,
|
||||
"email": input.Email,
|
||||
"password": hasspass,
|
||||
"profile_image": imageName,
|
||||
"profile_image_path": imagePath,
|
||||
"is_active": 1,
|
||||
"storage_type": "aws",
|
||||
}
|
||||
|
||||
err2 := MemberInstance.MemberFlexibleUpdate(updateMap, input.ID, tenantDetails.Id, tenantDetails.TenantId)
|
||||
|
||||
if err2 != nil {
|
||||
return &model.UpdatememberResponse{Message: "User Update error"}, err2
|
||||
}
|
||||
|
||||
nmember, _ := MemberInstance.GetMemberDetails(input.ID, tenantDetails.TenantId)
|
||||
|
||||
return &model.UpdatememberResponse{
|
||||
Message: "User Updated Successfully",
|
||||
MemberDetails: &model.Members{
|
||||
FirstName: nmember.FirstName,
|
||||
LastName: &nmember.LastName,
|
||||
Email: nmember.Email,
|
||||
Mobile: &nmember.MobileNo,
|
||||
ProfileImage: &nmember.ProfileImage,
|
||||
ProfileImagePath: &nmember.ProfileImagePath,
|
||||
Username: &nmember.Username,
|
||||
ID: &nmember.Id,
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
func hashingPassword(pass string) string {
|
||||
|
||||
passbyte, err := bcrypt.GenerateFromPassword([]byte(pass), 14)
|
||||
|
||||
if err != nil {
|
||||
|
||||
panic(err)
|
||||
|
||||
}
|
||||
|
||||
return string(passbyte)
|
||||
}
|
||||
|
||||
Executable → Regular
Executable → Regular
+7368
-591
File diff suppressed because it is too large
Load Diff
Executable → Regular
Executable → Regular
+3
-4
@@ -67,11 +67,10 @@ func init() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
func ErrorLog()*log.Logger{
|
||||
func ErrorLog() *log.Logger {
|
||||
return logger.ErrorLogger
|
||||
}
|
||||
|
||||
func WarnLog()*log.Logger{
|
||||
func WarnLog() *log.Logger {
|
||||
return logger.ErrorLogger
|
||||
}
|
||||
}
|
||||
|
||||
Executable → Regular
+66
@@ -3,7 +3,9 @@ package middleware
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
"spurt-cms/graphql/controller"
|
||||
"spurt-cms/graphql/info"
|
||||
"spurt-cms/graphql/model"
|
||||
@@ -11,6 +13,7 @@ import (
|
||||
|
||||
"github.com/99designs/gqlgen/graphql"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/golang-jwt/jwt"
|
||||
"github.com/spurtcms/team"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
@@ -61,6 +64,30 @@ func AuthMiddleware(ctx context.Context, _ interface{}, next graphql.Resolver) (
|
||||
return nil, err
|
||||
|
||||
}
|
||||
userkey := c.GetHeader("Userkey")
|
||||
|
||||
var userdet *model.Members
|
||||
|
||||
if userkey != "" {
|
||||
|
||||
fmt.Println("checkmemberlogin")
|
||||
|
||||
userdet, err = AuthenticateUserLogin(c, userkey)
|
||||
|
||||
if err != nil {
|
||||
|
||||
controller.ErrorLog.Printf("%v", err)
|
||||
|
||||
c.AbortWithStatus(http.StatusBadRequest)
|
||||
|
||||
return nil, err
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fmt.Println(userdet, "userdetails")
|
||||
|
||||
c.Set("userdetails", userdet)
|
||||
|
||||
c.Set("tenantDetails", tenantDetails)
|
||||
|
||||
@@ -101,6 +128,45 @@ func AuthenticateApiKey(c *gin.Context, graphqlSettings *model.TblGraphqlSetting
|
||||
|
||||
}
|
||||
|
||||
func AuthenticateUserLogin(c *gin.Context, userkey string) (userdetails *model.Members, err error) {
|
||||
|
||||
Claims := jwt.MapClaims{}
|
||||
tkn, err := jwt.ParseWithClaims(userkey, Claims, func(token *jwt.Token) (interface{}, error) {
|
||||
return []byte(os.Getenv("JWT_SECRET")), nil
|
||||
})
|
||||
var ErrorToken = errors.New("invalid token")
|
||||
if err != nil {
|
||||
if err == jwt.ErrSignatureInvalid {
|
||||
fmt.Println(err, "kkkkk")
|
||||
return &model.Members{}, ErrorToken
|
||||
}
|
||||
|
||||
return &model.Members{}, ErrorToken
|
||||
}
|
||||
|
||||
if !tkn.Valid {
|
||||
fmt.Println(tkn)
|
||||
return &model.Members{}, ErrorToken
|
||||
}
|
||||
usrid := Claims["member_id"]
|
||||
|
||||
tenantid := Claims["tenant_id"]
|
||||
|
||||
fmt.Println(usrid, tenantid, "detailsauth")
|
||||
|
||||
useridint := int(usrid.(float64))
|
||||
|
||||
tenantint := string(tenantid.(string))
|
||||
|
||||
// user, _ := strconv.Atoi(useridint)
|
||||
|
||||
c.Set("memberid", useridint)
|
||||
|
||||
member, _ := controller.MemberInstance.GetMemberDetails(useridint, tenantint)
|
||||
|
||||
return &model.Members{FirstName: member.FirstName, LastName: &member.LastName, Email: member.Email, Mobile: &member.MobileNo, ProfileImage: &member.ProfileImage, ProfileImagePath: &member.ProfileImagePath, Username: &member.Username, ID: &member.Id}, nil
|
||||
}
|
||||
|
||||
func LimitRequestBodySize(limit int64) gin.HandlerFunc {
|
||||
|
||||
return func(c *gin.Context) {
|
||||
Executable → Regular
+1
-1
@@ -10,7 +10,7 @@ func CorsMiddleware()gin.HandlerFunc{
|
||||
|
||||
c.Writer.Header().Set("Access-Control-Allow-Credentials", "true")
|
||||
|
||||
c.Writer.Header().Set("Access-Control-Allow-Headers", "Content-Type, Content-Length, Accept-Encoding, Authorization, ApiKey, TenantId, accept, origin, Cache-Control, X-Requested-With")
|
||||
c.Writer.Header().Set("Access-Control-Allow-Headers", "Content-Type, Content-Length, Accept-Encoding, Authorization, ApiKey, TenantId, accept, origin, Cache-Control, X-Requested-With,Userkey")
|
||||
|
||||
c.Writer.Header().Set("Access-Control-Allow-Methods", "POST, OPTIONS, GET, PUT")
|
||||
|
||||
Executable → Regular
+21
-1
@@ -49,7 +49,7 @@ type TblStorageTypes struct {
|
||||
Azure datatypes.JSONMap
|
||||
Drive datatypes.JSONMap
|
||||
SelectedType string
|
||||
TenantId int
|
||||
TenantId string
|
||||
}
|
||||
|
||||
func init() {
|
||||
@@ -85,3 +85,23 @@ func GetStorageType(db *gorm.DB, storageType *TblStorageTypes) error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (model ModelConfig) GettenantByapikey(apikey string) (tenant TblGraphqlSettings, err error) {
|
||||
|
||||
if err := model.DB.Debug().Model(TblGraphqlSettings{}).Where("is_deleted = 0 and token = ?", apikey).First(&tenant).Error; err != nil {
|
||||
|
||||
return TblGraphqlSettings{}, err
|
||||
}
|
||||
|
||||
return tenant, nil
|
||||
}
|
||||
|
||||
func (model ModelConfig) GetUserbyTenantId(tenantid string) (user models.TblUser, err error) {
|
||||
|
||||
if err := model.DB.Debug().Table("tbl_users").Where("is_deleted = 0 and tenant_id = ?", tenantid).First(&user).Error; err != nil {
|
||||
|
||||
return models.TblUser{}, err
|
||||
}
|
||||
|
||||
return user, nil
|
||||
}
|
||||
|
||||
Executable → Regular
+76
@@ -2,6 +2,11 @@ package model
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/golang-jwt/jwt"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
)
|
||||
|
||||
type MembersListReq struct {
|
||||
@@ -12,6 +17,22 @@ type MembersListReq struct {
|
||||
Count bool
|
||||
}
|
||||
|
||||
type TblMemberGroup struct {
|
||||
Id int
|
||||
Name string
|
||||
Slug string
|
||||
Description string
|
||||
IsActive int
|
||||
IsDeleted int
|
||||
CreatedOn time.Time
|
||||
CreatedBy int
|
||||
ModifiedOn time.Time `gorm:"default:null"`
|
||||
ModifiedBy int `gorm:"default:null"`
|
||||
DeletedOn time.Time `gorm:"default:null"`
|
||||
DeletedBy int `gorm:"default:null"`
|
||||
TenantId string
|
||||
}
|
||||
|
||||
func (model ModelConfig) MembersList(inputs MembersListReq) (members []Members, count int64, err error) {
|
||||
|
||||
fmt.Println(model.DB, inputs.Count, inputs.Limit, "dbvalue")
|
||||
@@ -58,3 +79,58 @@ func (model ModelConfig) MembersList(inputs MembersListReq) (members []Members,
|
||||
fmt.Println(members, "mmembersss")
|
||||
return members, count, nil
|
||||
}
|
||||
func (model ModelConfig) CheckMemberLogin(Email string, Password string, userid int, tenantid string) (string, bool, bool, error) {
|
||||
|
||||
var members Members
|
||||
|
||||
err := model.DB.Table("tbl_members").Where("tbl_members.is_deleted = 0 AND tbl_members.email = ? AND tbl_members.created_by = ? AND tbl_members.tenant_id = ?", Email, userid, tenantid).First(&members).Error
|
||||
|
||||
if err != nil {
|
||||
return "", false, false, err
|
||||
}
|
||||
|
||||
if members.Email == "" {
|
||||
return "", false, false, err
|
||||
}
|
||||
|
||||
passerr := bcrypt.CompareHashAndPassword([]byte(members.Password), []byte(Password))
|
||||
|
||||
if passerr != nil || passerr == bcrypt.ErrMismatchedHashAndPassword {
|
||||
|
||||
return "", false, true, passerr
|
||||
}
|
||||
|
||||
token, err := model.CreateToken(members)
|
||||
|
||||
if err != nil {
|
||||
|
||||
return "", false, true, err
|
||||
}
|
||||
|
||||
return token, true, true, nil
|
||||
|
||||
}
|
||||
|
||||
func (model ModelConfig) CreateToken(members Members) (string, error) {
|
||||
|
||||
atClaims := jwt.MapClaims{}
|
||||
atClaims["member_id"] = members.ID
|
||||
atClaims["user_id"] = members.CreatedBy
|
||||
atClaims["tenant_id"] = members.TenantID
|
||||
|
||||
token := jwt.NewWithClaims(jwt.SigningMethodHS256, atClaims)
|
||||
|
||||
return token.SignedString([]byte(os.Getenv("JWT_SECRET")))
|
||||
}
|
||||
|
||||
func (model ModelConfig) GetmemberGroup(slug string, tenantid string) (membergrb TblMemberGroup,err error) {
|
||||
|
||||
err1 := model.DB.Table("tbl_member_groups").Where("tbl_member_groups.is_deleted = 0 and slug=? and tbl_member_groups.tenant_id = ?",slug, tenantid).First(&membergrb).Error
|
||||
|
||||
if err1 != nil {
|
||||
return TblMemberGroup{},nil
|
||||
}
|
||||
return TblMemberGroup{}, nil
|
||||
}
|
||||
|
||||
|
||||
|
||||
Executable → Regular
+167
-19
@@ -26,7 +26,10 @@ type Author struct {
|
||||
CreatedBy int `json:"createdBy"`
|
||||
ModifiedOn *time.Time `json:"modifiedOn,omitempty"`
|
||||
ModifiedBy *int `json:"modifiedBy,omitempty"`
|
||||
TenantID string `json:"tenantId"`
|
||||
TenantID string `json:"tenantId"`
|
||||
RoleID *int `json:"roleId,omitempty"`
|
||||
RoleName *string `json:"roleName,omitempty"`
|
||||
NameString *string `json:"NameString,omitempty"`
|
||||
}
|
||||
|
||||
type Category struct {
|
||||
@@ -40,7 +43,7 @@ type Category struct {
|
||||
ModifiedOn *time.Time `json:"modifiedOn,omitempty"`
|
||||
ModifiedBy *int `json:"modifiedBy,omitempty"`
|
||||
ParentID int `json:"parentId"`
|
||||
TenantID string `json:"tenantId"`
|
||||
TenantID string `json:"tenantId"`
|
||||
}
|
||||
|
||||
type CategoryDetails struct {
|
||||
@@ -71,7 +74,7 @@ type Channel struct {
|
||||
IsDeleted int `json:"isDeleted"`
|
||||
ModifiedOn *time.Time `json:"modifiedOn,omitempty"`
|
||||
ModifiedBy *int `json:"modifiedBy,omitempty"`
|
||||
TenantID string `json:"tenantId"`
|
||||
TenantID string `json:"tenantId"`
|
||||
}
|
||||
|
||||
type ChannelDetails struct {
|
||||
@@ -113,8 +116,12 @@ type ChannelEntries struct {
|
||||
AdditionalFields *AdditionalFields `json:"additionalFields,omitempty"`
|
||||
AuthorDetails *Author `json:"authorDetails,omitempty"`
|
||||
MemberProfile *MemberProfile `json:"memberProfile,omitempty"`
|
||||
TenantID string `json:"tenantId"`
|
||||
TenantID string `json:"tenantId"`
|
||||
ContentChunk *Chunk `json:"contentChunk,omitempty"`
|
||||
CtaLink *string `json:"ctaLink,omitempty"`
|
||||
SavedFlag *bool `json:"savedFlag,omitempty"`
|
||||
PreviewLink *string `json:"PreviewLink,omitempty"`
|
||||
UUID *string `json:"Uuid,omitempty"`
|
||||
}
|
||||
|
||||
type ChannelEntryDetails struct {
|
||||
@@ -132,11 +139,33 @@ type CountUpdate struct {
|
||||
Status bool `json:"status"`
|
||||
}
|
||||
|
||||
type Course struct {
|
||||
ID int `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
ImageName string `json:"imageName"`
|
||||
ImagePath string `json:"imagePath"`
|
||||
Category int `json:"category"`
|
||||
TenantID string `json:"tenantId"`
|
||||
}
|
||||
|
||||
type CourseDetails struct {
|
||||
Lesson []Lesson `json:"lesson"`
|
||||
Section []Sections `json:"section"`
|
||||
}
|
||||
|
||||
type CourseLists struct {
|
||||
Courselist []Course `json:"courselist"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type EntriesAdditionalData struct {
|
||||
AuthorDetails graphql.Omittable[*bool] `json:"authorDetails,omitempty"`
|
||||
MemberProfile graphql.Omittable[*bool] `json:"memberProfile,omitempty"`
|
||||
AdditionalFields graphql.Omittable[*bool] `json:"additionalFields,omitempty"`
|
||||
Categories graphql.Omittable[*bool] `json:"categories,omitempty"`
|
||||
SavedList graphql.Omittable[*bool] `json:"savedList,omitempty"`
|
||||
MemberID graphql.Omittable[*int] `json:"MemberId,omitempty"`
|
||||
}
|
||||
|
||||
type EntriesFilter struct {
|
||||
@@ -145,6 +174,14 @@ type EntriesFilter struct {
|
||||
CategorySlug graphql.Omittable[*string] `json:"categorySlug,omitempty"`
|
||||
GetChildCategories graphql.Omittable[*bool] `json:"getChildCategories,omitempty"`
|
||||
Status graphql.Omittable[*string] `json:"Status,omitempty"`
|
||||
ChannelName graphql.Omittable[*string] `json:"ChannelName,omitempty"`
|
||||
}
|
||||
|
||||
type EntrySave struct {
|
||||
EntryID int `json:"entryId"`
|
||||
UserID int `json:"userId"`
|
||||
TenantID string `json:"tenantId"`
|
||||
Save bool `json:"save"`
|
||||
}
|
||||
|
||||
type Field struct {
|
||||
@@ -167,7 +204,7 @@ type Field struct {
|
||||
FieldTypeName string `json:"fieldTypeName"`
|
||||
FieldValue *FieldValue `json:"fieldValue,omitempty"`
|
||||
FieldOptions []FieldOptions `json:"fieldOptions,omitempty"`
|
||||
TenantID string `json:"tenantId"`
|
||||
TenantID string `json:"tenantId"`
|
||||
}
|
||||
|
||||
type FieldOptions struct {
|
||||
@@ -178,7 +215,7 @@ type FieldOptions struct {
|
||||
CreatedBy int `json:"createdBy"`
|
||||
ModifiedOn *time.Time `json:"modifiedOn,omitempty"`
|
||||
ModifiedBy *int `json:"modifiedBY,omitempty"`
|
||||
TenantID string `json:"tenantId"`
|
||||
TenantID string `json:"tenantId"`
|
||||
}
|
||||
|
||||
type FieldValue struct {
|
||||
@@ -188,32 +225,80 @@ type FieldValue struct {
|
||||
CreatedBy int `json:"createdBy"`
|
||||
ModifiedOn *time.Time `json:"modifiedOn,omitempty"`
|
||||
ModifiedBy *int `json:"modifiedBY,omitempty"`
|
||||
TenantId string `json:"tenantId"`
|
||||
TenantID string `json:"tenantId"`
|
||||
}
|
||||
|
||||
type Filter struct {
|
||||
Limit graphql.Omittable[*int] `json:"limit,omitempty"`
|
||||
Offset graphql.Omittable[*int] `json:"offset,omitempty"`
|
||||
IsActive graphql.Omittable[*bool] `json:"isActive,omitempty"`
|
||||
Keyword graphql.Omittable[*string] `json:"keyword,omitempty"`
|
||||
Limit graphql.Omittable[*int] `json:"limit,omitempty"`
|
||||
Offset graphql.Omittable[*int] `json:"offset,omitempty"`
|
||||
IsActive graphql.Omittable[*bool] `json:"isActive,omitempty"`
|
||||
Keyword graphql.Omittable[*string] `json:"keyword,omitempty"`
|
||||
Location graphql.Omittable[*string] `json:"location,omitempty"`
|
||||
Experience graphql.Omittable[*string] `json:"Experience,omitempty"`
|
||||
Posteddate graphql.Omittable[*string] `json:"posteddate,omitempty"`
|
||||
}
|
||||
|
||||
type ForgotPasswordResponse struct {
|
||||
Message string `json:"message"`
|
||||
Success bool `json:"success"`
|
||||
}
|
||||
|
||||
type GeneralInfo struct {
|
||||
CompanyName string `json:"companyName"`
|
||||
LogoPath string `json:"logoPath"`
|
||||
ExpandLogoPath string `json:"expandLogoPath"`
|
||||
TenantID string `json:"tenantId"`
|
||||
}
|
||||
|
||||
type Lesson struct {
|
||||
ID int `json:"id"`
|
||||
CourseID int `json:"courseId"`
|
||||
SectionID int `json:"sectionId"`
|
||||
Title string `json:"title"`
|
||||
Content string `json:"content"`
|
||||
EmbedLink string `json:"embedLink"`
|
||||
FileName string `json:"fileName"`
|
||||
FilePath string `json:"filePath"`
|
||||
LessonType string `json:"lessonType"`
|
||||
OrderIndex int `json:"orderIndex"`
|
||||
TenantID string `json:"tenantId"`
|
||||
}
|
||||
|
||||
type MemberArguments struct {
|
||||
Module graphql.Omittable[*int] `json:"module,omitempty"`
|
||||
TenantID graphql.Omittable[*int] `json:"tenantId,omitempty"`
|
||||
Module graphql.Omittable[*int] `json:"module,omitempty"`
|
||||
TenantID graphql.Omittable[*string] `json:"tenantId,omitempty"`
|
||||
}
|
||||
|
||||
type MemberCheckLoginResponse struct {
|
||||
Email bool `json:"email"`
|
||||
Password bool `json:"password"`
|
||||
Message string `json:"message"`
|
||||
Token string `json:"token"`
|
||||
Success bool `json:"success"`
|
||||
MemberDetails *Members `json:"memberDetails,omitempty"`
|
||||
}
|
||||
|
||||
type MemberDetails struct {
|
||||
ID graphql.Omittable[*int] `json:"id,omitempty"`
|
||||
FirstName string `json:"firstName"`
|
||||
LastName graphql.Omittable[*string] `json:"lastName,omitempty"`
|
||||
Mobile graphql.Omittable[*string] `json:"mobile,omitempty"`
|
||||
Email string `json:"email"`
|
||||
Password graphql.Omittable[*string] `json:"password,omitempty"`
|
||||
Password string `json:"password"`
|
||||
IsActive graphql.Omittable[*int] `json:"isActive,omitempty"`
|
||||
ProfileImage graphql.Omittable[*string] `json:"profileImage,omitempty"`
|
||||
ProfileImagePath graphql.Omittable[*string] `json:"profileImagePath,omitempty"`
|
||||
Username graphql.Omittable[*string] `json:"username,omitempty"`
|
||||
GroupID graphql.Omittable[*int] `json:"groupId,omitempty"`
|
||||
UserID int `json:"userId"`
|
||||
TenantID string `json:"tenantId"`
|
||||
Message graphql.Omittable[*string] `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
type MemberInfo struct {
|
||||
Email string `json:"email"`
|
||||
TenantID string `json:"tenantId"`
|
||||
URL string `json:"url"`
|
||||
}
|
||||
|
||||
type MemberProfile struct {
|
||||
@@ -239,10 +324,16 @@ type MemberProfile struct {
|
||||
ModifiedBy *int `json:"modifiedBy,omitempty"`
|
||||
ClaimStatus *int `json:"claimStatus,omitempty"`
|
||||
IsActive *int `json:"IsActive,omitempty"`
|
||||
TenantID string `json:"tenantId"`
|
||||
TenantID string `json:"tenantId"`
|
||||
ClaimDate *time.Time `json:"claimDate,omitempty"`
|
||||
}
|
||||
|
||||
type MemberResetpassInfo struct {
|
||||
NewPassword string `json:"newPassword"`
|
||||
ConfrimPassword string `json:"confrimPassword"`
|
||||
Token string `json:"token"`
|
||||
}
|
||||
|
||||
type MemberSettings struct {
|
||||
ID int `json:"id"`
|
||||
AllowRegistration int `json:"allowRegistration"`
|
||||
@@ -250,7 +341,14 @@ type MemberSettings struct {
|
||||
ModifiedBy *int `json:"modifiedBy,omitempty"`
|
||||
ModifiedOn *time.Time `json:"modifiedOn,omitempty"`
|
||||
NotificationUsers string `json:"notificationUsers"`
|
||||
TenantID string `json:"tenantId"`
|
||||
TenantID string `json:"tenantId"`
|
||||
}
|
||||
|
||||
type MemberSignin struct {
|
||||
Email string `json:"email"`
|
||||
Password string `json:"password"`
|
||||
UserID int `json:"userId"`
|
||||
TenantID string `json:"tenantId"`
|
||||
}
|
||||
|
||||
type Members struct {
|
||||
@@ -259,7 +357,7 @@ type Members struct {
|
||||
LastName *string `json:"lastName,omitempty"`
|
||||
Mobile *string `json:"mobile,omitempty"`
|
||||
Email string `json:"email"`
|
||||
Password *string `json:"password,omitempty"`
|
||||
Password string `json:"password"`
|
||||
IsActive *int `json:"isActive,omitempty"`
|
||||
ProfileImage *string `json:"profileImage,omitempty"`
|
||||
ProfileImagePath *string `json:"profileImagePath,omitempty"`
|
||||
@@ -269,8 +367,10 @@ type Members struct {
|
||||
CreatedOn *time.Time `json:"createdOn,omitempty"`
|
||||
ModifiedOn *time.Time `json:"modifiedOn,omitempty"`
|
||||
ModifiedBy *int `json:"modifiedBy,omitempty"`
|
||||
TenantID string `json:"tenantId"`
|
||||
TenantID string `json:"tenantId"`
|
||||
IsDeleted int `json:"isDeleted"`
|
||||
StorageType *string `json:"storageType,omitempty"`
|
||||
NameString *string `json:"NameString,omitempty"`
|
||||
}
|
||||
|
||||
type MembersDetails struct {
|
||||
@@ -293,10 +393,58 @@ type Section struct {
|
||||
ModifiedOn *time.Time `json:"modifiedOn,omitempty"`
|
||||
ModifiedBy *int `json:"modifiedBY,omitempty"`
|
||||
OrderIndex int `json:"orderIndex"`
|
||||
TenantID string `json:"tenantId"`
|
||||
TenantID string `json:"tenantId"`
|
||||
}
|
||||
|
||||
type Sections struct {
|
||||
ID int `json:"id"`
|
||||
CourseID int `json:"courseId"`
|
||||
Title string `json:"title"`
|
||||
Content string `json:"content"`
|
||||
OrderIndex int `json:"orderIndex"`
|
||||
TenantID string `json:"tenantId"`
|
||||
}
|
||||
|
||||
type SocialLoginInput struct {
|
||||
FirstName string `json:"firstName"`
|
||||
LastName graphql.Omittable[*string] `json:"lastName,omitempty"`
|
||||
Email string `json:"email"`
|
||||
Password graphql.Omittable[*string] `json:"password,omitempty"`
|
||||
Username graphql.Omittable[*string] `json:"username,omitempty"`
|
||||
}
|
||||
|
||||
type SocialLoginResponse struct {
|
||||
Message string `json:"message"`
|
||||
Token string `json:"token"`
|
||||
Userid int `json:"userid"`
|
||||
}
|
||||
|
||||
type Sort struct {
|
||||
SortBy graphql.Omittable[*string] `json:"sortBy,omitempty"`
|
||||
Order graphql.Omittable[*int] `json:"order,omitempty"`
|
||||
}
|
||||
|
||||
type UpdateMember struct {
|
||||
ID int `json:"Id"`
|
||||
FirstName string `json:"firstName"`
|
||||
LastName graphql.Omittable[*string] `json:"lastName,omitempty"`
|
||||
Mobile string `json:"mobile"`
|
||||
Email string `json:"email"`
|
||||
Password graphql.Omittable[*string] `json:"password,omitempty"`
|
||||
IsActive graphql.Omittable[*int] `json:"isActive,omitempty"`
|
||||
ProfileImage graphql.Omittable[*string] `json:"profileImage,omitempty"`
|
||||
ProfileImagePath graphql.Omittable[*string] `json:"profileImagePath,omitempty"`
|
||||
Username graphql.Omittable[*string] `json:"username,omitempty"`
|
||||
GroupID graphql.Omittable[*int] `json:"groupId,omitempty"`
|
||||
CreatedBy graphql.Omittable[*int] `json:"createdBy,omitempty"`
|
||||
CreatedOn graphql.Omittable[*time.Time] `json:"createdOn,omitempty"`
|
||||
ModifiedOn graphql.Omittable[*time.Time] `json:"modifiedOn,omitempty"`
|
||||
ModifiedBy graphql.Omittable[*int] `json:"modifiedBy,omitempty"`
|
||||
TenantID graphql.Omittable[*string] `json:"tenantId,omitempty"`
|
||||
RemoveImage graphql.Omittable[*bool] `json:"removeImage,omitempty"`
|
||||
}
|
||||
|
||||
type UpdatememberResponse struct {
|
||||
MemberDetails *Members `json:"memberDetails"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
Executable → Regular
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
Executable → Regular
+1
-1
@@ -105,7 +105,7 @@
|
||||
<div class="doc-examples">
|
||||
<div class="example-section welcome-api-endpoints-section example-section-is-code">
|
||||
<h5>API Endpoints</h5>
|
||||
<pre><code>http://dev.spurtcms.com:8084/query</code></pre>
|
||||
<pre><code>http://spurtcms.com:8084/query</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Executable → Regular
+6
-1
@@ -2,7 +2,7 @@ package resolvers
|
||||
|
||||
// This file will be automatically regenerated based on the schema, any resolver implementations
|
||||
// will be copied through when generating and any unknown code will be moved to the end.
|
||||
// Code generated by github.com/99designs/gqlgen version v0.17.49
|
||||
// Code generated by github.com/99designs/gqlgen version v0.17.66
|
||||
|
||||
import (
|
||||
"context"
|
||||
@@ -16,6 +16,11 @@ func (r *queryResolver) CategoryList(ctx context.Context, categoryFilter *model.
|
||||
return controller.CategoryList(ctx, categoryFilter, commonFilter)
|
||||
}
|
||||
|
||||
// GeneralInformation is the resolver for the GeneralInformation field.
|
||||
func (r *queryResolver) GeneralInformation(ctx context.Context, tenantID *string) (*model.GeneralInfo, error) {
|
||||
return controller.GeneralInfo(ctx, tenantID)
|
||||
}
|
||||
|
||||
// Query returns graph.QueryResolver implementation.
|
||||
func (r *Resolver) Query() graph.QueryResolver { return &queryResolver{r} }
|
||||
|
||||
|
||||
Executable → Regular
+13
-3
@@ -2,7 +2,7 @@ package resolvers
|
||||
|
||||
// This file will be automatically regenerated based on the schema, any resolver implementations
|
||||
// will be copied through when generating and any unknown code will be moved to the end.
|
||||
// Code generated by github.com/99designs/gqlgen version v0.17.49
|
||||
// Code generated by github.com/99designs/gqlgen version v0.17.66
|
||||
|
||||
import (
|
||||
"context"
|
||||
@@ -16,6 +16,11 @@ func (r *mutationResolver) UpdateEntryViewCount(ctx context.Context, id *int, sl
|
||||
return controller.UpdateEntryViewCount(ctx, id, slug)
|
||||
}
|
||||
|
||||
// EntrySaveUpdate is the resolver for the EntrySaveUpdate field.
|
||||
func (r *mutationResolver) EntrySaveUpdate(ctx context.Context, input model.EntrySave) (string, error) {
|
||||
return controller.EntrySaveUpdate(ctx, &input)
|
||||
}
|
||||
|
||||
// ChannelList is the resolver for the ChannelList field.
|
||||
func (r *queryResolver) ChannelList(ctx context.Context, filter *model.Filter, sort *model.Sort) (*model.ChannelDetails, error) {
|
||||
return controller.ChannelList(ctx, filter, sort)
|
||||
@@ -32,8 +37,13 @@ func (r *queryResolver) ChannelEntriesList(ctx context.Context, commonFilter *mo
|
||||
}
|
||||
|
||||
// ChannelEntryDetail is the resolver for the ChannelEntryDetail field.
|
||||
func (r *queryResolver) ChannelEntryDetail(ctx context.Context, id *int, slug *string, additionalData *model.EntriesAdditionalData, channelID *int) (*model.ChannelEntries, error) {
|
||||
return controller.ChannelEntryDetail(ctx, id, slug, additionalData, channelID)
|
||||
func (r *queryResolver) ChannelEntryDetail(ctx context.Context, id *int, slug *string, additionalData *model.EntriesAdditionalData, channelID *int, memberID *int) (*model.ChannelEntries, error) {
|
||||
return controller.ChannelEntryDetail(ctx, id, slug, additionalData, channelID, memberID)
|
||||
}
|
||||
|
||||
// TopAuthorsList is the resolver for the TopAuthorsList field.
|
||||
func (r *queryResolver) TopAuthorsList(ctx context.Context, id *string) ([]*model.Author, error) {
|
||||
return controller.TopAuthorsList(ctx, id)
|
||||
}
|
||||
|
||||
// Mutation returns graph.MutationResolver implementation.
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package resolvers
|
||||
|
||||
// This file will be automatically regenerated based on the schema, any resolver implementations
|
||||
// will be copied through when generating and any unknown code will be moved to the end.
|
||||
// Code generated by github.com/99designs/gqlgen version v0.17.66
|
||||
|
||||
import (
|
||||
"context"
|
||||
"spurt-cms/graphql/controller"
|
||||
"spurt-cms/graphql/model"
|
||||
)
|
||||
|
||||
// CourseList is the resolver for the CourseList field.
|
||||
func (r *queryResolver) CourseList(ctx context.Context, tenantID *string, status *int, categoryID *int) (*model.CourseLists, error) {
|
||||
return controller.CourseList(ctx, tenantID, status, categoryID)
|
||||
}
|
||||
|
||||
// CoursedetailList is the resolver for the CoursedetailList field.
|
||||
func (r *queryResolver) CoursedetailList(ctx context.Context, tenantID *string, courseID *int) (*model.CourseDetails, error) {
|
||||
return controller.CourseDetails(ctx, tenantID, courseID)
|
||||
}
|
||||
Executable → Regular
+57
-1
@@ -2,7 +2,7 @@ package resolvers
|
||||
|
||||
// This file will be automatically regenerated based on the schema, any resolver implementations
|
||||
// will be copied through when generating and any unknown code will be moved to the end.
|
||||
// Code generated by github.com/99designs/gqlgen version v0.17.49
|
||||
// Code generated by github.com/99designs/gqlgen version v0.17.66
|
||||
|
||||
import (
|
||||
"context"
|
||||
@@ -15,7 +15,63 @@ func (r *mutationResolver) MemberRegister(ctx context.Context, input model.Membe
|
||||
return controller.MemberRegister(ctx, &input, arguments)
|
||||
}
|
||||
|
||||
// MemberCheckLogin is the resolver for the memberCheckLogin field.
|
||||
func (r *mutationResolver) MemberCheckLogin(ctx context.Context, input model.MemberSignin) (*model.MemberCheckLoginResponse, error) {
|
||||
return controller.MemberLogin(ctx, &input)
|
||||
}
|
||||
|
||||
// ForgotPassword is the resolver for the forgotPassword field.
|
||||
func (r *mutationResolver) ForgotPassword(ctx context.Context, input model.MemberInfo) (*model.ForgotPasswordResponse, error) {
|
||||
return controller.ForgotPassword(ctx, &input)
|
||||
}
|
||||
|
||||
// ResetPassword is the resolver for the resetPassword field.
|
||||
func (r *mutationResolver) ResetPassword(ctx context.Context, input model.MemberResetpassInfo) (bool, error) {
|
||||
return controller.ResetPassword(ctx, &input)
|
||||
}
|
||||
|
||||
// MemberSocialLogin is the resolver for the memberSocialLogin field.
|
||||
func (r *mutationResolver) MemberSocialLogin(ctx context.Context, input model.SocialLoginInput) (*model.SocialLoginResponse, error) {
|
||||
return controller.MemberSocialLogin(ctx, &input)
|
||||
}
|
||||
|
||||
// UpdateMemberProfile is the resolver for the updateMemberProfile field.
|
||||
func (r *mutationResolver) UpdateMemberProfile(ctx context.Context, input model.UpdateMember) (*model.UpdatememberResponse, error) {
|
||||
return controller.UpdateMemberProfile(ctx, &input)
|
||||
}
|
||||
|
||||
// MembersList is the resolver for the MembersList field.
|
||||
func (r *queryResolver) MembersList(ctx context.Context, filter *model.Filter) (*model.MembersDetails, error) {
|
||||
return controller.MembersList(ctx, filter)
|
||||
}
|
||||
|
||||
// MemberProfileDetails is the resolver for the MemberProfileDetails field.
|
||||
func (r *queryResolver) MemberProfileDetails(ctx context.Context, id int) (*model.Members, error) {
|
||||
return controller.MemberProfileDetails(ctx, &id)
|
||||
}
|
||||
|
||||
// !!! WARNING !!!
|
||||
// The code below was going to be deleted when updating resolvers. It has been copied here so you have
|
||||
// one last chance to move it out of harms way if you want. There are two reasons this happens:
|
||||
// - When renaming or deleting a resolver the old code will be put in here. You can safely delete
|
||||
// it when you're done.
|
||||
// - You have helper methods in this file. Move them out to keep these resolver files clean.
|
||||
/*
|
||||
func (r *mutationResolver) MemberCheckoutDetails(ctx context.Context, checkouts model.MemberCheckoutDetails) (string, error) {
|
||||
return controller.CreateCheckoutDetails(ctx, &checkouts)
|
||||
}
|
||||
func (r *queryResolver) MembershipLevelList(ctx context.Context, filter *model.Filter, tenantID *string) (*model.MemershipDetail, error) {
|
||||
return controller.MembershipLevelList(ctx, filter, tenantID)
|
||||
// panic(fmt.Errorf("not implemented: MembershipLevelList - MembershipLevelList"))
|
||||
}
|
||||
func (r *queryResolver) MembershipLevelDetails(ctx context.Context, subscriptionid *int, tenantID *string) (*model.MemershipDetail, error) {
|
||||
return controller.MembershipLevelDetails(ctx, subscriptionid, tenantID)
|
||||
|
||||
// panic(fmt.Errorf("not implemented: MembershipLevelDetails - MembershipLevelDetails"))
|
||||
}
|
||||
func (r *queryResolver) Integration(ctx context.Context, tenantID *string) (*model.ListIntegration, error) {
|
||||
return controller.IntegrationList(ctx, tenantID)
|
||||
|
||||
// panic(fmt.Errorf("not implemented: Integration - Integration"))
|
||||
}
|
||||
*/
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
+12
-2
@@ -9,7 +9,7 @@ type Category{
|
||||
modifiedOn: Time
|
||||
modifiedBy: Int
|
||||
parentId: Int!
|
||||
tenantId: Int!
|
||||
tenantId: String!
|
||||
}
|
||||
|
||||
type CategoryDetails{
|
||||
@@ -17,8 +17,16 @@ type CategoryDetails{
|
||||
count: Int!
|
||||
}
|
||||
|
||||
type GeneralInfo{
|
||||
companyName:String!
|
||||
logoPath:String!
|
||||
expandLogoPath:String!
|
||||
tenantId:String!
|
||||
}
|
||||
|
||||
extend type Query{
|
||||
CategoryList(categoryFilter: CategoryFilter,commonFilter: Filter): CategoryDetails! @auth
|
||||
GeneralInformation(tenantId:String):GeneralInfo! @auth
|
||||
}
|
||||
|
||||
input CategoryFilter{
|
||||
@@ -30,4 +38,6 @@ input CategoryFilter{
|
||||
checkEntriesPresence: Boolean
|
||||
categoryGroupSlug: String
|
||||
channelSlug: String
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Executable → Regular
+29
-8
@@ -16,7 +16,7 @@ type Channel{
|
||||
isDeleted: Int!
|
||||
modifiedOn: Time
|
||||
modifiedBy: Int
|
||||
tenantId: Int!
|
||||
tenantId: String!
|
||||
}
|
||||
|
||||
type ChannelDetails{
|
||||
@@ -63,8 +63,12 @@ type ChannelEntries{
|
||||
additionalFields: AdditionalFields
|
||||
authorDetails: Author
|
||||
memberProfile: MemberProfile
|
||||
tenantId: Int!
|
||||
tenantId: String!
|
||||
contentChunk: Chunk
|
||||
ctaLink: String
|
||||
savedFlag: Boolean
|
||||
PreviewLink: String
|
||||
Uuid: String
|
||||
}
|
||||
|
||||
type Author{
|
||||
@@ -79,7 +83,10 @@ type Author{
|
||||
createdBy: Int!
|
||||
modifiedOn: Time
|
||||
modifiedBy: Int
|
||||
tenantId: Int!
|
||||
tenantId: String!
|
||||
roleId: Int
|
||||
roleName: String
|
||||
NameString: String
|
||||
}
|
||||
|
||||
type AdditionalFields{
|
||||
@@ -96,7 +103,7 @@ type Section{
|
||||
modifiedOn: Time
|
||||
modifiedBY: Int
|
||||
orderIndex: Int!
|
||||
tenantId: Int!
|
||||
tenantId: String!
|
||||
}
|
||||
|
||||
type Field{
|
||||
@@ -119,7 +126,7 @@ type Field{
|
||||
fieldTypeName: String!
|
||||
fieldValue: FieldValue
|
||||
fieldOptions: [FieldOptions!]
|
||||
tenantId: Int!
|
||||
tenantId: String!
|
||||
}
|
||||
|
||||
type FieldValue{
|
||||
@@ -129,7 +136,7 @@ type FieldValue{
|
||||
createdBy: Int!
|
||||
modifiedOn: Time
|
||||
modifiedBY: Int
|
||||
tenantId: Int!
|
||||
tenantId: String!
|
||||
}
|
||||
|
||||
type FieldOptions{
|
||||
@@ -140,7 +147,7 @@ type FieldOptions{
|
||||
createdBy: Int!
|
||||
modifiedOn: Time
|
||||
modifiedBY: Int
|
||||
tenantId: Int!
|
||||
tenantId: String!
|
||||
}
|
||||
|
||||
type CountUpdate{
|
||||
@@ -153,15 +160,23 @@ type Chunk{
|
||||
length: Int!
|
||||
}
|
||||
|
||||
input EntrySave{
|
||||
entryId: Int!
|
||||
userId: Int!
|
||||
tenantId: String!
|
||||
save: Boolean!
|
||||
}
|
||||
extend type Query{
|
||||
ChannelList(filter: Filter,sort: Sort): ChannelDetails! @auth
|
||||
ChannelDetail(channelId: Int,channelSlug: String,isActive: Boolean): Channel @auth
|
||||
ChannelEntriesList(commonFilter: Filter,sort: Sort,entryFilter: EntriesFilter,AdditionalData: EntriesAdditionalData): ChannelEntryDetails! @auth
|
||||
ChannelEntryDetail(id: Int, slug: String,AdditionalData: EntriesAdditionalData,channelId:Int): ChannelEntries! @auth
|
||||
ChannelEntryDetail(id: Int, slug: String,AdditionalData: EntriesAdditionalData,channelId:Int,memberId:Int): ChannelEntries! @auth
|
||||
TopAuthorsList(id:String):[Author] @auth
|
||||
}
|
||||
|
||||
extend type Mutation{
|
||||
UpdateEntryViewCount(id: Int,slug: String): CountUpdate! @auth
|
||||
EntrySaveUpdate(input: EntrySave!):String! @auth
|
||||
}
|
||||
|
||||
input Filter{
|
||||
@@ -169,6 +184,9 @@ input Filter{
|
||||
offset: Int
|
||||
isActive: Boolean
|
||||
keyword: String
|
||||
location: String
|
||||
Experience: String
|
||||
posteddate: String
|
||||
}
|
||||
|
||||
input EntriesFilter{
|
||||
@@ -177,6 +195,7 @@ input EntriesFilter{
|
||||
categorySlug: String
|
||||
getChildCategories: Boolean
|
||||
Status: String
|
||||
ChannelName: String
|
||||
}
|
||||
|
||||
input EntriesAdditionalData{
|
||||
@@ -184,6 +203,8 @@ input EntriesAdditionalData{
|
||||
memberProfile: Boolean
|
||||
additionalFields: Boolean
|
||||
categories: Boolean
|
||||
savedList: Boolean
|
||||
MemberId: Int
|
||||
}
|
||||
|
||||
input Sort{
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
type Course{
|
||||
id: Int!
|
||||
title: String!
|
||||
description: String!
|
||||
imageName: String!
|
||||
imagePath: String!
|
||||
category: Int!
|
||||
tenantId: String!
|
||||
}
|
||||
|
||||
type CourseLists{
|
||||
courselist: [Course!]!
|
||||
count: Int!
|
||||
}
|
||||
|
||||
type Lesson{
|
||||
id: Int!
|
||||
courseId: Int!
|
||||
sectionId: Int!
|
||||
title: String!
|
||||
content: String!
|
||||
embedLink: String!
|
||||
fileName: String!
|
||||
filePath: String!
|
||||
lessonType: String!
|
||||
orderIndex: Int!
|
||||
tenantId: String!
|
||||
}
|
||||
|
||||
type Sections{
|
||||
id: Int!
|
||||
courseId: Int!
|
||||
title: String!
|
||||
content: String!
|
||||
orderIndex: Int!
|
||||
tenantId: String!
|
||||
}
|
||||
|
||||
type CourseDetails{
|
||||
lesson: [Lesson!]!
|
||||
section: [Sections!]!
|
||||
}
|
||||
|
||||
|
||||
|
||||
extend type Query{
|
||||
CourseList(tenantId:String,status:Int,categoryId:Int): CourseLists! @auth
|
||||
CoursedetailList(tenantId:String,courseId:Int): CourseDetails! @auth
|
||||
}
|
||||
Executable → Regular
+112
-16
@@ -23,7 +23,7 @@ type MemberProfile{
|
||||
modifiedBy: Int
|
||||
claimStatus: Int
|
||||
IsActive: Int
|
||||
tenantId: Int!
|
||||
tenantId: String!
|
||||
claimDate: Time
|
||||
}
|
||||
|
||||
@@ -34,36 +34,122 @@ type MemberSettings {
|
||||
modifiedBy: Int
|
||||
modifiedOn: Time
|
||||
notificationUsers: String!
|
||||
tenantId: Int!
|
||||
tenantId: String!
|
||||
}
|
||||
|
||||
input MemberInfo{
|
||||
email: String!
|
||||
tenantId: String!
|
||||
url: String!
|
||||
}
|
||||
|
||||
input MemberResetpassInfo{
|
||||
newPassword: String!
|
||||
confrimPassword: String!
|
||||
token: String!
|
||||
|
||||
}
|
||||
input MemberSignin{
|
||||
email: String!
|
||||
password: String!
|
||||
userId: Int!
|
||||
tenantId: String!
|
||||
}
|
||||
type MemberCheckLoginResponse {
|
||||
email:Boolean!
|
||||
password:Boolean!
|
||||
message: String!
|
||||
token:String!
|
||||
success: Boolean!
|
||||
memberDetails: Members
|
||||
}
|
||||
|
||||
type ForgotPasswordResponse{
|
||||
message: String!
|
||||
success:Boolean!
|
||||
}
|
||||
|
||||
|
||||
|
||||
extend type Mutation{
|
||||
memberRegister(input: MemberDetails!,arguments: MemberArguments):Boolean!
|
||||
memberRegister(input: MemberDetails!,arguments: MemberArguments):Boolean! @auth
|
||||
memberCheckLogin(input:MemberSignin!): MemberCheckLoginResponse! @auth
|
||||
forgotPassword(input: MemberInfo!):ForgotPasswordResponse!@auth
|
||||
resetPassword(input: MemberResetpassInfo!):Boolean! @auth
|
||||
memberSocialLogin(input: SocialLoginInput!): SocialLoginResponse! @auth
|
||||
updateMemberProfile(input:UpdateMember!): UpdatememberResponse! @auth
|
||||
|
||||
}
|
||||
|
||||
type UpdatememberResponse{
|
||||
memberDetails: Members!
|
||||
message: String!
|
||||
}
|
||||
input SocialLoginInput{
|
||||
|
||||
firstName: String!
|
||||
lastName: String
|
||||
email: String!
|
||||
password: String
|
||||
username: String
|
||||
|
||||
|
||||
}
|
||||
|
||||
type SocialLoginResponse{
|
||||
message: String!
|
||||
token:String!
|
||||
userid:Int!
|
||||
|
||||
}
|
||||
input MemberDetails{
|
||||
id: Int
|
||||
firstName: String!
|
||||
lastName: String
|
||||
mobile: String
|
||||
email: String!
|
||||
password: String
|
||||
password: String!
|
||||
isActive: Int
|
||||
profileImage: String
|
||||
profileImagePath: String
|
||||
username: String
|
||||
groupId: Int
|
||||
userId: Int!
|
||||
tenantId: String!
|
||||
message: String
|
||||
}
|
||||
input MemberArguments{
|
||||
module: Int
|
||||
tenantId: String
|
||||
}
|
||||
|
||||
type Members{
|
||||
Id: Int
|
||||
firstName: String!
|
||||
lastName: String
|
||||
mobile: String
|
||||
email: String!
|
||||
password: String!
|
||||
isActive: Int
|
||||
profileImage: String
|
||||
profileImagePath: String
|
||||
username: String
|
||||
groupId: Int
|
||||
createdBy: Int
|
||||
createdOn: Time
|
||||
modifiedOn: Time
|
||||
modifiedBy: Int
|
||||
tenantId: String!
|
||||
isDeleted: Int!
|
||||
storageType: String
|
||||
NameString: String
|
||||
|
||||
}
|
||||
|
||||
input MemberArguments{
|
||||
module: Int
|
||||
tenantId: Int
|
||||
}
|
||||
|
||||
type Members{
|
||||
Id: Int
|
||||
input UpdateMember{
|
||||
Id: Int!
|
||||
firstName: String!
|
||||
lastName: String
|
||||
mobile: String
|
||||
mobile: String!
|
||||
email: String!
|
||||
password: String
|
||||
isActive: Int
|
||||
@@ -75,16 +161,26 @@ type Members{
|
||||
createdOn: Time
|
||||
modifiedOn: Time
|
||||
modifiedBy: Int
|
||||
tenantId: Int!
|
||||
isDeleted: Int!
|
||||
tenantId: String
|
||||
removeImage: Boolean
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
type MembersDetails{
|
||||
membersList: [Members!]!
|
||||
count: Int!
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
extend type Query{
|
||||
MembersList(filter: Filter): MembersDetails! @auth
|
||||
|
||||
|
||||
MemberProfileDetails(id:Int!):Members! @auth
|
||||
}
|
||||
Executable → Regular
Executable → Regular
+1
-1
@@ -6,7 +6,7 @@ info:
|
||||
description: "This is the API documentation for spurtcms Admin"
|
||||
|
||||
servers:
|
||||
- url: http://dev.spurtcms.com:8084/query
|
||||
- url: http://devspurtcms.com:8084/query
|
||||
description: Development Server
|
||||
|
||||
spectaql:
|
||||
|
||||
Executable → Regular
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
+579
@@ -155,6 +155,9 @@ type Translation struct {
|
||||
Getsupport string `json:"getsupport"`
|
||||
Explore string `json:"explore"`
|
||||
Aiwritingheading string `json:"aiwritingheading"`
|
||||
Selling string `json:"selling"`
|
||||
Courses string `json:"courses"`
|
||||
Listing string `json:"listing"`
|
||||
|
||||
Permission struct {
|
||||
Searchroles string `json:"searchroles"`
|
||||
@@ -262,6 +265,7 @@ type Translation struct {
|
||||
Rolelable string `json:"rolelable"`
|
||||
Emaillable string `json:"emaillable"`
|
||||
Mobilelable string `json:"mobilelable"`
|
||||
Aimodule string `json:"aimodule"`
|
||||
} `json:"Setting"`
|
||||
|
||||
Emailtemplate struct {
|
||||
@@ -1401,6 +1405,581 @@ type Translation struct {
|
||||
ValidateWebhookName string `json:"validateWebhookName"`
|
||||
} `json:"validationErrors"`
|
||||
} `json:"webhooks"`
|
||||
|
||||
Memberships struct {
|
||||
Membershiphead string `json:"membershiphead"`
|
||||
Membershipheaddesc string `json:"membershipheaddesc"`
|
||||
Membershipmember string `json:"membershipmember"`
|
||||
Membershipgroup string `json:"membershipgroup"`
|
||||
Membershiplevel string `json:"membershiplevel"`
|
||||
Membershipsubscription string `json:"membershipsubscription"`
|
||||
Membershiporders string `json:"membershiporders"`
|
||||
|
||||
Recordsavailable string `json:"recordsavailable"`
|
||||
Recordavailable string `json:"recordavailable"`
|
||||
|
||||
Member struct {
|
||||
Recordsavailable string `json:"recordsavailable"`
|
||||
Recordavailable string `json:"recordavailable"`
|
||||
CreateMember string `json:"createmember"`
|
||||
UpdateMember string `json:"updatemember"`
|
||||
|
||||
Selectfilters string `json:"selectfilters"`
|
||||
|
||||
Createdon string `json:"createdon"`
|
||||
Clear string `json:"clear"`
|
||||
Applyfilter string `json:"applyfilter"`
|
||||
|
||||
Searchplacehoder string `json:"searchplacehoder"`
|
||||
|
||||
Id string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Email string `json:"email"`
|
||||
Level string `json:"level"`
|
||||
Subscription string `json:"subscription"`
|
||||
Startdate string `json:"startdate"`
|
||||
Enddate string `json:"enddate"`
|
||||
Status string `json:"status"`
|
||||
Action string `json:"action"`
|
||||
|
||||
Edit string `json:"edit"`
|
||||
Delete string `json:"delete"`
|
||||
|
||||
Memberemptytitle string `json:"memberemptytitle"`
|
||||
Memberemptydesc string `json:"memberemptydesc"`
|
||||
|
||||
// create
|
||||
|
||||
Cancel string `json:"cancel"`
|
||||
Save string `json:"save"`
|
||||
Active string `json:"active"`
|
||||
Firstname string `json:"firstname"`
|
||||
Firstnameinfo string `json:"firstnameinfo"`
|
||||
Firstnameplacceholder string `json:"firstnameplacceholder"`
|
||||
Lastname string `json:"lastname"`
|
||||
Lastnameinfo string `json:"lastnameinfo"`
|
||||
|
||||
Lastnameplacceholder string `json:"lastnameplacceholder"`
|
||||
Emailinfo string `json:"emailinfo"`
|
||||
Emailplacceholder string `json:"emailplacceholder"`
|
||||
Mobile string `json:"mobile"`
|
||||
Mobileinfo string `json:"mobileinfo"`
|
||||
|
||||
Mobileplacehoder string `json:"mobileplacehoder"`
|
||||
Username string `json:"username"`
|
||||
Usernameinfo string `json:"usernameinfo"`
|
||||
|
||||
Usernameplacehoder string `json:"usernameplacehoder"`
|
||||
Password string `json:"password"`
|
||||
Passwordinfo string `json:"passwordinfo"`
|
||||
|
||||
Passwordplacehoder string `json:"passwordplacehoder"`
|
||||
} `json:"member"`
|
||||
|
||||
MembershipGroups struct {
|
||||
Recordsavailable string `json:"recordsavailable"`
|
||||
Recordavailable string `json:"recordavailable"`
|
||||
CreateMembersiphgroup string `json:"createMembersiphgroup"`
|
||||
UpdateMembersiphgroup string `json:"updateMembersiphgroup"`
|
||||
Selectfilters string `json:"selectfilters"`
|
||||
Lastupdatedon string `json:"lastupdatedon"`
|
||||
Clear string `json:"clear"`
|
||||
Applyfilter string `json:"applyfilter"`
|
||||
Status string `json:"status"`
|
||||
Active string `json:"active"`
|
||||
Inactive string `json:"inactive"`
|
||||
Searchplacehoder string `json:"searchplacehoder"`
|
||||
|
||||
Group string `json:"group"`
|
||||
Description string `json:"description"`
|
||||
Action string `json:"action"`
|
||||
|
||||
Membershipgroupemptytitle string `json:"membershipgroupemptytitle"`
|
||||
Membershipgroupemptydesc string `json:"membershipgroupemptydesc"`
|
||||
|
||||
Cancel string `json:"cancel"`
|
||||
Save string `json:"save"`
|
||||
Groupname string `json:"groupname"`
|
||||
Groupnameinfo string `json:"groupnameinfo"`
|
||||
Groupnameplacehoder string `json:"groupnameplacehoder"`
|
||||
Groupnamedesc string `json:"groupnamedesc"`
|
||||
Groupnamedescinfo string `json:"groupnamedescinfo"`
|
||||
Groupnamedescplacehoder string `json:"groupnamedescplacehoder"`
|
||||
} `json:"membershipgroups"`
|
||||
|
||||
MemberShipLevels struct {
|
||||
Create string `json:"create"`
|
||||
Membershipavailable string `json:"membershipavailable"`
|
||||
Membershipavailables string `json:"membershipavailables"`
|
||||
Id string `json:"id"`
|
||||
Level string `json:"level"`
|
||||
Fee string `json:"fee"`
|
||||
Status string `json:"status"`
|
||||
Action string `json:"action"`
|
||||
Edit string `json:"edit"`
|
||||
Delete string `json:"delete"`
|
||||
Cancel string `json:"cancel"`
|
||||
Save string `json:"save"`
|
||||
|
||||
Basicinfo string `json:"basicinfo"`
|
||||
Basicinfodesc string `json:"basicinfodesc"`
|
||||
|
||||
Name string `json:"name"`
|
||||
Nameinfo string `json:"nameinfo"`
|
||||
Selectmembership string `json:"selectmembership"`
|
||||
Selectmembershipinfo string `json:"selectmembershipinfo"`
|
||||
Selectmembershipplaceholde string `json:"selectmembershipplaceholde"`
|
||||
|
||||
Selectmembershiplevelgroup string `json:"selectmembershiplevelgroup"`
|
||||
Selectmembershiplevelgroupinfo string `json:"selectmembershiplevelgroupinfo"`
|
||||
Selectmembershiplevelgroupplaceholder string `json:"Selectmembershiplevelgroupplaceholder"`
|
||||
|
||||
Message string `json:"message"`
|
||||
Messageinfo string `json:"messageinfo"`
|
||||
Billingdetails string `json:"billingdetails"`
|
||||
Billingdetailsdesc string `json:"billingdetailsdesc"`
|
||||
|
||||
Initialpayment string `json:"initialpayment"`
|
||||
Initialpaymentinfo string `json:"initialpaymentinfo"`
|
||||
Initialpaymentdesc string `json:"initialpaymentdesc"`
|
||||
|
||||
Recurringsubscription string `json:"recurringsubscription"`
|
||||
Recurringsubscriptioninfo string `json:"recurringsubscriptioninfo"`
|
||||
Recurringsubscriptiondesc string `json:"recurringsubscriptiondesc"`
|
||||
|
||||
Billingamount string `json:"billingamount"`
|
||||
Billingamountinfo string `json:"billingamountinfo"`
|
||||
Billingamountdesc string `json:"billingamountdesc"`
|
||||
|
||||
Per string `json:"per"`
|
||||
Day string `json:"day"`
|
||||
Week string `json:"week"`
|
||||
Year string `json:"year"`
|
||||
Month string `json:"month"`
|
||||
|
||||
Billingcyclelimit string `json:"billingcyclelimit"`
|
||||
Billingcyclelimitinfo string `json:"billingcyclelimitinfo"`
|
||||
Billingcyclelimitdesc string `json:"billingcyclelimitdesc"`
|
||||
|
||||
Customtrial string `json:"Customtrial"`
|
||||
Customtrialinfo string `json:"Customtrialinfo"`
|
||||
Customtrialdesc string `json:"Customtrialdesc"`
|
||||
|
||||
Trailbillingamount string `json:"Trailbillingamount"`
|
||||
Trailbillingamountinfo string `json:"Trailbillingamountinfo"`
|
||||
Trailbillingamountdesc string `json:"Trailbillingamountdesc"`
|
||||
Forthefirst string `json:"forthefirst"`
|
||||
Subscriptionpayment string `json:"Subscriptionpayment"`
|
||||
|
||||
Membershiplevelemptytitle string `json:"membershiplevelemptytitle"`
|
||||
Membershiplevelemptydesc string `json:"membershiplevelemptydesc"`
|
||||
Membershipdesc string `json:"membershipdesc"`
|
||||
} `json:"membershiplevels"`
|
||||
|
||||
Subscriptions struct {
|
||||
Create string `json:"create"`
|
||||
Subscriptionavailable string `json:"subscriptionavailable"`
|
||||
Subscriptionavailables string `json:"subscriptionavailables"`
|
||||
|
||||
Subcriptionid string `json:"subcriptionid"`
|
||||
User string `json:"user"`
|
||||
Level string `json:"level"`
|
||||
Fee string `json:"fee"`
|
||||
Gateway string `json:"gateway"`
|
||||
Paymenton string `json:"paymenton"`
|
||||
Status string `json:"status"`
|
||||
Action string `json:"action"`
|
||||
Edit string `json:"edit"`
|
||||
Delete string `json:"delete"`
|
||||
Cancel string `json:"cancel"`
|
||||
Save string `json:"save"`
|
||||
Subscriptionemptytitle string `json:"subscriptionemptytitle"`
|
||||
Subscriptionemptydesc string `json:"subscriptionemptydesc"`
|
||||
Selectgateway string `json:"selectgateway"`
|
||||
MemberShiplevel string `json:"memberShiplevel"`
|
||||
Selectlevel string `json:"Selectlevel"`
|
||||
Subscriptiontransactionid string `json:"subscriptiontransactionid"`
|
||||
Entertransactionid string `json:"entertransactionid"`
|
||||
|
||||
Linksubscription string `json:"linksubscription"`
|
||||
Linksubscriptiondesc string `json:"linksubscriptiondesc"`
|
||||
|
||||
Transactionid string `json:"transactionid"`
|
||||
Transactionidinfo string `json:"transactionidinfo"`
|
||||
|
||||
Subscriptiontransactionidinfo string `json:"subscriptiontransactionidinfo"`
|
||||
Subscriptiontransactioniddesc string `json:"subscriptiontransactioniddesc"`
|
||||
|
||||
Gatewayinfo string `json:"gatewayinfo"`
|
||||
|
||||
Gatewayenvironment string `json:"Gatewayenvironment"`
|
||||
Gatewayenvironmentinfo string `json:"Gatewayenvironmentinfo"`
|
||||
|
||||
Memberid string `json:"memberid"`
|
||||
Memberidinfo string `json:"memberidinfo"`
|
||||
|
||||
Membershiplevelid string `json:"membershiplevelid"`
|
||||
Membershiplevelidinfo string `json:"membershiplevelidinfo"`
|
||||
Selectmember string `json:"selectmember"`
|
||||
} `json:"subscriptions"`
|
||||
Orders struct {
|
||||
Create string `json:"create"`
|
||||
Orderavailable string `json:"orderavailable"`
|
||||
Orderavailables string `json:"orderavailables"`
|
||||
Orderid string `json:"orderid"`
|
||||
User string `json:"user"`
|
||||
Level string `json:"level"`
|
||||
Total string `json:"total"`
|
||||
Gateway string `json:"gateway"`
|
||||
Paymenton string `json:"paymenton"`
|
||||
Subscriptiontransactionid string `json:"subscriptiontransactionid"`
|
||||
Status string `json:"status"`
|
||||
Action string `json:"action"`
|
||||
Edit string `json:"edit"`
|
||||
Delete string `json:"delete"`
|
||||
Cancel string `json:"cancel"`
|
||||
Save string `json:"save"`
|
||||
Orderemptytitle string `json:"orderemptytitle"`
|
||||
Orderemptydesc string `json:"orderemptydesc"`
|
||||
Enterorderid string `json:"enterorderid"`
|
||||
Entertransactionid string `json:"entertransactionid"`
|
||||
MemberShiplevel string `json:"memberShiplevel"`
|
||||
Selectlevel string `json:"selectlevel"`
|
||||
|
||||
Memberinformation string `json:"memberinformation"`
|
||||
Memberinformationdesc string `json:"memberinformationdesc"`
|
||||
Userid string `json:"userid"`
|
||||
Useridinfo string `json:"useridinfo"`
|
||||
Membershiplevelid string `json:"membershiplevelid"`
|
||||
Membershiplevelidinfo string `json:"membershiplevelidinfo"`
|
||||
Selectmember string `json:"selectmember"`
|
||||
Selectmembershiplevel string `json:"selectmembershiplevel"`
|
||||
Searchmembershiplevel string `json:"searchmembershiplevel"`
|
||||
|
||||
Billingaddress string `json:"billingaddress"`
|
||||
Billingaddressdesc string `json:"billingaddressdesc"`
|
||||
|
||||
Billingname string `json:"billingname"`
|
||||
Billingnameinfo string `json:"billingnameinfo"`
|
||||
Billingstreet string `json:"billingstreet"`
|
||||
Billingstreetinfo string `json:"billingstreetinfo"`
|
||||
Billingstreet2 string `json:"billingstreet2"`
|
||||
Billingstreetinfo2 string `json:"billingstreetinfo2"`
|
||||
Billingcity string `json:"billingcity"`
|
||||
Billingcityinfo string `json:"billingcityinfo"`
|
||||
Billingstate string `json:"billingstate"`
|
||||
Billingstateinfo string `json:"billingstateinfo"`
|
||||
Billingpostelcode string `json:"billingpostelcode"`
|
||||
Billingpostelcodeinfo string `json:"billingpostelcodeinfo"`
|
||||
Billingcounty string `json:"billingcounty"`
|
||||
Billingcountyinfo string `json:"billingcountyinfo"`
|
||||
Billingphone string `json:"billingphone"`
|
||||
Billingphoneinfo string `json:"Billingphoneinfo"`
|
||||
|
||||
Paymentinformation string `json:"paymentinformation"`
|
||||
Paymentinformationdesc string `json:"paymentinformationdesc"`
|
||||
|
||||
Subtotal string `json:"subtotal"`
|
||||
Subtotalinfo string `json:"subtotalinfo"`
|
||||
Tax string `json:"tax"`
|
||||
Taxinfo string `json:"taxinfo"`
|
||||
Totalinfo string `json:"totalinfo"`
|
||||
Entertotalamount string `json:"entertotalamount"`
|
||||
Paymenttype string `json:"paymenttype"`
|
||||
Paymenttypeinfo string `json:"paymenttypeinfo"`
|
||||
Enterpaymenttype string `json:"enterpaymenttype"`
|
||||
Paymenttypedesc string `json:"paymenttypedesc"`
|
||||
Statusinfo string `json:"statusinfo"`
|
||||
Success string `json:"success"`
|
||||
Failed string `json:"failed"`
|
||||
Paymentgatewayinformation string `json:"paymentgatewayinformation"`
|
||||
Paymentgatewayinformationdesc string `json:"paymentgatewayinformationdesc"`
|
||||
Gatewayinfo string `json:"gatewayinfo"`
|
||||
Gatewayenvironment string `json:"Gatewayenvironment"`
|
||||
Gatewayenvironmentinfo string `json:"Gatewayenvironmentinfo"`
|
||||
Paymenttransactionid string `json:"paymenttransactionid"`
|
||||
Paymenttransactionidinfo string `json:"paymenttransactionidinfo"`
|
||||
Paymenttransactioniddesc string `json:"paymenttransactioniddesc"`
|
||||
Subscriptiontransactionidinfo string `json:"subscriptiontransactionidinfo"`
|
||||
Subscriptiontransactioniddesc string `json:"subscriptiontransactioniddesc"`
|
||||
|
||||
Selectgateway string `json:"selectgateway"`
|
||||
Selectgatewayenvironment string `json:"selectgatewayenvironment"`
|
||||
} `json:"orders"`
|
||||
} `json:"memberships"`
|
||||
|
||||
Integrations struct {
|
||||
Integration string `json:"integration"`
|
||||
Headtitle string `json:"headtitle"`
|
||||
Title string `json:"title"`
|
||||
Keypoint1 string `json:"keypoint1"`
|
||||
Keypoint2 string `json:"keypoint2"`
|
||||
Keypoint3 string `json:"keypoint3"`
|
||||
Keypoint4 string `json:"keypoint4"`
|
||||
Keypoint5 string `json:"keypoint5"`
|
||||
Keypoint6 string `json:"keypoint6"`
|
||||
Keypoint7 string `json:"keypoint7"`
|
||||
Cloudtite string `json:"cloudtite"`
|
||||
Deschead string `json:"deschead"`
|
||||
List1 string `json:"list1"`
|
||||
Sublist1 string `json:"sublist1"`
|
||||
List2 string `json:"list2"`
|
||||
Sublist2 string `json:"sublist2"`
|
||||
List3 string `json:"list3"`
|
||||
Sublist3 string `json:"sublist3"`
|
||||
List4 string `json:"list4"`
|
||||
Sublist4 string `json:"sublist4"`
|
||||
List5 string `json:"list5"`
|
||||
Sublist5 string `json:"sublist5"`
|
||||
Sublist6 string `json:"sublist6"`
|
||||
Sublist7 string `json:"sublist7"`
|
||||
Sublist8 string `json:"sublist8"`
|
||||
Sublist9 string `json:"sublist9"`
|
||||
Sublist10 string `json:"sublist10"`
|
||||
List6 string `json:"list6"`
|
||||
Sublist11 string `json:"sublist11"`
|
||||
List7 string `json:"list7"`
|
||||
Sublist12 string `json:"sublist12"`
|
||||
List8 string `json:"list8"`
|
||||
Sublist13 string `json:"sublist13"`
|
||||
List9 string `json:"list9"`
|
||||
Sublist14 string `json:"sublist14"`
|
||||
List10 string `json:"list10"`
|
||||
Sublist15 string `json:"sublist15"`
|
||||
Sublist16 string `json:"sublist16"`
|
||||
Sublist17 string `json:"sublist17"`
|
||||
Sublist18 string `json:"sublist18"`
|
||||
} `json:"integrations"`
|
||||
|
||||
AImodulesettings struct {
|
||||
Cancel string `json:"cancel"`
|
||||
Save string `json:"save"`
|
||||
Create string `json:"create"`
|
||||
Aimodule string `json:"aimodule"`
|
||||
Description string `json:"description"`
|
||||
Lastupdatedon string `json:"lastupdatedon"`
|
||||
Status string `json:"status"`
|
||||
Model string `json:"model"`
|
||||
Action string `json:"action"`
|
||||
Edit string `json:"edit"`
|
||||
Delete string `json:"delete"`
|
||||
Aiemptytitle string `json:"aiemptytitle"`
|
||||
Aiemptydesc string `json:"aiemptydesc"`
|
||||
Selectmodule string `json:"selectmodule"`
|
||||
Selectmoduledesc string `json:"selectmoduledesc"`
|
||||
Openai string `json:"openai"`
|
||||
Openaidesc string `json:"openaidesc"`
|
||||
Google string `json:"google"`
|
||||
Googledesc string `json:"googledesc"`
|
||||
Deepseek string `json:"deepseek"`
|
||||
Deepseekdesc string `json:"deepseekdesc"`
|
||||
Apikey string `json:"apikey"`
|
||||
Apikeyplaceholder string `json:"apikeyplaceholder"`
|
||||
Descriptionplaceholder string `json:"descriptionplaceholder"`
|
||||
Aimodel string `json:"aimodel"`
|
||||
Selectaimodel string `json:"selectaimodel"`
|
||||
} `json:"AImodulesettings"`
|
||||
|
||||
Securitys struct {
|
||||
Security string `json:"security"`
|
||||
Changepassword string `json:"changepassword"`
|
||||
Changepassworddesc string `json:"changepassworddesc"`
|
||||
Newpassword string `json:"newpassword"`
|
||||
Newpasswordinfo string `json:"Newpasswordinfo"`
|
||||
Confirmpassword string `json:"confirmpassword"`
|
||||
Confirmpasswordinfo string `json:"Confirmpasswordinfo"`
|
||||
Cancel string `json:"cancel"`
|
||||
Save string `json:"save"`
|
||||
} `json:"Securitys"`
|
||||
|
||||
Course struct {
|
||||
Course string `json:"course"`
|
||||
Manageandorganize string `json:"manageandorganize"`
|
||||
Createcourse string `json:"createcourse"`
|
||||
RecordsAvailable string `json:"recordsavailable"`
|
||||
All string `json:"all"`
|
||||
SelectFilters string `json:"selectfilters"`
|
||||
CourseTitle string `json:"coursetitle"`
|
||||
EnterCourseTitle string `json:"entercoursetitle"`
|
||||
Status string `json:"status"`
|
||||
SelectStatus string `json:"selectstatus"`
|
||||
Pricing string `json:"pricing"`
|
||||
SelectPricing string `json:"selectpricing"`
|
||||
Clear string `json:"clear"`
|
||||
ApplyFilter string `json:"applyfilter"`
|
||||
SortBy string `json:"sortby"`
|
||||
LastUpdated string `json:"lastupdated"`
|
||||
CreatedDate string `json:"createddate"`
|
||||
Ascending string `json:"ascending"`
|
||||
Descending string `json:"descending"`
|
||||
CreatedBy string `json:"createdBy"`
|
||||
Action string `json:"action"`
|
||||
LastUpdatedOn string `json:"lastupdatedon"`
|
||||
CreatedOn string `json:"createdon"`
|
||||
Publish string `json:"publish"`
|
||||
UnPublish string `json:"unpublish"`
|
||||
Delete string `json:"delete"`
|
||||
Cancel string `json:"cancel"`
|
||||
Save string `json:"save"`
|
||||
Title string `json:"title"`
|
||||
EnterYourTitle string `json:"enteryourtitle"`
|
||||
Titleinfo string `json:"titleinfo"`
|
||||
Description string `json:"description"`
|
||||
EnterYourDescription string `json:"enteryourdescription"`
|
||||
Descriptioninfo string `json:"descriptioninfo"`
|
||||
Category string `json:"category"`
|
||||
Categoryinfo string `json:"categoryinfo"`
|
||||
SelectCategory string `json:"selectcategory"`
|
||||
SearchCategory string `json:"searchcategory"`
|
||||
UploadCoverImage string `json:"uploadcoverimage"`
|
||||
UploadCoverImageinfo string `json:"uploadcoverimageinfo"`
|
||||
Browse string `json:"browse"`
|
||||
Uploadnewfiles string `json:"uploadnewfiles"`
|
||||
Chooseonly string `json:"chooseonly"`
|
||||
NoCoursesyet string `json:"nocoursesyet"`
|
||||
Startcreating string `json:"startcreating"`
|
||||
DeleteCourse string `json:"deletecourse"`
|
||||
Areyousure string `json:"areyousure"`
|
||||
Lesson string `json:"lesson"`
|
||||
Section string `json:"section"`
|
||||
Settings string `json:"settings"`
|
||||
NoLessonYet string `json:"nolessonsyet"`
|
||||
Startbuilding string `json:"startbuilding"`
|
||||
CreateYourFirstLesson string `json:"createyourfirstlesson"`
|
||||
Newlesson string `json:"newlesson"`
|
||||
NewSection string `json:"newSection"`
|
||||
Addtext string `json:"addtext"`
|
||||
Addembed string `json:"addembed"`
|
||||
Addquiz string `json:"addquiz"`
|
||||
AddFiles string `json:"addFiles"`
|
||||
Createlesson string `json:"createlesson"`
|
||||
Updatelesson string `json:"updatelesson"`
|
||||
Createsection string `json:"createsection"`
|
||||
Updatesection string `json:"updatesection"`
|
||||
} `json:"Course"`
|
||||
|
||||
Coursessettings struct {
|
||||
Settings string `json:"settings"`
|
||||
Details string `json:"details"`
|
||||
Title string `json:"title"`
|
||||
Titledesc string `json:"titledesc"`
|
||||
Description string `json:"description"`
|
||||
Desccont string `json:"desccont"`
|
||||
Image string `json:"image"`
|
||||
Imagedesc string `json:"imagedesc"`
|
||||
Chooseimg string `json:"chooseimg"`
|
||||
Category string `json:"category"`
|
||||
Catdesc string `json:"catdesc"`
|
||||
Searchcat string `json:"searchcat"`
|
||||
Options string `json:"options"`
|
||||
Certificate string `json:"certificate"`
|
||||
Cerdesc string `json:"cerdesc"`
|
||||
Cerstatus string `json:"cerstatus"`
|
||||
Comments string `json:"comments"`
|
||||
Commentsdesc string `json:"commentsdesc"`
|
||||
Active string `json:"active"`
|
||||
Inactive string `json:"inactive"`
|
||||
Pricing string `json:"pricing"`
|
||||
Offer string `json:"offer"`
|
||||
Offerdesc string `json:"offerdesc"`
|
||||
Offerchange string `json:"offerchange"`
|
||||
Free string `json:"free"`
|
||||
Freedesc string `json:"freedesc"`
|
||||
Waitlist string `json:"waitlist"`
|
||||
Waitlistdesc string `json:"waitlistdesc"`
|
||||
Paid string `json:"paid"`
|
||||
Paiddesc string `json:"paiddesc"`
|
||||
Availability string `json:"availability"`
|
||||
Status string `json:"status"`
|
||||
Statusdesc string `json:"statusdesc"`
|
||||
Visibility string `json:"visibility"`
|
||||
Visibilitydesc string `json:"visibilitydesc"`
|
||||
Published string `json:"published"`
|
||||
Unpublish string `json:"unpublish"`
|
||||
Draft string `json:"draft"`
|
||||
Selectvisible string `json:"selectvisible"`
|
||||
Public string `json:"public"`
|
||||
Private string `json:"private"`
|
||||
Startdate string `json:"startdate"`
|
||||
Datedesc string `json:"datedesc"`
|
||||
Singuplimit string `json:"singuplimit"`
|
||||
Singuplimitdesc string `json:"singuplimitdesc"`
|
||||
Enterlimits string `json:"enterlimits"`
|
||||
Duration string `json:"duration"`
|
||||
Durationdesc string `json:"durationdesc"`
|
||||
Selectduration string `json:"selectduration"`
|
||||
Month string `json:"month"`
|
||||
Year string `json:"year"`
|
||||
Visiblityerr string `json:"visiblityerr"`
|
||||
Dateerr string `json:"dateerr"`
|
||||
Limiterr string `json:"limiterr"`
|
||||
Durationerr string `json:"durationerr"`
|
||||
} `json:"Coursessettings"`
|
||||
Menu struct {
|
||||
Website string `json:"website"`
|
||||
Templates string `json:"templates"`
|
||||
SEO string `json:"seo"`
|
||||
Setting string `json:"setting"`
|
||||
WebDesc string `json:"webdesc"`
|
||||
BannerTitle string `json:"bannertitle"`
|
||||
BannerDesc string `json:"bannerdesc"`
|
||||
Menu string `json:"menu"`
|
||||
MenuName string `json:"menuname"`
|
||||
TotalItems string `json:"totalitems"`
|
||||
Status string `json:"status"`
|
||||
LastModified string `json:"lastmodified"`
|
||||
Action string `json:"action"`
|
||||
CreateMenu string `json:"createmenu"`
|
||||
CreateNewMenu string `json:"createnewmenu"`
|
||||
Description string `json:"description"`
|
||||
ManageMenu string `json:"managemenu"`
|
||||
ManageMenuDesc string `json:"managemenudesc"`
|
||||
ChooseMenuItem string `json:"choosemenuitem"`
|
||||
AddMenuItems string `json:"addmenuitems"`
|
||||
AddToMenu string `json:"addtomenu"`
|
||||
MostRecent string `json:"mostrecent"`
|
||||
ViewAll string `json:"viewall"`
|
||||
SelectAll string `json:"selectall"`
|
||||
AddMenuItem string `json:"addmenuitem"`
|
||||
LabelName string `json:"labelname"`
|
||||
LabelNamePlcholder string `json:"labelnameplcholder"`
|
||||
NavigationPath string `json:"navigationpath"`
|
||||
NavPlcholder string `json:"navplcholder"`
|
||||
AddItem string `json:"additem"`
|
||||
LabelNameErr string `json:"labelnameerr"`
|
||||
LinkPathErr string `json:"linkpatherr"`
|
||||
} `json:"Menu"`
|
||||
Seo struct {
|
||||
HomePage string `json:"homepage"`
|
||||
PageTitle string `json:"pagetitle"`
|
||||
HomePageTitle string `json:"homepagetitle"`
|
||||
PageDescription string `json:"pagedescription"`
|
||||
HomePageDescription string `json:"homepagedescription"`
|
||||
PageKeyword string `json:"pagekeyword"`
|
||||
HomePageKeyword string `json:"homepagekeyword"`
|
||||
Save string `json:"save"`
|
||||
Store string `json:"store"`
|
||||
StoreTitle string `json:"storetitle"`
|
||||
StorePageTitle string `json:"storepagetitle"`
|
||||
StoreDescription string `json:"storedescription"`
|
||||
StorePageDescription string `json:"storepagedescription"`
|
||||
StoreKeyword string `json:"storekeyword"`
|
||||
StorePageKeyword string `json:"storepagekeyword"`
|
||||
SiteMap string `json:"sitemap"`
|
||||
Choosefile string `json:"choosefile"`
|
||||
Nofilechose string `json:"nofilechosen"`
|
||||
Update string `json:"update"`
|
||||
} `json:"Seo"`
|
||||
|
||||
WebsiteSettings struct {
|
||||
SiteName string `json:"sitename"`
|
||||
Spurtcms string `json:"spurtcms"`
|
||||
SiteLogo string `json:"sitelogo"`
|
||||
SiteFavIcon string `json:"sitefavicon"`
|
||||
WebsiteUrl string `json:"websiteurl"`
|
||||
Subdomain string `json:"subdomain"`
|
||||
Spurtcmscom string `json:"spurtcmscom"`
|
||||
} `json:"WebsiteSettings"`
|
||||
}
|
||||
|
||||
func LoadTranslation(filepath string) (Translation, error) {
|
||||
|
||||
+605
-10
@@ -152,6 +152,9 @@
|
||||
"getsupport": "Get SpurtCMS Pro",
|
||||
"explore": "Explore",
|
||||
"aiwritingheading": "Generate AI-powered content with customization.",
|
||||
"selling":"Selling",
|
||||
"courses":"Courses",
|
||||
"listing":"Listing",
|
||||
"Setting": {
|
||||
"title": "Settings",
|
||||
"manageroles": "Manage Roles",
|
||||
@@ -237,7 +240,8 @@
|
||||
"usernamelable": "The username that will be used for you to login.",
|
||||
"rolelable": "Your role in the system, assigned by the admin, defining your access level.",
|
||||
"emaillable": "Your registered email address for communication and login purposes.",
|
||||
"mobilelable": "Your Phone number that will be used for contact and communication."
|
||||
"mobilelable": "Your Phone number that will be used for contact and communication.",
|
||||
"aimodule": "AI Module Settings"
|
||||
},
|
||||
"Emailtemplate": {
|
||||
"searchtemplates": "Search Templates",
|
||||
@@ -366,7 +370,7 @@
|
||||
"entrypublished": "Entry is published",
|
||||
"entrynotpublished": "Entry is not published",
|
||||
"selectedrelatedarticle": "Selected Related Articles",
|
||||
"content": "Content",
|
||||
"content": "Content LIBRARIES",
|
||||
"category": "Category",
|
||||
"required": "Required",
|
||||
"metatitle": "Meta Tag Title",
|
||||
@@ -505,7 +509,7 @@
|
||||
"createfirstdraft": "Create Your First Draft",
|
||||
"nounpublished": "Move live entries here to update or revise them before republishing. Keep your content fresh and updated!",
|
||||
"createfirstunpublished": "Manage Your Unpublished Entries",
|
||||
"channelhead": "Channel Management Made Simple",
|
||||
"channelhead": "Content Management",
|
||||
"channelnamelable": "Assign a unique name to this channel to define the type of content it will hold, such as Blogs, News, Product Listings, Job Descriptions, and so on.",
|
||||
"descriptionlable": " Provide a brief summary of this channel’s purpose to help users understand what kind of content it will manage."
|
||||
},
|
||||
@@ -555,9 +559,9 @@
|
||||
"createfirstcategorygroup": "Create Category Group",
|
||||
"categorynamelable": "Enter a unique name for this category to organize and classify your content effectively.",
|
||||
"descriptionlable": "Provide a brief overview of this category to help users understand its purpose and relevance.",
|
||||
"availablecategorylable": "Select from the dropdown and choose an existing category to create a sub-category under it, or leave it unselected for a new parent category.",
|
||||
"availablecategorylable": "Choose an existing category to create a sub-category under it, or leave it unselected for a new parent category.",
|
||||
"uploadimagelable": "Add an image to visually represent this category, making it more identifiable and engaging.",
|
||||
"categorygrouplable": "Define a broad category group to organize related categories under one structure, such as Apparel, Electronics, or Services.",
|
||||
"categorygrouplable": "Category group to organize related categories under one structure, such as Apparel, Electronics, or Services.",
|
||||
"categorygroupdescriptionlable": "Provide a brief explanation of this category group to clarify its purpose and how it helps in content organization."
|
||||
},
|
||||
"Userss": {
|
||||
@@ -1125,6 +1129,7 @@
|
||||
"ERRORAWScredentialsnotfound": "Upload failed: Check S3 credentials and try again.",
|
||||
"Ctastatusnotify": "CTA Status Updated Sucessfully",
|
||||
"Collection Added Successfully": "Collection added successfully",
|
||||
"Collection Cloned Successfully": "Collection Cloned Successfully",
|
||||
"Channel Added Successfully": "Channel Added Successfully",
|
||||
"channelmissing": "The blocks you are adding to your collection do not have a corresponding channel in your channel collection. Please add the required channel before proceeding.",
|
||||
"Pleaseaddtherequiredchannelbeforeproceeding": "Please add the required channel before proceeding",
|
||||
@@ -1149,7 +1154,32 @@
|
||||
"AI Module Deleted Successfully": "AI Module Deleted Successfully",
|
||||
"IntegrationUpdatedSuccessfully": "Integration Updated Successfully",
|
||||
"Course Created Successfully": "Course Created Successfully",
|
||||
"Course Deleted Successfully": "Course Deleted Successfully"
|
||||
"Course Deleted Successfully": "Course Deleted Successfully",
|
||||
"Section Created Successfully":"Section Created Successfully",
|
||||
"Section Updated Successfully":"Section Updated Successfully",
|
||||
"Section Deleted Successfully":"Section Deleted Successfully",
|
||||
"Lesson Created Successfully":"Lesson Created Successfully",
|
||||
"Lesson Updated Successfully":"Lesson Updated Successfully",
|
||||
"Lesson Deleted Successfully":"Lesson Deleted Successfully",
|
||||
"Course Published Successfully":"Course Published Successfully",
|
||||
"Course Unpublished Successfully":"Course Unpublished Successfully",
|
||||
"Course Settings Updated Successfully":"Course Settings Updated Successfully",
|
||||
"Integrationreapt":"This Integration Already existing ",
|
||||
"Menu Created Successfully":"Menu Created Successfully",
|
||||
"Menu Updated Successfully":"Menu Updated Successfully",
|
||||
"Menu Deleted Successfully":"Menu Deleted Successfully",
|
||||
"Template Updated Successfully":"Template Updated Successfully",
|
||||
"SEO Details Updated Successfully":"SEO Details Updated Successfully",
|
||||
"Settings Details Updated Successfully":"Settings Details Updated Successfully",
|
||||
"Listing Deleted Successfully":"Listing Deleted Successfully",
|
||||
"Listing Created Successfully":"Listing Created Successfully",
|
||||
"Listing Updated Successfully":"Listing Updated Successfully",
|
||||
"Website Deleted Successfully":"Website Deleted Successfully",
|
||||
"Website Created Successfully":"Website Created Successfully",
|
||||
"Website Updated Successfully":"Website Updated Successfully",
|
||||
"Page Created Successfully":"Page Created Successfully",
|
||||
"Page Updated Successfully":"Page Updated Successfully",
|
||||
"Page Deleted Successfully":"Page Deleted Successfully"
|
||||
},
|
||||
"DashBoard": {
|
||||
"lastactive": "Last Active",
|
||||
@@ -1615,7 +1645,7 @@
|
||||
},
|
||||
"FormBuilder": {
|
||||
"ctaheading": "Add action-driven forms for engaging users or collecting information.",
|
||||
"cta": "Call To Action",
|
||||
"cta": "Forms",
|
||||
"formavailable": "CTA Available",
|
||||
"formsavailable": "CTA's Available",
|
||||
"formname": "Form Name",
|
||||
@@ -1625,8 +1655,8 @@
|
||||
"createforms": "Create CTA's",
|
||||
"save": "Save",
|
||||
"publish": "Publish",
|
||||
"createform": "Create Call To Action",
|
||||
"updateform": "Update Call To Action",
|
||||
"createform": "Create Forms",
|
||||
"updateform": "Update Forms",
|
||||
"selectfilter": "Select Filter",
|
||||
"fromdate": "From Date",
|
||||
"todate": "To Date",
|
||||
@@ -1675,7 +1705,7 @@
|
||||
"timezoneerror": "Please select the time zone",
|
||||
"countryhead": "Country",
|
||||
"countryplaceholder": "Enter your country",
|
||||
"countryerror": "Please enter the country",
|
||||
"countryerror": "Please select the country",
|
||||
"dechead": "Describe",
|
||||
"decplaceholder": "Describe your needs for our precise assistance to you",
|
||||
"decerror": "Please enter the description",
|
||||
@@ -1791,5 +1821,570 @@
|
||||
"validateWebhookName": "Please enter a webhook name without special characters, and without leading or trailing whitespaces",
|
||||
"validateWebhookUrl": "Please enter a valid request url"
|
||||
}
|
||||
},
|
||||
"memberships": {
|
||||
"membershiphead": "Membership",
|
||||
"membershipheaddesc": "Control member access and permissions.",
|
||||
"membershipmember": "Member",
|
||||
"membershipgroup": "Membership group",
|
||||
"membershiplevel": "Membership level",
|
||||
"membershipsubscription": "Subscription",
|
||||
"membershiporders": "Orders",
|
||||
"recordsavailable": "Records available",
|
||||
"recordavailable": "Record available",
|
||||
"member": {
|
||||
"recordsavailable": "Members available",
|
||||
"recordavailable": "Member available",
|
||||
"createMember": "Create Member",
|
||||
"updateMember": "Update Member",
|
||||
"selectfilters": "Select Filters",
|
||||
"createdon": "Created On",
|
||||
"clear": "Clear",
|
||||
"applyfilter": "Apply Filter",
|
||||
"searchplacehoder": "Search (Ctrl + “k” to focus)",
|
||||
"id": "ID",
|
||||
"name": "Name",
|
||||
"email": "Email",
|
||||
"level": "Level",
|
||||
"subscription": "Subscription",
|
||||
"startdate": "Start Date",
|
||||
"enddate": "End Date",
|
||||
"status": "Status",
|
||||
"action": "Action",
|
||||
"edit": "Edit",
|
||||
"delete": "Delete",
|
||||
"memberemptytitle": "No Members Yet?",
|
||||
"memberemptydesc": "No members found! Add Members, manage individual members and assign them appropriate access levels for seamless content distribution.",
|
||||
"cancel": "Cancel",
|
||||
"save": "Save",
|
||||
"active": "Active",
|
||||
"firstname": "First Name",
|
||||
"firstnameplacceholder": "Enter the member's first name",
|
||||
"lastname": "Last Name",
|
||||
"lastnameplacceholder": "Enter the member's last name",
|
||||
"emailplacceholder": "Enter the member's email address",
|
||||
"mobile": "Mobile Number",
|
||||
"mobileplacehoder": "Enter the member's mobile number",
|
||||
"username": "Username",
|
||||
"usernameplacehoder": "Enter the member's username",
|
||||
"password": "Password",
|
||||
"passwordplacehoder": "Enter the member's password",
|
||||
"firstnameinfo": "Enter the member's first name as it should appear in records.",
|
||||
"lastnameinfo": "Provide the member's last name for proper identification.",
|
||||
"emailinfo": "Add the member’s email address for communication and login purposes.",
|
||||
"mobileinfo": "Enter a valid phone number for verification and contact.",
|
||||
"usernameinfo": "Create a unique username for the member to log in.",
|
||||
"passwordinfo": "Set a secure password for account access and security.",
|
||||
"deletemember": "Delete Member?",
|
||||
"areyousure": "Are you sure you want to delete this Member ?",
|
||||
"deletemembers": "Delete Members?",
|
||||
"areyousures": "Are you sure you want to delete this Members ?"
|
||||
},
|
||||
"membershipgroups": {
|
||||
"recordsavailable": "Membership Groups available",
|
||||
"recordavailable": "Membership Group available",
|
||||
"createMembersiphgroup": "Create Membership Group",
|
||||
"updateMembersiphgroup": "Update Membership Group",
|
||||
"selectfilters": "Select Filters",
|
||||
"lastupdatedon": "Last Updated On",
|
||||
"clear": "Clear",
|
||||
"applyfilter": "Apply Filter",
|
||||
"status": "Status",
|
||||
"active": "Active",
|
||||
"inactive": "Inactive",
|
||||
"searchplacehoder": "Search (Ctrl + “k” to focus)",
|
||||
"group": "Group",
|
||||
"description": "Description",
|
||||
"action": "Action",
|
||||
"membershipgroupemptytitle": "No membership level groups Yet?",
|
||||
"membershipgroupemptydesc": "No membership level groups found! Create groups to categorize different membership levels and streamline permission management.",
|
||||
"cancel": "Cancel",
|
||||
"save": "Save",
|
||||
"groupname": "Group Name",
|
||||
"groupnameinfo": "Enter a unique name for the membership level group.",
|
||||
"groupnameplacehoder": "Enter your group name",
|
||||
"groupnamedesc": "Description",
|
||||
"groupnamedescinfo": "Provide a brief description of the membership group for better identification and management.",
|
||||
"groupnamedescplacehoder": "Enter your group description",
|
||||
"deletemembergroup": "Delete Membership Level Group ?",
|
||||
"areyousure": "Are you sure you want to delete this Membership Level Group ?"
|
||||
},
|
||||
"membershiplevels": {
|
||||
"create": "Create Membership Level",
|
||||
"membershipavailable": "Membership Level Available",
|
||||
"membershipavailables": "Membership Levels Available",
|
||||
"id": "ID",
|
||||
"level": "Level",
|
||||
"fee": "Fee",
|
||||
"status": "Status",
|
||||
"action": "Action",
|
||||
"edit": "Edit",
|
||||
"delete": "Delete",
|
||||
"cancel": "Cancel",
|
||||
"save": "Save",
|
||||
"basicinfo": "Basic Info",
|
||||
"basicinfodesc": "Define membership details, including name, type, and associated groups.",
|
||||
"name": "Name",
|
||||
"nameinfo": "Enter a unique name for the membership tier.",
|
||||
"selectmembership": "Select Membership",
|
||||
"selectmembershipinfo": "Choose a membership template to define the structure of this tier.",
|
||||
"selectmembershipplaceholde": "Membership Template",
|
||||
"selectmembershiplevelgroup": "Select Membership Level Group",
|
||||
"selectmembershiplevelgroupinfo": "Assign this tier to a specific membership level group.",
|
||||
"selectmembershiplevelgroupplaceholder": "Membership Level Group",
|
||||
"message": "Membership Level Details",
|
||||
"messageinfo": "Add a description or message to provide details about this membership tier.",
|
||||
"billingdetails": "Billing Details",
|
||||
"billingdetailsdesc": "Configure payment terms, recurring billing, and trial options.",
|
||||
"initialpayment": "Initial Payment",
|
||||
"initialpaymentinfo": "The amount collected at registration for this membership tier.",
|
||||
"initialpaymentdesc": "The initial amount collected at registration",
|
||||
"recurringsubscription": "Recurring Subscription",
|
||||
"recurringsubscriptioninfo": "Enable this option if this membership involves recurring payments.",
|
||||
"recurringsubscriptiondesc": "Check if this level has a recurring subcription payment.",
|
||||
"billingamount": "Billing Amount",
|
||||
"billingamountinfo": "Set the subscription fee for recurring payments.",
|
||||
"billingamountdesc": "The initial amount collected at registration",
|
||||
"per": "Per",
|
||||
"day": "Day(s)",
|
||||
"week": "Week(s)",
|
||||
"year": "Year(s)",
|
||||
"month": "Month(s)",
|
||||
"billingcyclelimit": "Billing Cycle Limit",
|
||||
"billingcyclelimitinfo": "Define the duration or number of billing cycles before the membership expires.",
|
||||
"billingcyclelimitdesc": "Set the number of cycles for billing before renewal.",
|
||||
"customtrial": "Custom Trial",
|
||||
"customtrialinfo": "Enable and set a trial period for new members before regular billing starts.",
|
||||
"customtrialdesc": "Check to add a custom trial period.",
|
||||
"trailbillingamount": "Trial Billing Amount",
|
||||
"trailbillingamountinfo": "Specify the amount charged during the trial period.",
|
||||
"trailbillingamountdesc": "The initial amount collected at registration",
|
||||
"forthefirst": "For the First",
|
||||
"subscriptionpayment": "Subscription Payment",
|
||||
"membershiplevelemptytitle": "No Membership Levels Found?",
|
||||
"membershiplevelemptydesc": "No membership tiers found! Define and customize membership tiers with different access levels and subscription plans.",
|
||||
"deletemembershiplevel": "Delete Membership Level ?",
|
||||
"areyousure": "Are you sure you want to delete this Membership Level ?",
|
||||
"membershipdesc":"Description"
|
||||
},
|
||||
"subscriptions": {
|
||||
"create": "Create Subscription",
|
||||
"subscriptionavailable": "Subscription Available",
|
||||
"subscriptionavailables": "Subscriptions Available",
|
||||
"subcriptionid": "Subscription ID",
|
||||
"user": "User",
|
||||
"level": "Level",
|
||||
"fee": "Fee",
|
||||
"gateway": "Gateway",
|
||||
"paymenton": "Payment On",
|
||||
"status": "Status",
|
||||
"action": "Action",
|
||||
"edit": "Edit",
|
||||
"delete": "Delete",
|
||||
"cancel": "Cancel",
|
||||
"save": "Save",
|
||||
"subscriptionemptytitle": "No subscriptions found?",
|
||||
"subscriptionemptydesc": "No subscriptions found! Link members to subscription plans to manage access and provide exclusive content.",
|
||||
"selectgateway": "Select Gateway",
|
||||
"membershiplevel": "Membership Level",
|
||||
"selectlevel": "Select Level",
|
||||
"subscriptiontransactionid": "Subscription Transaction ID",
|
||||
"entertransactionid": "Enter Transaction ID",
|
||||
"linksubscription": "Link Subscription to Member Access",
|
||||
"linksubscriptiondesc": "Seamlessly connect user subscriptions with access control and permissions for efficient membership management. to provide seamless access to exclusive content or membership services.",
|
||||
"subscriptiontransactionidinfo": "Unique identifier for the subscription transaction for tracking and reference.",
|
||||
"subscriptiontransactioniddesc": "e.g. The transaction ID linked to a subscription-based payment.",
|
||||
"gatewayinfo": "Select the payment gateway used for processing the subscription.",
|
||||
"gatewayenvironment": "Gateway Environment",
|
||||
"gatewayenvironmentinfo": "Choose between live or test mode to configure the subscription processing.",
|
||||
"memberid": "Member ID",
|
||||
"memberidinfo": "Enter the unique user identifier to associate the subscription with a specific member.",
|
||||
"membershiplevelid": "Membership Level ID",
|
||||
"membershiplevelidinfo": "Select the membership plan or tier assigned to the user for access control.",
|
||||
"selectmember": "Select Member",
|
||||
"transactionid": "Transaction ID",
|
||||
"transactionidinfo": "Unique identifier for the subscription transaction for tracking and reference.",
|
||||
"Deletesubscription": "Delete Subscription ?",
|
||||
"Deletesubscriptions": "Delete Subscriptions ?",
|
||||
"areyousure": "Are you sure you want to delete this Subscription ?",
|
||||
"areyousures": "Are you sure you want to delete these Subscriptions ?"
|
||||
},
|
||||
"orders": {
|
||||
"create": "Create Order",
|
||||
"orderavailable": "Order Available",
|
||||
"orderavailables": "Orders Available",
|
||||
"orderid": "Order ID",
|
||||
"user": "User",
|
||||
"level": "Level",
|
||||
"total": "Total",
|
||||
"gateway": "Gateway",
|
||||
"paymenton": "Payment On",
|
||||
"subscriptiontransactionid": "Subscription Transaction ID",
|
||||
"status": "Status",
|
||||
"action": "Action",
|
||||
"edit": "Edit",
|
||||
"delete": "Delete",
|
||||
"cancel": "Cancel",
|
||||
"save": "Save",
|
||||
"orderemptytitle": "No membership orders found?",
|
||||
"orderemptydesc": "No membership orders found! Track and manage membership-related transactions efficiently with structured order details.",
|
||||
"enterorderid": "Enter Order ID",
|
||||
"entertransactionid": "Enter Transaction ID",
|
||||
"membershiplevel": "Membership Level",
|
||||
"selectlevel": "Select Level",
|
||||
"memberinformation": "Member Information",
|
||||
"memberinformationdesc": "Assign users to membership levels for access and benefits.",
|
||||
"userid": "User",
|
||||
"useridinfo": "Enter the unique Name of the member placing the order.",
|
||||
"membershiplevelid": "Membership Level",
|
||||
"membershiplevelidinfo": "Select the membership level assigned to the user.",
|
||||
"selectmember": "Select Member",
|
||||
"selectmembershiplevel": "Select Membership Level",
|
||||
"searchmembershiplevel": "Search Membership Level",
|
||||
"billingaddress": "Billing Address",
|
||||
"billingaddressdesc": "Enter the billing details associated with the membership or purchase.",
|
||||
"billingname": "Billing Name",
|
||||
"billingnameinfo": "Enter the name of the person or company for billing.",
|
||||
"billingstreet": "Billing Street",
|
||||
"billingstreetinfo": "Provide the primary street address for billing.",
|
||||
"billingstreet2": "Billing Street 2",
|
||||
"billingstreetinfo2": "(Optional) Enter additional street details if necessary.",
|
||||
"billingcity": "Billing City",
|
||||
"billingcityinfo": "Specify the city for the billing address.",
|
||||
"billingstate": "Billing State",
|
||||
"billingstateinfo": "Select or enter the state for the billing address.",
|
||||
"billingpostelcode": "Billing Postal Code",
|
||||
"billingpostelcodeinfo": "Provide the postal or ZIP code for accurate billing.",
|
||||
"billingcounty": "Billing County",
|
||||
"billingcountyinfo": "Select the country for the billing address.",
|
||||
"billingphone": "Billing Phone",
|
||||
"billingphoneinfo": "Enter the contact phone number for billing-related queries.",
|
||||
"paymentinformation": "Payment Information",
|
||||
"paymentinformationdesc": "View and manage payment details, including total amount and payment type.",
|
||||
"subtotal": "Sub Total",
|
||||
"subtotalinfo": "The total amount before taxes and additional charges.",
|
||||
"tax": "Tax",
|
||||
"taxinfo": "The applicable tax amount calculated on the subtotal.",
|
||||
"totalinfo": "The final payable amount, including subtotal and tax.",
|
||||
"entertotalamount": "Enter Total Amount",
|
||||
"paymenttype": "Payment Type",
|
||||
"paymenttypeinfo": "Specify the mode of payment (e.g., PayPal, Stripe, RazorPay, UPI, etc.)",
|
||||
"enterpaymenttype": "Enter Payment Type",
|
||||
"paymenttypedesc": "Describe the payment method used.",
|
||||
"statusinfo": "Set the current status of the order (e.g., pending, completed, canceled).",
|
||||
"success": "Success",
|
||||
"failed": "Failed",
|
||||
"paymentgatewayinformation": "Payment Gateway Information",
|
||||
"paymentgatewayinformationdesc": "Store transaction details linked to the selected payment gateway.",
|
||||
"gatewayinfo": "Select the payment gateway used for processing the transaction.",
|
||||
"gatewayenvironment": "Gateway Environment",
|
||||
"gatewayenvironmentinfo": "Choose between live or test mode for transactions.",
|
||||
"paymenttransactionid": "Payment Transaction ID",
|
||||
"paymenttransactionidinfo": "Enter or retrieve the unique ID generated by the payment gateway.",
|
||||
"paymenttransactioniddesc": "Generated by the gateway.Useful to cross reference orders",
|
||||
"subscriptiontransactionidinfo": "The transaction ID linked to a subscription-based payment.",
|
||||
"subscriptiontransactioniddesc": "Generated by the gateway.Useful to cross reference Subscription",
|
||||
"selectgateway": "Select Gateway",
|
||||
"selectgatewayenvironment": "Select Gateway Environment",
|
||||
"Deletemembershiporder": "Delete Membership Order ?",
|
||||
"areyousure": "Are you sure you want to delete this Membership Order ?",
|
||||
"Deletemembershiporders": "Delete Membership Orders ?",
|
||||
"areyousures": "Are you sure you want to delete these Membership Orders ?"
|
||||
}
|
||||
},
|
||||
"integrations": {
|
||||
"integration": "Integration",
|
||||
"headtitle": "SpurtCMS Pro v1.2 – Code + Support",
|
||||
"title": "Take full control of your CMS with SpurtCMS Pro v1.2, deployed directly on your server with premium features and lifetime benefits.",
|
||||
"keypoint1": "Everything You See in the Demo – Yours to Keep",
|
||||
"keypoint2": "Lifetime Upgrades – Stay Ahead",
|
||||
"keypoint3": "30 Hours Developer Support – Hassle-Free Deployment",
|
||||
"keypoint4": "Fully White-Label – Make It Your Own",
|
||||
"keypoint5": "Exclusive Next.js Templates – Free Access",
|
||||
"keypoint6": "Expert Consultation – Future-Proof Your Business",
|
||||
"keypoint7": "Get Full Source Code",
|
||||
"cloudtite": "SpurtCMS Pro v1.2 Build with Technology",
|
||||
"deschead": "Pricing FAQs – SpurtCMS Pro v1.2",
|
||||
"list1": "What do I get with my purchase?",
|
||||
"sublist1": "You will receive the full version of SpurtCMS Pro v1.2, exactly as shown in the demo. It includes lifetime upgrades, 30 hours of developer support, white-label branding, and access to all free Next.js templates.",
|
||||
"list2": "Is there a one-time payment or a subscription model?",
|
||||
"sublist2": "We offer a one-time payment model. Pay once and enjoy lifetime benefits, including future updates and expert consultation.",
|
||||
"list3": "Do you offer a free trial or demo?",
|
||||
"sublist3": "Yes! You can try our fully functional demo before making a purchase. What you see in the demo is exactly what you'll get.",
|
||||
"list4": "Can I get a refund if I’m not satisfied?",
|
||||
"sublist4": "Due to the nature of digital products, we do not offer refunds once the product is downloaded. However, we provide a demo version so you can evaluate before purchasing.",
|
||||
"list5": "What is included in the 30 hours of developer support?",
|
||||
"sublist5": "Our developers will assist you with:",
|
||||
"sublist6": "Installation & deployment on your server",
|
||||
"sublist7": "Basic configuration & setup",
|
||||
"sublist8": "Minor bug fixes & optimizations",
|
||||
"sublist9": "Guidance on customization",
|
||||
"sublist10": "Beyond 30 hours, additional support is available at an hourly rate.",
|
||||
"list6": "Can I use SpurtCMS Pro v1.2 for multiple projects?",
|
||||
"sublist11": "Your purchase includes a single-use license for one domain/project. For multiple projects, additional licenses are required.",
|
||||
"list7": "How does white-label branding work?",
|
||||
"sublist12": "You can fully rebrand SpurtCMS Pro v1.2 by changing the logo, colors, brand name, and other visual elements to match your business identity.",
|
||||
"list8": "Can I get custom features developed?",
|
||||
"sublist13": "Yes! We offer consultation and customization services. If you need additional features, our development team can build them for you at a custom rate.",
|
||||
"list9": "What payment methods do you accept?",
|
||||
"sublist14": "We accept credit/debit cards, PayPal, and bank transfers. Contact us if you need alternative payment options.",
|
||||
"list10": "How do I get started after purchasing?",
|
||||
"sublist15": "After completing your purchase, you’ll receive:",
|
||||
"sublist16": "A download link for SpurtCMS Pro v1.2",
|
||||
"sublist17": "A detailed setup guide",
|
||||
"sublist18": "Access to our developer support team to assist with installation"
|
||||
},
|
||||
"AImodulesettings": {
|
||||
"cancel": "Cancel",
|
||||
"save": "Save",
|
||||
"create": "Create New AI Module",
|
||||
"aimodule": "AI Module",
|
||||
"description": "Description",
|
||||
"lastupdatedon": "Last Updated on",
|
||||
"status": "Status",
|
||||
"model": "Model",
|
||||
"action": "Action",
|
||||
"edit": "Edit",
|
||||
"delete": "Delete",
|
||||
"aiemptytitle": "No AI Settings Module found?",
|
||||
"aiemptydesc": "Enhance your system with AI-powered automation and intelligence.Choose a provider,configure settings,and get started today!",
|
||||
"selectmodule": "Select Module",
|
||||
"selectmoduledesc": "Easily integrate AI capabilities by selecting a module, adding an API key, and defining the AI model.",
|
||||
"openai": "Open AI",
|
||||
"openaidesc": "Utilize state-of-the-art natural language processing for automated content creation and intelligent responses.",
|
||||
"google": "Google",
|
||||
"googledesc": "Leverage Google's AI-powered tools for text analysis, content creation and automation.",
|
||||
"deepseek": "Deep Seek",
|
||||
"deepseekdesc": "Harness deep learning capabilities for advanced data processing and AI-driven insights.",
|
||||
"apikey": "API Key",
|
||||
"apikeyplaceholder": "Please Enter APIKey",
|
||||
"descriptionplaceholder": "Please Enter Description",
|
||||
"aimodel": "AI Model",
|
||||
"selectaimodel": "Select AI Model",
|
||||
"aimodelerr":"Please Select AI Model"
|
||||
},
|
||||
"Securitys": {
|
||||
"security": "Security",
|
||||
"changepassword": "Change Password",
|
||||
"changepassworddesc": "Update your current password to enhance account security.",
|
||||
"newpassword": "New Password",
|
||||
"confirmpassword": "Confirm Password",
|
||||
"cancel": "Cancel",
|
||||
"save": "Save",
|
||||
"newpasswordinfo": " Enter a strong new password following the required security guidelines.",
|
||||
"confirmpasswordinfo": "Re-enter the new password to ensure accuracy and prevent errors."
|
||||
},
|
||||
"Course": {
|
||||
"course":"Course",
|
||||
"manageandorganize":"Manage and organize educational content effortlessly.",
|
||||
"createcourse":"Create Course",
|
||||
"recordsavailable":"Records Available",
|
||||
"all":"All",
|
||||
"selectfilters":"Select Filters",
|
||||
"coursetitle":"Course Title",
|
||||
"entercoursetitle":"Enter Course Title",
|
||||
"status":"Status",
|
||||
"selectstatus":"Select Status",
|
||||
"pricing":"Pricing",
|
||||
"selectpricing":"Select Pricing",
|
||||
"clear":"Clear",
|
||||
"applyfilter":"Apply Filter",
|
||||
"sortby":"Sort By",
|
||||
"lastupdated":"Last Updated",
|
||||
"createddate":"Created Date",
|
||||
"ascending":"Ascending",
|
||||
"descending":"Descending",
|
||||
"createdBy":"Created By",
|
||||
"action":"Action",
|
||||
"lastupdatedon":"Last Updated on ",
|
||||
"createdon":"Created on",
|
||||
"publish":"Publish",
|
||||
"unpublish":"Unpublish",
|
||||
"delete":"Delete",
|
||||
"cancel":"Cancel",
|
||||
"save":"Save",
|
||||
"title":"Title",
|
||||
"enteryourtitle":"Enter Your Title",
|
||||
"titleinfo":"Enter a unique and descriptive title for your course.",
|
||||
"description":"Description",
|
||||
"enteryourdescription":"Enter Your Description",
|
||||
"descriptioninfo":"Provide a detailed summary of the course, highlighting key topics and objectives.",
|
||||
"category":"Category",
|
||||
"categoryinfo":"Select an appropriate category to organize your course for easy discoverability.",
|
||||
"selectcategory":"Select Category",
|
||||
"searchcategory":"Search Category",
|
||||
"uploadcoverimage":"Upload Cover Image",
|
||||
"uploadcoverimageinfo":"Choose an image to visually represent your course.",
|
||||
"browse":"Browse",
|
||||
"uploadnewfiles":"Upload new files or choose from directory",
|
||||
"chooseonly":"Choose only jpg/jpeg/png formats",
|
||||
"nocoursesyet": "No Courses Yet!",
|
||||
"startcreating": "Start creating engaging learning experiences today! Add courses that are of a great learning experiences to your learners.",
|
||||
"deletecourse": "Delete Course?",
|
||||
"areyousure": "Are you sure you want to delete this Course?",
|
||||
"titleerror": "Please Enter Course title",
|
||||
"descriptionerror": "Please Enter Course description",
|
||||
"categoryerror": " Please Select the category",
|
||||
"lesson": "Lesson",
|
||||
"section": "Section",
|
||||
"settings": "Settings",
|
||||
"nolessonsyet": "No Lessons Yet!",
|
||||
"startbuilding": "Start building meaningful learning journeys today. Add lessons that inspire, engage, and educate your learners effectively. ",
|
||||
"createyourfirstlesson": "Create Your First Lesson",
|
||||
"newlesson": "New Lesson",
|
||||
"newSection": "New Section",
|
||||
"addtext": " Add Text",
|
||||
"addembed": "Add Embed",
|
||||
"addquiz": "Add Quiz",
|
||||
"addFiles": "Add Files",
|
||||
"deletelesson": "Delete Lesson?",
|
||||
"areyousurewantlesson": "Are you sure you want to delete this Lesson?",
|
||||
"deletesection": "Delete Section?",
|
||||
"areyousurewantsection": "Are you sure you want to delete this Section?",
|
||||
"createlesson": "Create Lesson",
|
||||
"updatelesson": "Update Lesson",
|
||||
"createsection": "Create Section",
|
||||
"updatesection": "Update Section"
|
||||
},
|
||||
"Coursessettings":{
|
||||
"settings":"Settings",
|
||||
"details":"Details",
|
||||
"title":"Title",
|
||||
"titledesc":"Enter a clear and concise title for the course.",
|
||||
"description":"Description",
|
||||
"desccont":"Provide a detailed overview of the course, including key topics and learning outcomes.",
|
||||
"image":"Image",
|
||||
"imagedesc":"Upload a cover image that represents the course. Choose a high-quality image for better engagement.",
|
||||
"chooseimg":"Choose Image",
|
||||
"category":"Category",
|
||||
"catdesc":"Select the appropriate category to classify the course for easy discovery.",
|
||||
"searchcat":"Seach Categories",
|
||||
"options":"Options",
|
||||
"certificate":"Certificate",
|
||||
"cerdesc":"Enable this option if you want to provide a certificate upon course completion.",
|
||||
"cerstatus":"Provide Certificate for this course",
|
||||
"comments":"Comments",
|
||||
"commentsdesc":"Provide any information about pre-requisites for the study of this course or special instructions to the learners.",
|
||||
"active":"Active",
|
||||
"inactive":"In active",
|
||||
"pricing":"Pricing",
|
||||
"offer":"Offer",
|
||||
"offerdesc":"Select the pricing model for your course - free, waitlist, or paid.",
|
||||
"offerchange":"Change Offer Options",
|
||||
"free":"Free",
|
||||
"freedesc":"The course is available to learners at no cost.",
|
||||
"waitlist":"Waitlist",
|
||||
"waitlistdesc":"Learners can register, but access is provided later.",
|
||||
"paid":"Paid",
|
||||
"paiddesc":"The course requires a payment to enroll.",
|
||||
"availability":"Availability",
|
||||
"status":"Status",
|
||||
"statusdesc":"Set the course as active or inactive.",
|
||||
"visibility":"Visibility",
|
||||
"visibilitydesc":"Define who can view and enroll in the course.",
|
||||
"published":"Published",
|
||||
"unpublish":"Unpublished",
|
||||
"draft":"Draft",
|
||||
"selectvisible":"Select Visibility",
|
||||
"public":"Public",
|
||||
"private":"Private",
|
||||
"startdate":"Start Date",
|
||||
"datedesc":"Set a specific date when the course becomes available.",
|
||||
"singuplimit":"Sign-up limit",
|
||||
"singuplimitdesc":"Specify a maximum number of students allowed for the course.",
|
||||
"enterlimits":"Enter Limits",
|
||||
"duration":"Duration",
|
||||
"durationdesc":"Determine how long the course remains accessible after enrollment.",
|
||||
"selectduration":"Select Duration",
|
||||
"month":"Month",
|
||||
"year":"Year",
|
||||
"visiblityerr":"Please choose visibility",
|
||||
"dateerr":"Please choose specific date",
|
||||
"limiterr":"Please Enter Maximum SignUpLimits",
|
||||
"durationerr":"Please choose Course Duration",
|
||||
"pricemodelerr":"Please Select the pricing model for your course"
|
||||
},
|
||||
"Menu":{
|
||||
"website":"Website",
|
||||
"templates":"Templates",
|
||||
"seo":"SEO",
|
||||
"setting":"Setting",
|
||||
"webdesc":"Customize your website and let your brand shine",
|
||||
"bannertitle":"Powerful Website Management Tools",
|
||||
"bannerdesc":"Easily build and customize your website using intuitive controls and flexible templates. The Website tab lets you organize pages, set up navigation, and ensure your content is always up-to-date—helping you deliver a seamless experience for your visitors.",
|
||||
"menu":"Menu",
|
||||
"menuname":"Menu Name",
|
||||
"totalitems":"Total Items",
|
||||
"status":"Status",
|
||||
"lastmodified":"Last Modified",
|
||||
"action":"Action",
|
||||
"createmenu":"Create Menu",
|
||||
"createnewmenu":"Create New Menu",
|
||||
"description":"Description",
|
||||
"managemenu":"Manage Menu",
|
||||
"managemenudesc":"Manage menu options and settings",
|
||||
"choosemenuitem":"Choose Menu Items",
|
||||
"addmenuitems":"Add Menu Items",
|
||||
"addtomenu":"Add to menu",
|
||||
"mostrecent":"Most recent",
|
||||
"viewall":"View all",
|
||||
"selectall":"Select All",
|
||||
"addmenuitem":"Add Menu Item",
|
||||
"labelname":"Label Name",
|
||||
"labelnameplcholder":"Enter label name",
|
||||
"navigationpath":"Navigation path",
|
||||
"navplcholder":"Give link path",
|
||||
"additem":"Add item",
|
||||
"labelnameerr":"Please Enter Label Name",
|
||||
"linkpatherr":" Please Enter Link Path",
|
||||
"menunameerr":"Please Enter Menu Name",
|
||||
"nameduplicateerr":"Menu Name already exists",
|
||||
"descriptionerror":"Please Enter Menu Description",
|
||||
"namelimiterr":"Please Enter 15 Character only",
|
||||
"pathlimiterr":"Please Enter 30 Character only",
|
||||
"removeconfirmation":"Are you sure you want to remove this Menu",
|
||||
"deletemenu":"Delete Menu",
|
||||
"deselectall":"DeselectAll"
|
||||
},
|
||||
"Seo": {
|
||||
"homepage": "Home Page",
|
||||
"pagetitle": "Page Title",
|
||||
"homepagetitle": "Home Page Title",
|
||||
"pagedescription": "Page Description",
|
||||
"homepagedescription": "Home Page Description",
|
||||
"pagekeyword": "Page Keyword",
|
||||
"homepagekeyword": "Home Page Keyword",
|
||||
"save": "Save",
|
||||
"store": "Store",
|
||||
"storetitle": "Store Title",
|
||||
"storepagetitle": "Store Page Title",
|
||||
"storedescription": "Store Description",
|
||||
"storepagedescription": "Store Page Description",
|
||||
"storekeyword": "Store Keyword",
|
||||
"storepagekeyword": "Store Page Keyword",
|
||||
"sitemap": "SiteMap",
|
||||
"choosefile": "Choose File",
|
||||
"nofilechosen": "No File Chosen",
|
||||
"update": "Update",
|
||||
"pleaseentertitle": "Please Enter Title",
|
||||
"pleaseenterdescripion": "Please Enter Description",
|
||||
"pleaseenterkeyword": "Please Enter Keyword",
|
||||
"titlemustnotexceed55characters": "Title must not exceed 55 characters",
|
||||
"descriptionmustnotexceed155characters": "Description must not exceed 155 characters",
|
||||
"keywordmustnotexceed155characters": "Keyword must not exceed 155 characters",
|
||||
"pleasechooseimage": "Please Choose Image"
|
||||
},
|
||||
"WebsiteSettings": {
|
||||
"sitename": "Site Name",
|
||||
"spurtcms": "SpurtCMS",
|
||||
"sitelogo": "Site Logo",
|
||||
"sitefavicon": "Site FavIcon",
|
||||
"websiteurl": "Website URL",
|
||||
"subdomain": "SubDomain",
|
||||
"spurtcmscom": ".spurtcms.com",
|
||||
"pleaseenteryoursitename": "Please Enter Your SiteName",
|
||||
"maximumlength20": "Maximum length must be 20 characters",
|
||||
"pleaseenteryourwebsiteurl": "Please Enter Your Website URL",
|
||||
"onlylowercaselettersandnumbersareallowed":"Only lowercase letters and numbers are allowed"
|
||||
}
|
||||
}
|
||||
+597
-3
@@ -151,6 +151,9 @@
|
||||
"getsupport": "Get SpurtCMS Pro",
|
||||
"explore": "Explorar",
|
||||
"aiwritingheading": "Genere contenido impulsado por IA con personalización.",
|
||||
"selling": "Venta",
|
||||
"courses": "Cursos",
|
||||
"listing": "Listado",
|
||||
"Toast": {
|
||||
"User Created Successfully": "Usuario creado correctamente",
|
||||
"User Updated Successfully": "La información del usuario se actualizó correctamente",
|
||||
@@ -296,7 +299,32 @@
|
||||
"AI Module Deleted Successfully": "Módulo de IA eliminado correctamente",
|
||||
"IntegrationUpdatedSuccessfully": "Integración actualizada correctamente",
|
||||
"Course Created Successfully": "Curso creado exitosamente",
|
||||
"Course Deleted Successfully": "Curso eliminado correctamente"
|
||||
"Course Deleted Successfully": "Curso eliminado correctamente",
|
||||
"Section Created Successfully": "Sección creada exitosamente",
|
||||
"Section Updated Successfully": "Sección actualizada exitosamente",
|
||||
"Section Deleted Successfully": "Sección eliminada exitosamente",
|
||||
"Lesson Created Successfully": "Lección creada exitosamente",
|
||||
"Lesson Updated Successfully": "Lección actualizada exitosamente",
|
||||
"Lesson Deleted Successfully": "Lección eliminada exitosamente",
|
||||
"Course Published Successfully": "Curso publicado con éxito",
|
||||
"Course Unpublished Successfully": "Curso no publicado exitosamente",
|
||||
"Course Settings Updated Successfully": "Configuración del curso actualizada correctamente",
|
||||
"Integrationreapt": "Esta integración ya existe",
|
||||
"Template Updated Successfully": "Plantilla actualizada exitosamente",
|
||||
"SEO Details Updated Successfully": "Detalles de SEO actualizados con éxito",
|
||||
"Settings Details Updated Successfully": "Detalles de configuración actualizados correctamente",
|
||||
"Menu Created Successfully": "Menú creado con éxito",
|
||||
"Menu Updated Successfully": "Menú actualizado con éxito",
|
||||
"Menu Deleted Successfully": "Menú eliminado con éxito",
|
||||
"Listing Deleted Successfully": "Listado eliminado exitosamente",
|
||||
"Listing Created Successfully": "Listado creado exitosamente",
|
||||
"Listing Updated Successfully": "Listado actualizado exitosamente",
|
||||
"Website Deleted Successfully":"Sitio web eliminado correctamente",
|
||||
"Website Created Successfully":"Sitio web creado con éxito",
|
||||
"Website Updated Successfully":"Sitio web actualizado exitosamente",
|
||||
"Page Created Successfully":"Página creada con éxito",
|
||||
"Page Updated Successfully":"Página actualizada correctamente",
|
||||
"Page Deleted Successfully":"Página eliminada correctamente"
|
||||
},
|
||||
"Setting": {
|
||||
"title": "Ajustes",
|
||||
@@ -383,7 +411,8 @@
|
||||
"usernamelable": "El nombre de usuario que se utilizará para iniciar sesión",
|
||||
"rolelable": "Su rol en el sistema, asignado por el administrador, que define su nivel de acceso",
|
||||
"emaillable": "Su dirección de correo electrónico registrada para fines de comunicación e inicio de sesión",
|
||||
"mobilelable": "Su número de teléfono que se utilizará para contacto y comunicación"
|
||||
"mobilelable": "Su número de teléfono que se utilizará para contacto y comunicación",
|
||||
"aimodule": "Configuración del módulo de IA"
|
||||
},
|
||||
"Permission": {
|
||||
"assigntotherole": "asignar al rol",
|
||||
@@ -1129,7 +1158,7 @@
|
||||
"channels": "Canales",
|
||||
"accesstomembergroups": "Acceso a grupos de miembros",
|
||||
"spaces": "Espacios",
|
||||
"content": "Contenido",
|
||||
"content": "Bibliotecas de contenido",
|
||||
"titleerr": "¡Este campo es obligatorio!",
|
||||
"plmemtitle": "Título de acceso de miembro",
|
||||
"contentdesc": "Seleccione un canal para configurar el acceso de los miembros.",
|
||||
@@ -1778,5 +1807,570 @@
|
||||
"validateWebhookName": "Ingrese un nombre de webhook sin caracteres especiales y sin espacios iniciales ni finales",
|
||||
"validateWebhookUrl": "Por favor, introduzca una URL de solicitud válidal"
|
||||
}
|
||||
},
|
||||
"memberships": {
|
||||
"membershiphead": "Membresía",
|
||||
"membershipheaddesc": "Controlar el acceso y los permisos de los miembros.",
|
||||
"membershipmember": "Miembro",
|
||||
"membershipgroup": "Grupo de miembros",
|
||||
"membershiplevel": "Nivel de membresía",
|
||||
"membershipsubscription": "Suscripción",
|
||||
"membershiporders": "Pedidos",
|
||||
"recordsavailable": "Registros disponibles",
|
||||
"recordavailable": "Registro disponible",
|
||||
"member": {
|
||||
"recordsavailable": "Miembros disponibles",
|
||||
"recordavailable": "Miembro disponible",
|
||||
"createMember": "Crear miembro",
|
||||
"updateMember": "Actualizar miembro",
|
||||
"selectfilters": "Seleccionar filtros",
|
||||
"createdon": "Fecha de creación",
|
||||
"clear": "Borrar",
|
||||
"applyfilter": "Aplicar filtro",
|
||||
"searchplacehoder": "Buscar (Ctrl + “k” para enfocar)",
|
||||
"id": "ID",
|
||||
"name": "Nombre",
|
||||
"email": "Correo electrónico",
|
||||
"level": "Nivel",
|
||||
"subscription": "Suscripción",
|
||||
"startdate": "Fecha de inicio",
|
||||
"enddate": "Fecha de finalización",
|
||||
"status": "Estado",
|
||||
"action": "Acción",
|
||||
"edit": "Editar",
|
||||
"delete": "Eliminar",
|
||||
"memberemptytitle": "¿Aún no hay miembros?",
|
||||
"memberemptydesc": "¡No se encontraron miembros! Añade miembros, gestiona a cada miembro y asígnales los niveles de acceso adecuados para una distribución fluida de contenido.",
|
||||
"cancel": "Cancelar",
|
||||
"save": "Guardar",
|
||||
"active": "Activo",
|
||||
"firstname": "Nombre",
|
||||
"firstnameplacceholder": "Introduce el nombre del miembro",
|
||||
"lastname": "Apellido",
|
||||
"lastnameplacceholder": "Introduce el apellido del miembro",
|
||||
"emailplacceholder": "Introduce la dirección de correo electrónico del miembro",
|
||||
"mobile": "Número de móvil",
|
||||
"mobileplacehoder": "Introduce el número de móvil del miembro",
|
||||
"username": "Nombre de usuario",
|
||||
"usernameplacehoder": "Introduce el nombre de usuario del miembro",
|
||||
"password": "Contraseña",
|
||||
"passwordplacehoder": "Introduce la contraseña del miembro",
|
||||
"firstnameinfo": "Ingrese el nombre del miembro tal como debe aparecer en los registros.",
|
||||
"lastnameinfo": "Proporcione el apellido del miembro para una correcta identificación.",
|
||||
"emailinfo": "Agregue la dirección de correo electrónico del miembro para comunicarse e iniciar sesión.",
|
||||
"mobileinfo": "Ingrese un número de teléfono válido para verificación y contacto.",
|
||||
"usernameinfo": "Cree un nombre de usuario único para que el miembro inicie sesión.",
|
||||
"passwordinfo": "Establezca una contraseña segura para el acceso y la seguridad de la cuenta.",
|
||||
"deletemember": "¿Eliminar miembro?",
|
||||
"areyousure": "Estás seguro de que quieres eliminar a este miembro",
|
||||
"deletemembers": "¿Eliminar miembros?",
|
||||
"areyousures": "Estás seguro de que quieres eliminar a este miembros"
|
||||
},
|
||||
"membershipgroups": {
|
||||
"recordsavailable": "Grupos de membresía disponibles",
|
||||
"recordavailable": "Grupo de membresía disponible",
|
||||
"createMembersiphgroup": "Crear grupo de miembros",
|
||||
"updateMembersiphgroup": "Actualizar grupo de miembros",
|
||||
"selectfilters": "Seleccionar filtros",
|
||||
"lastupdatedon": "Última actualización",
|
||||
"clear": "Borrar",
|
||||
"applyfilter": "Aplicar filtro",
|
||||
"status": "Estado",
|
||||
"active": "Activo",
|
||||
"inactive": "Inactivo",
|
||||
"searchplacehoder": "Buscar (Ctrl + “k” para enfocar)",
|
||||
"group": "Grupo",
|
||||
"description": "Descripción",
|
||||
"action": "Acción",
|
||||
"membershipgroupemptytitle": "¿Aún no hay grupos de nivel de membresía?",
|
||||
"membershipgroupemptydesc": "¡No se encontraron grupos de nivel de membresía! Crea grupos para categorizar los diferentes niveles de membresía y optimizar la gestión de permisos.",
|
||||
"cancel": "Cancelar",
|
||||
"save": "Guardar",
|
||||
"groupname": "Nombre del grupo",
|
||||
"groupnameinfo": "Ingrese un nombre único para el grupo de nivel de membresía.",
|
||||
"groupnameplacehoder": "Ingrese el nombre de su grupo.",
|
||||
"groupnamedesc": "Descripción.",
|
||||
"groupnamedescinfo": "Proporcione una breve descripción del grupo de membresía para una mejor identificación y gestión.",
|
||||
"groupnamedescplacehoder": "Ingrese la descripción de su grupo.",
|
||||
"deletemembergroup": "Eliminar el grupo de nivel de membresía",
|
||||
"areyousure": "Está seguro de que desea eliminar este grupo de nivel de membresía"
|
||||
},
|
||||
"membershiplevels": {
|
||||
"create": "Crear nivel de membresía",
|
||||
"membershipavailable": "Nivel de membresía disponible",
|
||||
"membershipavailables": "Niveles de membresía disponibles",
|
||||
"id": "ID",
|
||||
"level": "Nivel",
|
||||
"fee": "Tarifa",
|
||||
"status": "Estado",
|
||||
"action": "Acción",
|
||||
"edit": "Editar",
|
||||
"delete": "Eliminar",
|
||||
"cancel": "Cancelar",
|
||||
"save": "Guardar",
|
||||
"basicinfo": "Información básica",
|
||||
"basicinfodesc": "Definir los detalles de la membresía, incluyendo nombre, tipo y grupos asociados.",
|
||||
"name": "Nombre",
|
||||
"nameinfo": "Introducir un nombre único para el nivel de membresía.",
|
||||
"selectmembership": "Seleccionar membresía",
|
||||
"selectmembershipinfo": "Elegir una plantilla de membresía para definir la estructura de este nivel.",
|
||||
"selectmembershipplaceholde": "Plantilla de membresía",
|
||||
"selectmembershiplevelgroup": "Seleccionar grupo de nivel de membresía",
|
||||
"selectmembershiplevelgroupinfo": "Asignar este nivel a un grupo de nivel de membresía específico",
|
||||
"selectmembershiplevelgroupplaceholder": "Grupo de nivel de membresía",
|
||||
"message": "Detalles del nivel de membresía",
|
||||
"messageinfo": "Añadir una descripción o mensaje para proporcionar detalles sobre este nivel de membresía",
|
||||
"billingdetails": "Detalles de facturación",
|
||||
"billingdetailsdesc": "Configurar las condiciones de pago, la facturación recurrente y las opciones de prueba",
|
||||
"initialpayment": "Pago inicial",
|
||||
"initialpaymentinfo": "El importe cobrado al registrarse para este nivel de membresía",
|
||||
"initialpaymentdesc": "El importe inicial cobrado al registrarse",
|
||||
"recurringsubscription": "Suscripción recurrente",
|
||||
"recurringsubscriptioninfo": "Habilitar esta opción si esta membresía implica pagos recurrentes",
|
||||
"recurringsubscriptiondesc": "Comprobar si este nivel tiene un pago de suscripción recurrente",
|
||||
"billingamount": "Importe de facturación",
|
||||
"billingamountinfo": "Establecer la cuota de suscripción para pagos recurrentes.",
|
||||
"billingamountdesc": "Importe inicial cobrado al registrarse",
|
||||
"per": "Por",
|
||||
"day": "Día(s)",
|
||||
"week": "Semana(s)",
|
||||
"year": "Año(s)",
|
||||
"month": "Mes(s)",
|
||||
"billingcyclelimit": "Límite del ciclo de facturación",
|
||||
"billingcyclelimitinfo": "Definir la duración o el número de ciclos de facturación antes del vencimiento de la membresía.",
|
||||
"billingcyclelimitdesc": "Establecer el número de ciclos de facturación antes de la renovación.",
|
||||
"customtrial": "Prueba personalizada",
|
||||
"customtrialinfo": "Habilitar y establecer un periodo de prueba para nuevos miembros antes de que comience la facturación regular.",
|
||||
"customtrialdesc": "Marcar para añadir un periodo de prueba personalizado.",
|
||||
"trailbillingamount": "Importe de facturación de prueba",
|
||||
"trailbillingamountinfo": "Especificar el importe a cobrar Durante el periodo de prueba.",
|
||||
"trailbillingamountdesc": "El importe inicial cobrado al registrarse",
|
||||
"forthefirst": "Para el primero",
|
||||
"subscriptionpayment": "Pago de la suscripción",
|
||||
"membershiplevelemptytitle": "¿No se encontraron niveles de membresía?",
|
||||
"membershiplevelemptydesc": "¡No se encontraron niveles de membresía! Define y personaliza los niveles de membresía con diferentes niveles de acceso y planes de suscripción.",
|
||||
"deletemembershiplevel": "Eliminar nivel de membresía",
|
||||
"areyousure": "Estás seguro de que deseas eliminar este nivel de membresía",
|
||||
"membershipdesc": "Descripción"
|
||||
},
|
||||
"subscriptions": {
|
||||
"create": "Crear suscripción",
|
||||
"subscriptionavailable": "Suscripción disponible",
|
||||
"subscriptionavailables": "Suscripciones disponibles",
|
||||
"subcriptionid": "ID de suscripción",
|
||||
"user": "Usuario",
|
||||
"level": "Nivel",
|
||||
"fee": "Tarifa",
|
||||
"gateway": "Puerta de enlace",
|
||||
"paymenton": "Pago realizado",
|
||||
"status": "Estado",
|
||||
"action": "Acción",
|
||||
"edit": "Editar",
|
||||
"delete": "Eliminar",
|
||||
"cancel": "Cancelar",
|
||||
"save": "Guardar",
|
||||
"subscriptionemptytitle": "¿No se encontraron suscripciones?",
|
||||
"subscriptionemptydesc": "¡No se encontraron suscripciones! Vincula a los miembros a planes de suscripción para administrar el acceso y ofrecer contenido exclusivo.",
|
||||
"selectgateway": "Seleccionar puerta de enlace",
|
||||
"membershiplevel": "Nivel de membresía",
|
||||
"selectlevel": "Seleccionar nivel",
|
||||
"subscriptiontransactionid": "Suscripción ID de transacción",
|
||||
"entertransactionid": "Ingresar ID de transacción",
|
||||
"linksubscription": "Vincular suscripción al acceso de miembros",
|
||||
"linksubscriptiondesc": "Conecta fácilmente las suscripciones de los usuarios con el control de acceso y los permisos para una gestión eficiente de las membresías. Para proporcionar acceso sin problemas a contenido exclusivo o servicios de membresía.",
|
||||
"subscriptiontransactionidinfo": "Identificador único de la transacción de suscripción para seguimiento y referencia.",
|
||||
"subscriptiontransactioniddesc": "p. ej. El ID de transacción vinculado a un pago basado en suscripción.",
|
||||
"gatewayinfo": "Seleccione la pasarela de pago utilizada para procesar la suscripción.",
|
||||
"gatewayenvironment": "Entorno de la pasarela.",
|
||||
"gatewayenvironmentinfo": "Elija entre el modo en vivo o de prueba para configurar el procesamiento de la suscripción.",
|
||||
"memberid": "ID de miembro.",
|
||||
"memberidinfo": "Ingrese el identificador único de usuario para asociar la suscripción con un miembro específico.",
|
||||
"membershiplevelid": "ID del nivel de membresía.",
|
||||
"membershiplevelidinfo": "Seleccione el plan o nivel de membresía asignado al usuario para el control de acceso.",
|
||||
"selectmember": "Seleccionar miembro.",
|
||||
"transactionid": "ID de la transacción",
|
||||
"transactionidinfo": "Identificador único de la transacción de suscripción para seguimiento y referencia.",
|
||||
"Deletesubscription": "¿Eliminar suscripción?",
|
||||
"Deletesubscriptions": "¿Eliminar suscripciones?",
|
||||
"areyousure": "¿Seguro que desea eliminar esta suscripción?",
|
||||
"areyousures": "¿Seguro que desea eliminar estas suscripciones?"
|
||||
},
|
||||
"orders": {
|
||||
"create": "Crear pedido",
|
||||
"orderavailable": "Pedido disponible",
|
||||
"orderavailables": "Pedidos disponibles",
|
||||
"orderid": "ID del pedido",
|
||||
"user": "Usuario",
|
||||
"level": "Nivel",
|
||||
"total": "Total",
|
||||
"gateway": "Puerta de enlace",
|
||||
"paymenton": "Pago realizado",
|
||||
"subscriptiontransactionid": "ID de la transacción de suscripción",
|
||||
"status": "Estado",
|
||||
"action": "Acción",
|
||||
"edit": "Editar",
|
||||
"delete": "Eliminar",
|
||||
"cancel": "Cancelar",
|
||||
"save": "Guardar",
|
||||
"orderemptytitle": "¿No se encontraron pedidos de membresía?",
|
||||
"orderemptydesc": "¡No se encontraron pedidos de membresía! Rastrea y gestiona las transacciones relacionadas con la membresía de forma eficiente con detalles de pedidos estructurados.",
|
||||
"enterorderid": "Introduce el ID del pedido",
|
||||
"entertransactionid": "Introduce el ID de la transacción",
|
||||
"membershiplevel": "Nivel de membresía",
|
||||
"selectlevel": "Seleccionar nivel",
|
||||
"memberinformation": "Información del miembro",
|
||||
"memberinformationdesc": "Asignar usuarios a niveles de membresía para acceso y beneficios.",
|
||||
"userid": "Usuario",
|
||||
"useridinfo": "Ingrese el ID único del miembro que realiza el pedido.",
|
||||
"membershiplevelid": "Nivel de membresía",
|
||||
"membershiplevelidinfo": "Seleccione el nivel de membresía asignado al usuario.",
|
||||
"selectmember": "Seleccionar miembro",
|
||||
"selectmembershiplevel": "Seleccionar nivel de membresía",
|
||||
"searchmembershiplevel": "Buscar nivel de membresía",
|
||||
"billingaddress": "Dirección de facturación",
|
||||
"billingaddressdesc": "Ingrese los datos de facturación asociados a la membresía o compra.",
|
||||
"billingname": "Nombre de facturación",
|
||||
"billingnameinfo": "Ingrese el nombre de la persona o empresa a la que se facturará.",
|
||||
"billingstreet": "Calle de facturación",
|
||||
"billingstreetinfo": "Proporcione la dirección postal principal para la facturación.",
|
||||
"billingstreet2": "Calle de facturación 2",
|
||||
"billingstreetinfo2": "(Opcional) Introduzca detalles adicionales de la calle si es necesario.",
|
||||
"billingcity": "Ciudad de facturación",
|
||||
"billingcityinfo": "Especifique la ciudad para la dirección de facturación.",
|
||||
"billingstate": "Estado de facturación",
|
||||
"billingstateinfo": "Seleccione o introduzca el estado para la dirección de facturación.",
|
||||
"billingpostelcode": "Código postal de facturación",
|
||||
"billingpostelcodeinfo": "Proporcione el código postal para una facturación precisa.",
|
||||
"billingcounty": "Condado de facturación",
|
||||
"billingcountyinfo": "Seleccione el país para la dirección de facturación.",
|
||||
"billingphone": "Teléfono de facturación",
|
||||
"billingphoneinfo": "Introduzca el número de teléfono de contacto para consultas relacionadas con la facturación.",
|
||||
"paymentinformation": "Información del pago",
|
||||
"paymentinformationdesc": "Ver y gestionar los detalles del pago, incluyendo el importe total y el tipo de pago.",
|
||||
"subtotal": "Subtotal",
|
||||
"subtotalinfo": "Importe total antes de impuestos y cargos adicionales.",
|
||||
"tax": "Impuestos",
|
||||
"taxinfo": "Importe de impuestos aplicable calculado sobre el subtotal.",
|
||||
"totalinfo": "Importe final a pagar, incluyendo subtotal e impuestos.",
|
||||
"entertotalamount": "Ingrese el importe total",
|
||||
"paymenttype": "Tipo de pago",
|
||||
"paymenttypeinfo": "Especifique el método de pago (p. ej., PayPal, Stripe, RazorPay, UPI, etc.)",
|
||||
"enterpaymenttype": "Ingrese el tipo de pago",
|
||||
"paymenttypedesc": "Describa el método de pago utilizado.",
|
||||
"statusinfo": "Establezca el estado actual del pedido (p. ej., pendiente, completado, cancelado).",
|
||||
"success": "Éxito",
|
||||
"failed": "Error",
|
||||
"paymentgatewayinformation": "Información de la pasarela de pago",
|
||||
"paymentgatewayinformationdesc": "Almacene los detalles de la transacción vinculados a la pasarela de pago seleccionada.",
|
||||
"gatewayinfo": "Seleccione la pasarela de pago utilizada para procesar la transacción.",
|
||||
"gatewayenvironment": "Entorno de la pasarela",
|
||||
"gatewayenvironmentinfo": "Elija entre el modo en vivo o de prueba para las transacciones.",
|
||||
"paymenttransactionid": "ID de la transacción de pago",
|
||||
"paymenttransactionidinfo": "Ingrese o recupere el ID único generado por la pasarela de pago.",
|
||||
"paymenttransactioniddesc": "Generado por la pasarela. Útil para comparar pedidos.",
|
||||
"subscriptiontransactionidinfo": "El ID de la transacción vinculado a un pago basado en suscripción.",
|
||||
"subscriptiontransactioniddesc": "Generado por la pasarela. Útil para comparar la suscripción.",
|
||||
"selectgateway": "Seleccionar pasarela",
|
||||
"selectgatewayenvironment": "Seleccionar entorno de la pasarela",
|
||||
"Deletemembershiporder": "¿Eliminar pedido de membresía?",
|
||||
"areyousure": "¿Está seguro de que desea eliminar este pedido de membresía?",
|
||||
"Deletemembershiporders": "¿Eliminar pedidos de membresía?",
|
||||
"areyousures": "¿Está seguro de que desea eliminar estos pedidos de membresía?"
|
||||
}
|
||||
},
|
||||
"integrations": {
|
||||
"integration": "Integración",
|
||||
"headtitle": "SpurtCMS Pro v1.2 – Código + Soporte",
|
||||
"title": "Toma el control total de tu CMS con SpurtCMS Pro v1.2, implementado directamente en tu servidor con funciones premium y beneficios de por vida.",
|
||||
"keypoint1": "Todo lo que ves en la demo: para siempre",
|
||||
"keypoint2": "Actualizaciones de por vida: mantente a la vanguardia",
|
||||
"keypoint3": "30 horas de soporte para desarrolladores: implementación sin complicaciones",
|
||||
"keypoint4": "Marca blanca completa: personalízalo",
|
||||
"keypoint5": "Plantillas exclusivas de Next.js: acceso gratuito",
|
||||
"keypoint6": "Consulta con expertos: prepara tu negocio para el futuro",
|
||||
"keypoint7": "Obtener el código fuente completo",
|
||||
"cloudtite": "SpurtCMS Pro v1.2 Desarrollado con tecnología",
|
||||
"deschead": "Preguntas frecuentes sobre precios: SpurtCMS Pro v1.2",
|
||||
"list1": "¿Qué obtengo con mi compra?",
|
||||
"sublist1": "Recibirás la versión completa de SpurtCMS Pro v1.2, tal como se muestra en la demo. Incluye actualizaciones de por vida, 30 horas de soporte para desarrolladores, marca blanca y acceso a todas las plantillas gratuitas de Next.js.",
|
||||
"list2": "¿Hay un modelo de pago único o de suscripción?",
|
||||
"sublist2": "Ofrecemos un modelo de pago único. Paga una vez y disfruta de beneficios de por vida, incluyendo futuras actualizaciones y asesoramiento de expertos.",
|
||||
"list3": "¿Ofrecen una prueba o demo gratuita?",
|
||||
"sublist3": "¡Sí! Puedes probar nuestra demo completamente funcional antes de realizar la compra. Lo que ves en la demo es exactamente lo que obtendrás.",
|
||||
"list4": "¿Puedo obtener un reembolso si no estoy satisfecho?",
|
||||
"sublist4": "Debido a la naturaleza de los productos digitales, no ofrecemos reembolsos una vez descargado el producto. Sin embargo, ofrecemos una versión demo para que pueda evaluarla antes de comprarla.",
|
||||
"list5": "¿Qué incluye el soporte de 30 horas para desarrolladores?",
|
||||
"sublist5": "Nuestros desarrolladores le ayudarán con:",
|
||||
"sublist6": "Instalación e implementación en su servidor",
|
||||
"sublist7": "Configuración básica",
|
||||
"sublist8": "Corrección de errores menores y optimizaciones",
|
||||
"sublist9": "Orientación sobre personalización",
|
||||
"sublist10": "Más allá de las 30 horas, hay soporte adicional disponible por hora.",
|
||||
"list6": "¿Puedo usar SpurtCMS Pro v1.2 para varios proyectos?",
|
||||
"sublist11": "Su compra incluye una licencia de un solo uso para un dominio/proyecto. Para proyectos múltiples, se requieren licencias adicionales.",
|
||||
"list7": "¿Cómo funciona la marca blanca?",
|
||||
"sublist12": "Puede renovar completamente la marca de SpurtCMS Pro v1.2 modificando el logotipo, los colores, el nombre de la marca y otros elementos visuales para que coincidan con la identidad de su empresa.",
|
||||
"list8": "¿Puedo desarrollar funciones personalizadas?",
|
||||
"sublist13": "¡Sí! Ofrecemos servicios de consultoría y personalización. Si necesita funciones adicionales, nuestro equipo de desarrollo puede crearlas por usted a un precio personalizado.",
|
||||
"list9": "¿Qué métodos de pago aceptan?",
|
||||
"sublist14": "Aceptamos tarjetas de crédito/débito, PayPal y transferencias bancarias. Contáctanos si necesitas opciones de pago alternativas.",
|
||||
"list10": "¿Cómo empiezo después de comprar?",
|
||||
"sublist15": "Después de completar tu compra, recibirás:",
|
||||
"sublist16": "Un enlace de descarga para SpurtCMS Pro v1.2",
|
||||
"sublist17": "Una guía de configuración detallada",
|
||||
"sublist18": "Acceso a nuestro equipo de soporte para desarrolladores para ayudarte con la instalación"
|
||||
},
|
||||
"AImodulesettings": {
|
||||
"cancel": "Cancelar",
|
||||
"save": "Guardar",
|
||||
"create": "Crear nuevo módulo de IA",
|
||||
"aimodule": "Módulo de IA",
|
||||
"description": "Descripción",
|
||||
"lastupdatedon": "Última actualización el",
|
||||
"status": "Estado",
|
||||
"model": "Modelo",
|
||||
"action": "Acción",
|
||||
"edit": "Editar",
|
||||
"delete": "Eliminar",
|
||||
"aiemptytitle": "¿No se encontró ningún módulo de configuración de IA?",
|
||||
"aiemptydesc": "Mejore su sistema con automatización e inteligencia basadas en IA. Elija un proveedor, configure los ajustes y ¡comience hoy mismo!",
|
||||
"selectmodule": "Seleccionar módulo",
|
||||
"selectmoduledesc": "Integre fácilmente las capacidades de IA seleccionando un módulo, añadiendo una clave API y definiendo el modelo de IA.",
|
||||
"openai": "Abrir IA",
|
||||
"openaidesc": "Utilice procesamiento de lenguaje natural de última generación para Creación automatizada de contenido y respuestas inteligentes.",
|
||||
"google": "Google",
|
||||
"googledesc": "Aprovecha las herramientas de Google basadas en IA para el análisis de texto, la creación de contenido y la automatización.",
|
||||
"deepseek": "Búsqueda profunda",
|
||||
"deepseekdesc": "Aprovecha las capacidades de aprendizaje profundo para el procesamiento avanzado de datos y la información basada en IA.",
|
||||
"apikey": "Clave API",
|
||||
"apikeyplaceholder": "Introduce la clave API",
|
||||
"descriptionplaceholder": "Introduce la descripción",
|
||||
"aimodel": "Modelo de IA",
|
||||
"selectaimodel": "Selecciona el modelo de IA",
|
||||
"aimodelerr": "Seleccione el modelo de IA"
|
||||
},
|
||||
"Securitys": {
|
||||
"security": "Seguridad",
|
||||
"changepassword": "Cambiar contraseña",
|
||||
"changepassworddesc": "Actualiza tu contraseña actual para mejorar la seguridad de tu cuenta.",
|
||||
"newpassword": "Nueva contraseña",
|
||||
"confirmpassword": "Confirmar contraseña",
|
||||
"cancel": "Cancelar",
|
||||
"save": "Guardar",
|
||||
"newpasswordinfo": "Ingresa una contraseña nueva y segura siguiendo las pautas de seguridad requeridas.",
|
||||
"confirmpasswordinfo": "Vuelve a ingresar la nueva contraseña para garantizar su precisión y evitar errores."
|
||||
},
|
||||
"Course": {
|
||||
"course": "Curso",
|
||||
"manageandorganize": "Administra y organiza el contenido educativo sin esfuerzo.",
|
||||
"createcourse": "Crear Curso",
|
||||
"recordsavailable": "Registros Disponibles",
|
||||
"all": "Todos",
|
||||
"selectfilters": "Seleccionar Filtros",
|
||||
"coursetitle": "Título del Curso",
|
||||
"entercoursetitle": "Ingresa el Título del Curso",
|
||||
"status": "Estado",
|
||||
"selectstatus": "Seleccionar Estado",
|
||||
"pricing": "Precio",
|
||||
"selectpricing": "Seleccionar Precio",
|
||||
"clear": "Limpiar",
|
||||
"applyfilter": "Aplicar Filtro",
|
||||
"sortby": "Ordenar Por",
|
||||
"lastupdated": "Última Actualización",
|
||||
"createddate": "Fecha de Creación",
|
||||
"ascending": "Ascendente",
|
||||
"descending": "Descendente",
|
||||
"createdBy": "Creado Por",
|
||||
"action": "Acción",
|
||||
"lastupdatedon": "Última actualización el ",
|
||||
"createdon": "Creado el:",
|
||||
"publish": "Publicar",
|
||||
"unpublish": "Despublicar",
|
||||
"delete": "Eliminar",
|
||||
"cancel": "Cancelar",
|
||||
"save": "Guardar",
|
||||
"title": "Título",
|
||||
"enteryourtitle": "Ingresa tu Título",
|
||||
"titleinfo": "Ingresa un título único y descriptivo para tu curso.",
|
||||
"description": "Descripción",
|
||||
"enteryourdescription": "Ingresa tu Descripción",
|
||||
"descriptioninfo": "Proporciona un resumen detallado del curso, destacando los temas y objetivos clave.",
|
||||
"category": "Categoría",
|
||||
"categoryinfo": "Selecciona una categoría apropiada para organizar tu curso y facilitar su descubrimiento.",
|
||||
"selectcategory": "Seleccionar Categoría",
|
||||
"searchcategory": "Buscar Categoría",
|
||||
"uploadcoverimage": "Subir Imagen de Portada",
|
||||
"uploadcoverimageinfo": "Elige una imagen para representar visualmente tu curso.",
|
||||
"browse": "Explorar",
|
||||
"uploadnewfiles": "Sube nuevos archivos o elige del directorio",
|
||||
"chooseonly": "Solo se permiten formatos jpg/jpeg/png",
|
||||
"nocoursesyet": "¡Aún no hay cursos!",
|
||||
"startcreating": "¡Comienza a crear experiencias de aprendizaje atractivas hoy mismo! Agrega cursos que ofrezcan grandes experiencias a tus estudiantes.",
|
||||
"deletecourse": "¿Eliminar curso?",
|
||||
"areyousure": "¿Estás seguro de que deseas eliminar este curso?",
|
||||
"titleerror": "Por favor, ingresa el título del curso",
|
||||
"descriptionerror": "Por favor, ingresa la descripción del curso",
|
||||
"categoryerror": "Por favor, selecciona una categoría",
|
||||
"lesson": "Lección",
|
||||
"section": "sección",
|
||||
"settings": "Configuraciones",
|
||||
"nolessonsyet": "¡Aún no hay lecciones!",
|
||||
"startbuilding": "Comienza hoy a construir recorridos de aprendizaje significativos. Agrega lecciones que inspiren, involucren y eduquen eficazmente a tus alumnos.",
|
||||
"createyourfirstlesson": "Crea Tu Primera Lección",
|
||||
"newlesson": "Nueva Lección",
|
||||
"newSection": "Nueva Sección",
|
||||
"addtext": "Agregar Texto",
|
||||
"addembed": "Agregar Integración",
|
||||
"addquiz": "Agregar Cuestionario",
|
||||
"addFiles": "Agregar Archivos",
|
||||
"deletelesson": "¿Eliminar lección?",
|
||||
"areyousurewantlesson": "¿Estás seguro de que deseas eliminar esta lección?",
|
||||
"deletesection": "¿Eliminar sección?",
|
||||
"areyousurewantsection": "¿Estás seguro de que deseas eliminar esta sección?",
|
||||
"createlesson": "Crear Lección",
|
||||
"updatelesson": "Actualizar Lección",
|
||||
"createsection": "Crear Sección",
|
||||
"updatesection": "Actualizar Sección"
|
||||
},
|
||||
"Coursessettings": {
|
||||
"settings": "Ajustes",
|
||||
"details": "Detalles",
|
||||
"title": "Título",
|
||||
"titledesc": "Introduzca un título claro y conciso para el curso.",
|
||||
"description": "Descripción",
|
||||
"desccont": "Proporcione una descripción detallada del curso, incluidos temas clave y resultados de aprendizaje.",
|
||||
"image": "Imagen",
|
||||
"imagedesc": "Sube una imagen de portada que represente el curso. Elija una imagen de alta calidad para una mejor participación.",
|
||||
"chooseimg": "Elige Imagen",
|
||||
"category": "Categoría",
|
||||
"catdesc": "Seleccione la categoría adecuada para clasificar el curso y facilitar su descubrimiento.",
|
||||
"searchcat": "Buscar categorías",
|
||||
"options": "Opciones",
|
||||
"certificate": "Certificado",
|
||||
"cerdesc": "Habilite esta opción si desea proporcionar un certificado al finalizar el curso.",
|
||||
"cerstatus": "Proporcionar certificado para este curso.",
|
||||
"comments": "Comentarios",
|
||||
"commentsdesc": "Proporcione cualquier información sobre los requisitos previos para el estudio de este curso o instrucciones especiales a los alumnos.",
|
||||
"active": "Activa",
|
||||
"inactive": "En activo",
|
||||
"pricing": "Precios",
|
||||
"offer": "Oferta",
|
||||
"offerdesc": "Seleccione el modelo de precios para su curso: gratuito, en lista de espera o de pago.",
|
||||
"offerchange": "Cambiar opciones de oferta",
|
||||
"free": "Gratis",
|
||||
"freedesc": "El curso está disponible para los estudiantes sin costo alguno.",
|
||||
"waitlist": "Lista de espera",
|
||||
"waitlistdesc": "Los estudiantes pueden registrarse, pero el acceso se proporciona más tarde.",
|
||||
"paid": "Pagada",
|
||||
"paiddesc": "El curso requiere un pago para inscribirse.",
|
||||
"availability": "Disponibilidad",
|
||||
"status": "Estado",
|
||||
"statusdesc": "Establezca el curso como activa o inactiva",
|
||||
"visibility": "Visibilidad",
|
||||
"visibilitydesc": "Defina quién puede ver e inscribirse en el curso.",
|
||||
"published": "Publicada",
|
||||
"unpublish": "Inédita",
|
||||
"draft": "Borrador",
|
||||
"selectvisible": "Seleccionar visibilidad",
|
||||
"public": "Pública",
|
||||
"private": "Privada",
|
||||
"startdate": "Fecha de inicio",
|
||||
"datedesc": "Establece una fecha específica en la que el curso esté disponible.",
|
||||
"singuplimit": "Límite de registro",
|
||||
"singuplimitdesc": "Especifique un número máximo de estudiantes permitidos para el curso.",
|
||||
"enterlimits": "Introducir límites",
|
||||
"duration": "Duración",
|
||||
"durationdesc": "Determine cuánto tiempo permanece accesible el curso después de la inscripción.",
|
||||
"selectduration": "Seleccionar duración",
|
||||
"month": "Mes",
|
||||
"year": "Año",
|
||||
"visiblityerr": "Por favor elige visibilidad",
|
||||
"dateerr": "Por favor elija una fecha específica",
|
||||
"limiterr": "Ingrese los límites máximos de registro",
|
||||
"durationerr": "Por favor elija la duración del curso",
|
||||
"pricemodelerr": "Seleccione el modelo de precios para su curso."
|
||||
},
|
||||
"Menu": {
|
||||
"website": "Sitio web",
|
||||
"templates": "Plantillas",
|
||||
"seo": "SEO",
|
||||
"setting": "Configuración",
|
||||
"webdesc": "Personaliza tu sitio web y haz que tu marca destaque",
|
||||
"bannertitle": "Potentes herramientas de gestión de sitios web",
|
||||
"bannerdesc": "Crea y personaliza fácilmente tu sitio web usando controles intuitivos y plantillas flexibles. La pestaña Sitio web te permite organizar páginas, configurar la navegación y asegurar que tu contenido esté siempre actualizado, ayudándote a ofrecer una experiencia perfecta a tus visitantes.",
|
||||
"menu": "Menú",
|
||||
"menuname": "Nombre del Menú",
|
||||
"totalitems": "Total de Artículos",
|
||||
"status": "Estado",
|
||||
"lastmodified": "Última Modificación",
|
||||
"action": "Acción",
|
||||
"createmenu": "Crear Menú",
|
||||
"createnewmenu": "Crear Nuevo Menú",
|
||||
"description": "Descripción",
|
||||
"managemenu": "Gestionar Menú",
|
||||
"managemenudesc": "Gestiona las opciones y configuraciones del menú",
|
||||
"choosemenuitem": "Elegir Elementos del Menú",
|
||||
"addmenuitems": "Agregar Elementos al Menú",
|
||||
"addtomenu": "Agregar al menú",
|
||||
"mostrecent": "Más reciente",
|
||||
"viewall": "Ver todo",
|
||||
"selectall": "Seleccionar todo",
|
||||
"addmenuitem": "Agregar Elemento al Menú",
|
||||
"labelname": "Nombre de la Etiqueta",
|
||||
"labelnameplcholder": "Ingrese el nombre de la etiqueta",
|
||||
"navigationpath": "Ruta de navegación",
|
||||
"navplcholder": "Ingrese la ruta del enlace",
|
||||
"additem": "Agregar elemento",
|
||||
"labelnameerr": "Por favor, ingrese el nombre de la etiqueta",
|
||||
"linkpatherr": "Por favor, ingrese la ruta del enlace",
|
||||
"menunameerr": "Por favor, ingrese el nombre del menú",
|
||||
"nameduplicateerr": "El nombre del menú ya existe",
|
||||
"descriptionerror": "Por favor, ingrese la descripción del menú",
|
||||
"namelimiterr": "Por favor, ingrese solo 15 caracteres",
|
||||
"pathlimiterr": "Por favor, ingrese solo 30 caracteres",
|
||||
"removeconfirmation": "¿Está seguro de que desea eliminar este menú?",
|
||||
"deletemenu": "Eliminar menú",
|
||||
"deselectall": "Deseleccionartodo"
|
||||
},
|
||||
"Seo": {
|
||||
"homepage": "Página de Inicio",
|
||||
"pagetitle": "Título de la Página",
|
||||
"homepagetitle": "Título de la Página de Inicio",
|
||||
"pagedescription": "Descripción de la Página",
|
||||
"homepagedescription": "Descripción de la Página de Inicio",
|
||||
"pagekeyword": "Palabra Clave de la Página",
|
||||
"homepagekeyword": "Palabra Clave de la Página de Inicio",
|
||||
"save": "Guardar",
|
||||
"store": "Tienda",
|
||||
"storetitle": "Título de la Tienda",
|
||||
"storepagetitle": "Título de la Página de la Tienda",
|
||||
"storedescription": "Descripción de la Tienda",
|
||||
"storepagedescription": "Descripción de la Página de la Tienda",
|
||||
"storekeyword": "Palabra Clave de la Tienda",
|
||||
"storepagekeyword": "Palabra Clave de la Página de la Tienda",
|
||||
"sitemap": "Mapa del Sitio",
|
||||
"choosefile": "Elegir Archivo",
|
||||
"nofilechosen": "Ningún Archivo Elegido",
|
||||
"update": "Actualizar",
|
||||
"pleaseentertitle": "Por Favor Ingrese el Título",
|
||||
"pleaseenterdescripion": "Por Favor Ingrese la Descripción",
|
||||
"pleaseenterkeyword": "Por Favor Ingrese la Palabra Clave",
|
||||
"titlemustnotexceed55characters": "El Título No Debe Exceder los 55 Caracteres",
|
||||
"descriptionmustnotexceed155characters": "La Descripción No Debe Exceder los 155 Caracteres",
|
||||
"keywordmustnotexceed155characters": "La Palabra Clave No Debe Exceder los 155 Caracteres",
|
||||
"pleasechooseimage": "Por Favor Elija una Imagen"
|
||||
},
|
||||
"WebsiteSettings": {
|
||||
"sitename": "Nombre del Sitio",
|
||||
"spurtcms": "SpurtCMS",
|
||||
"sitelogo": "Logo del Sitio",
|
||||
"sitefavicon": "Icono Favorito del Sitio",
|
||||
"websiteurl": "URL del Sitio Web",
|
||||
"subdomain": "Subdominio",
|
||||
"spurtcmscom": ".spurtcms.com",
|
||||
"pleaseenteryoursitename": "Por Favor Ingrese el Nombre de su Sitio",
|
||||
"maximumlength20": "La Longitud Máxima Debe Ser de 20 Caracteres",
|
||||
"pleaseenteryourwebsiteurl": "Por Favor Ingrese la URL de su Sitio Web",
|
||||
"onlylowercaselettersandnumbersareallowed": "Solo se permiten letras minúsculas y números"
|
||||
}
|
||||
}
|
||||
+597
-3
@@ -151,6 +151,9 @@
|
||||
"getsupport": "Get SpurtCMS Pro",
|
||||
"explore": "Explorer",
|
||||
"aiwritingheading": "Générez du contenu basé sur l'IA avec personnalisation.",
|
||||
"selling": "Vente",
|
||||
"courses": "Cours",
|
||||
"listing": "Inscription",
|
||||
"Setting": {
|
||||
"title": "Paramètres",
|
||||
"manageroles": "Gérer les rôles",
|
||||
@@ -236,7 +239,8 @@
|
||||
"usernamelable": "Le nom d'utilisateur qui sera utilisé pour vous connecter.",
|
||||
"roleable": "Votre rôle dans le système, attribué par l'administrateur, définissant votre niveau d'accès.",
|
||||
"emailable": "Votre adresse e-mail enregistrée à des fins de communication et de connexion.",
|
||||
"mobileable": "Votre numéro de téléphone qui sera utilisé pour le contact et la communication."
|
||||
"mobileable": "Votre numéro de téléphone qui sera utilisé pour le contact et la communication.",
|
||||
"aimodule": "Paramètres du module IA"
|
||||
},
|
||||
"Emailtemplate": {
|
||||
"searchtemplates": "Modèles de recherche",
|
||||
@@ -563,7 +567,7 @@
|
||||
"entrypublished": "Les entrées sont publiées",
|
||||
"entrynotpublished": "Les entrées ne sont pas publiées",
|
||||
"selectedrelatedarticle": "Articles connexes sélectionnés",
|
||||
"content": "Contenu",
|
||||
"content": "Bibliothèques de contenu",
|
||||
"category": "Catégorie",
|
||||
"required": "requis",
|
||||
"metatitle": "Titre de la balise méta",
|
||||
@@ -1139,7 +1143,32 @@
|
||||
"AI Module Deleted Successfully": "Module AI supprimé avec succès",
|
||||
"IntegrationUpdatedSuccessfully": "Intégration mise à jour avec succès",
|
||||
"Course Created Successfully": "Cours créé avec succès",
|
||||
"Course Deleted Successfully": "Cours supprimé avec succès"
|
||||
"Course Deleted Successfully": "Cours supprimé avec succès",
|
||||
"Section Created Successfully": "Section créée avec succès",
|
||||
"Section Updated Successfully": "Section mise à jour avec succès",
|
||||
"Section Deleted Successfully": "Section supprimée avec succès",
|
||||
"Lesson Created Successfully": "Leçon créée avec succès",
|
||||
"Lesson Updated Successfully": "Leçon mise à jour avec succès",
|
||||
"Lesson Deleted Successfully": "Leçon supprimée avec succès",
|
||||
"Course Published Successfully": "Cours publié avec succès",
|
||||
"Course Unpublished Successfully": "Cours non publié avec succès",
|
||||
"Course Settings Updated Successfully": "Paramètres du cours mis à jour avec succès",
|
||||
"Integrationreapt": "Cette intégration existe déjà",
|
||||
"Template Updated Successfully": "Modèle mis à jour avec succès",
|
||||
"SEO Details Updated Successfully": "Détails SEO mis à jour avec succès",
|
||||
"Settings Details Updated Successfully": "Détails des paramètres mis à jour avec succès",
|
||||
"Menu Created Successfully": "Menu créé avec succès",
|
||||
"Menu Updated Successfully": "Menu mis à jour avec succès",
|
||||
"Menu Deleted Successfully": "Menu supprimé avec succès",
|
||||
"Listing Deleted Successfully": "Annonce supprimée avec succès",
|
||||
"Listing Created Successfully": "Liste créée avec succès",
|
||||
"Listing Updated Successfully": "Liste mise à jour avec succès",
|
||||
"Website Deleted Successfully":"Site Web supprimé avec succès",
|
||||
"Website Created Successfully":"Site Web créé avec succès",
|
||||
"Website Updated Successfully":"Site Web mis à jour avec succès",
|
||||
"Page Created Successfully":"Page créée avec succès",
|
||||
"Page Updated Successfully":"Page mise à jour avec succès",
|
||||
"Page Deleted Successfully":"Page supprimée avec succès"
|
||||
},
|
||||
"DashBoard": {
|
||||
"lastactive": "Dernier actif",
|
||||
@@ -1776,5 +1805,570 @@
|
||||
"validateWebhookName": "Veuillez saisir un nom de webhook sans caractères spéciaux et sans espaces de début ou de fin",
|
||||
"validateWebhookUrl": "Veuillez saisir une URL de demande valide"
|
||||
}
|
||||
},
|
||||
"memberships": {
|
||||
"membershiphead": "Adhésion",
|
||||
"membershipheaddesc": "Contrôler l'accès et les autorisations des membres.",
|
||||
"membershipmember": "Membre",
|
||||
"membershipgroup": "Groupe d'adhésion",
|
||||
"membershiplevel": "Niveau d'adhésion",
|
||||
"membershipsubscription": "Abonnement",
|
||||
"membershiporders": "Commandes",
|
||||
"recordsavailable": "Enregistrements disponibles",
|
||||
"recordavailable": "Enregistrement disponible",
|
||||
"member": {
|
||||
"recordsavailable": "Membres disponibles",
|
||||
"recordavailable": "Membre disponible",
|
||||
"createMember": "Créer un membre",
|
||||
"updateMember": "Mettre à jour un membre",
|
||||
"selectfilters": "Sélectionner les filtres",
|
||||
"createdon": "Créé le",
|
||||
"clear": "Effacer",
|
||||
"applyfilter": "Appliquer le filtre",
|
||||
"searchplacehoder": "Rechercher (Ctrl + « k » pour le focus)",
|
||||
"id": "ID",
|
||||
"name": "Nom",
|
||||
"email": "E-mail",
|
||||
"level": "Niveau",
|
||||
"subscription": "Abonnement",
|
||||
"startdate": "Date de début",
|
||||
"enddate": "Date de fin",
|
||||
"status": "Statut",
|
||||
"action": "Action",
|
||||
"edit": "Modifier",
|
||||
"delete": "Supprimer",
|
||||
"memberemptytitle": "Pas encore de membres ?",
|
||||
"memberemptydesc": "Aucun membre trouvé ! Ajoutez des membres, gérez-les individuellement et attribuez-leur des niveaux d'accès appropriés pour une distribution de contenu fluide.",
|
||||
"cancel": "Annuler",
|
||||
"save": "Enregistrer",
|
||||
"active": "Actif",
|
||||
"firstname": "Prénom",
|
||||
"firstnameplaceholder": "Saisissez le prénom du membre",
|
||||
"lastname": "Nom",
|
||||
"lastnameplaceholder": "Saisissez le nom du membre",
|
||||
"emailplaceholder": "Saisissez l'adresse e-mail du membre",
|
||||
"mobile": "Numéro de portable",
|
||||
"mobileplacehoder": "Saisissez le numéro de portable du membre",
|
||||
"username": "Nom d'utilisateur",
|
||||
"usernameplacehoder": "Saisissez le nom d'utilisateur du membre",
|
||||
"password": "Mot de passe",
|
||||
"passwordplacehoder": "Saisissez le mot de passe du membre",
|
||||
"firstnameinfo": "Saisissez le prénom du membre tel qu'il doit apparaître dans les dossiers.",
|
||||
"lastnameinfo": "Indiquez le nom de famille du membre pour une identification correcte.",
|
||||
"emailinfo": "Ajoutez l'adresse e-mail du membre à des fins de communication et de connexion.",
|
||||
"mobileinfo": "Saisissez un numéro de téléphone valide pour la vérification et le contact.",
|
||||
"usernameinfo": "Créez un nom d'utilisateur unique pour la connexion du membre.",
|
||||
"passwordinfo": "Définissez un mot de passe sécurisé pour l'accès au compte et la sécurité.",
|
||||
"deletemember": "Supprimer le membre ?",
|
||||
"areyousure": "Êtes-vous sûr de vouloir supprimer ce membre ?",
|
||||
"deletemembers": "Supprimer le membres ?",
|
||||
"areyousures": "Êtes-vous sûr de vouloir supprimer ce membres ?"
|
||||
},
|
||||
"membershipgroups": {
|
||||
"recordsavailable": "Groupes de membres disponibles",
|
||||
"recordavailable": "Groupe de membres disponible",
|
||||
"createMembersiphgroup": "Créer un groupe d'adhésion",
|
||||
"updateMembersiphgroup": "Mettre à jour le groupe d'adhésion",
|
||||
"selectfilters": "Sélectionner les filtres",
|
||||
"lastupdatedon": "Dernière mise à jour le",
|
||||
"clear": "Effacer",
|
||||
"applyfilter": "Appliquer le filtre",
|
||||
"status": "Statut",
|
||||
"active": "Actif",
|
||||
"inactive": "Inactif",
|
||||
"searchplacehoder": "Rechercher (Ctrl + « k » pour le focus)",
|
||||
"group": "Groupe",
|
||||
"description": "Description",
|
||||
"action": "Action",
|
||||
"membershipgroupemptytitle": "Aucun groupe de niveaux d'adhésion pour le moment ?",
|
||||
"membershipgroupemptydesc": "Aucun groupe de niveaux d'adhésion trouvé ! Créez des groupes pour catégoriser les différents niveaux d'adhésion et simplifier la gestion des autorisations.",
|
||||
"cancel": "Annuler",
|
||||
"save": "Enregistrer",
|
||||
"groupname": "Nom du groupe",
|
||||
"groupnameinfo": "Saisissez un nom unique Nom du groupe de niveaux d'adhésion.",
|
||||
"groupnameplacehoder": "Saisissez le nom de votre groupe",
|
||||
"groupnamedesc": "Description",
|
||||
"groupnamedescinfo": "Fournissez une brève description du groupe d'adhésion pour une meilleure identification et gestion.",
|
||||
"groupnamedescplacehoder": "Saisissez la description de votre groupe",
|
||||
"deletemembergroup": "Supprimer le groupe de niveaux d'adhésion ?",
|
||||
"areyousure": "Êtes-vous sûr de vouloir supprimer ce groupe de niveaux d'adhésion ?"
|
||||
},
|
||||
"membershiplevels": {
|
||||
"create": "Créer un niveau d'adhésion",
|
||||
"membershipavailable": "Niveau d'adhésion disponible",
|
||||
"membershipavailables": "Niveaux d'adhésion disponibles",
|
||||
"id": "ID",
|
||||
"level": "Niveau",
|
||||
"fee": "Frais",
|
||||
"status": "Statut",
|
||||
"action": "Action",
|
||||
"edit": "Modifier",
|
||||
"delete": "Supprimer",
|
||||
"cancel": "Annuler",
|
||||
"save": "Enregistrer",
|
||||
"basicinfo": "Informations de base",
|
||||
"basicinfodesc": "Définir les détails de l'adhésion, y compris le nom, le type et les groupes associés.",
|
||||
"name": "Nom",
|
||||
"nameinfo": "Saisissez un nom unique pour le niveau d'adhésion.",
|
||||
"selectmembership": "Sélectionner l'adhésion",
|
||||
"selectmembershipinfo": "Choisissez un modèle d'adhésion pour définir la structure de ce niveau.",
|
||||
"selectmembershipplaceholde": "Modèle d'adhésion",
|
||||
"selectmembershiplevelgroup": "Sélectionner un groupe de niveaux d'adhésion",
|
||||
"selectmembershiplevelgroupinfo": "Attribuer ce niveau à un groupe de niveaux d'adhésion spécifique.",
|
||||
"selectmembershiplevelgroupplaceholder": "Groupe de niveaux d'adhésion",
|
||||
"message": "Détails du niveau d'adhésion",
|
||||
"messageinfo": "Ajouter une description ou un message pour fournir des détails sur ce niveau d'adhésion.",
|
||||
"billingdetails": "Détails de facturation",
|
||||
"billingdetailsdesc": "Configurer les conditions de paiement, la facturation récurrente et les options d'essai.",
|
||||
"initialpayment": "Paiement initial",
|
||||
"initialpaymentinfo": "Montant collecté à l'inscription pour ce niveau d'adhésion.",
|
||||
"initialpaymentdesc": "Montant initial collecté à l'inscription",
|
||||
"recurringsubscription": "Abonnement récurrent",
|
||||
"recurringsubscriptioninfo": "Activer cette option si cet abonnement implique des paiements récurrents.",
|
||||
"recurringsubscriptiondesc": "Vérifier si ce niveau dispose d'un abonnement récurrent Paiement.",
|
||||
"billingamount": "Montant de facturation",
|
||||
"billingamountinfo": "Définir les frais d'abonnement pour les paiements récurrents.",
|
||||
"billingamountdesc": "Montant initial collecté à l'inscription",
|
||||
"per": "Par",
|
||||
"day": "Jour(s)",
|
||||
"week": "Semaine(s)",
|
||||
"year": "Année(s)",
|
||||
"month": "Mois",
|
||||
"billingcyclelimit": "Limite du cycle de facturation",
|
||||
"billingcyclelimitinfo": "Définir la durée ou le nombre de cycles de facturation avant l'expiration de l'abonnement.",
|
||||
"billingcyclelimitdesc": "Définir le nombre de cycles de facturation avant le renouvellement.",
|
||||
"customtrial": "Essai personnalisé",
|
||||
"customtrialinfo": "Activer et définir une période d'essai pour les nouveaux membres avant le début de la facturation régulière.",
|
||||
"customtrialdesc": "Cocher pour ajouter une période d'essai personnalisée.",
|
||||
"trailbillingamount": "Montant de facturation de l'essai",
|
||||
"trailbillingamountinfo": "Spécifier Montant facturé pendant la période d'essai. ",
|
||||
"trailbillingamountdesc": "Montant initial perçu à l'inscription",
|
||||
"forthefirst": "Pour le premier",
|
||||
"subscriptionpayment": "Paiement de l'abonnement",
|
||||
"membershiplevelemptytitle": "Aucun niveau d'adhésion trouvé ?",
|
||||
"membershiplevelemptydesc": "Aucun niveau d'adhésion trouvé ! Définissez et personnalisez vos niveaux d'adhésion avec différents niveaux d'accès et formules d'abonnement.",
|
||||
"deletemembershiplevel": "Supprimer le niveau d'adhésion ?",
|
||||
"areyousure": "Êtes-vous sûr de vouloir supprimer ce niveau d'adhésion ?",
|
||||
"membershipdesc": "Description"
|
||||
},
|
||||
"subscriptions": {
|
||||
"create": "Créer un abonnement",
|
||||
"subscriptionavailable": "Abonnement disponible",
|
||||
"subscriptionavailables": "Abonnements disponibles",
|
||||
"subcriptionid": "ID d'abonnement",
|
||||
"user": "Utilisateur",
|
||||
"level": "Niveau",
|
||||
"fee": "Frais",
|
||||
"gateway": "Passerelle",
|
||||
"paymenton": "Paiement en cours",
|
||||
"status": "Statut",
|
||||
"action": "Action",
|
||||
"edit": "Modifier",
|
||||
"delete": "Supprimer",
|
||||
"cancel": "Annuler",
|
||||
"save": "Enregistrer",
|
||||
"subscriptionemptytitle": "Aucun abonnement trouvé ?",
|
||||
"subscriptionemptydesc": "Aucun abonnement trouvé ! Associez les membres à des formules d'abonnement pour gérer l'accès et fournir du contenu exclusif.",
|
||||
"selectgateway": "Sélectionner une passerelle",
|
||||
"membershiplevel": "Niveau d'adhésion",
|
||||
"selectlevel": "Sélectionner un niveau",
|
||||
"subscriptiontransactionid": "ID de transaction d'abonnement",
|
||||
"entertransactionid": "Saisir l'ID de transaction",
|
||||
"linksubscription": "Associer l'abonnement à l'accès membre",
|
||||
"linksubscriptiondesc": "Connectez facilement les abonnements des utilisateurs au contrôle d'accès et aux autorisations pour une gestion efficace des abonnements. Offrez un accès transparent à du contenu exclusif ou à des services d'abonnement.",
|
||||
"subscriptiontransactionidinfo": "Identifiant unique de la transaction d'abonnement à des fins de suivi et de référence.",
|
||||
"subscriptiontransactioniddesc": "p. ex. ID de transaction associé à un paiement par abonnement.",
|
||||
"gatewayinfo": "Sélectionnez la passerelle de paiement utilisée pour le traitement de l'abonnement.",
|
||||
"gatewayenvironment": "Environnement de passerelle",
|
||||
"gatewayenvironmentinfo": "Choisissez entre le mode réel et le mode test pour configurer le traitement de l'abonnement.",
|
||||
"memberid": "ID de membre",
|
||||
"memberidinfo": "Saisissez l'identifiant utilisateur unique pour associer l'abonnement à un membre spécifique.",
|
||||
"membershiplevelid": "ID du niveau d'abonnement",
|
||||
"membershiplevelidinfo": "Sélectionnez le plan d'abonnement ou le niveau attribué à l'utilisateur pour le contrôle d'accès.",
|
||||
"selectmember": "Sélectionner un membre",
|
||||
"transactionid": "ID de transaction",
|
||||
"transactionidinfo": "Identifiant unique de la transaction d'abonnement à des fins de suivi et de référence.",
|
||||
"Deletesubscription": "Supprimer l'abonnement ?",
|
||||
"Deletesubscriptions": "Supprimer les abonnements ?",
|
||||
"areyousure": "Êtes-vous sûr de vouloir supprimer cet abonnement ?",
|
||||
"areyousures": "Êtes-vous sûr de vouloir supprimer ces abonnements ?"
|
||||
},
|
||||
"orders": {
|
||||
"create": "Créer une commande",
|
||||
"orderavailable": "Commande disponible",
|
||||
"orderavailables": "Commandes disponibles",
|
||||
"orderid": "ID de commande",
|
||||
"user": "Utilisateur",
|
||||
"level": "Niveau",
|
||||
"total": "Total",
|
||||
"gateway": "Passerelle",
|
||||
"paymenton": "Paiement effectué",
|
||||
"subscriptiontransactionid": "ID de transaction d'abonnement",
|
||||
"status": "Statut",
|
||||
"action": "Action",
|
||||
"edit": "Modifier",
|
||||
"delete": "Supprimer",
|
||||
"cancel": "Annuler",
|
||||
"save": "Enregistrer",
|
||||
"orderemptytitle": "Aucune commande d'abonnement trouvée ?",
|
||||
"orderemptydesc": "Aucune commande d'abonnement trouvée ! Suivez et gérez efficacement les transactions liées à l'abonnement grâce à des détails de commande structurés.",
|
||||
"enterorderid": "Saisissez l'ID de commande",
|
||||
"entertransactionid": "Saisissez l'ID de transaction",
|
||||
"membershiplevel": "Niveau d'abonnement",
|
||||
"selectlevel": "Sélectionner un niveau",
|
||||
"memberinformation": "Informations sur le membre",
|
||||
"memberinformationdesc": "Affecter des utilisateurs à des niveaux d'adhésion pour l'accès et les avantages.",
|
||||
"userid": "Utilisateur",
|
||||
"useridinfo": "Saisissez l'identifiant unique du membre qui passe la commande.",
|
||||
"membershiplevelid": "Niveau d'adhésion",
|
||||
"membershiplevelidinfo": "Sélectionnez le niveau d'adhésion attribué à l'utilisateur.",
|
||||
"selectmember": "Sélectionner un membre",
|
||||
"selectmembershiplevel": "Sélectionner un niveau d'adhésion",
|
||||
"searchmembershiplevel": "Rechercher un niveau d'adhésion",
|
||||
"billingaddress": "Adresse de facturation",
|
||||
"billingaddressdesc": "Saisissez les informations de facturation associées à l'adhésion ou à l'achat.",
|
||||
"billingname": "Nom de facturation",
|
||||
"billingnameinfo": "Saisissez le nom de la personne ou de l'entreprise à facturer.",
|
||||
"billingstreet": "Rue de facturation",
|
||||
"billingstreetinfo": "Indiquez l'adresse postale principale de facturation.",
|
||||
"billingstreet2": "Rue de facturation 2",
|
||||
"billingstreetinfo2": "(Facultatif) Saisissez des informations supplémentaires sur la rue si nécessaire.",
|
||||
"billingcity": "Ville de facturation",
|
||||
"billingcityinfo": "Spécifiez la ville de l'adresse de facturation.",
|
||||
"billingstate": "État de facturation",
|
||||
"billingstateinfo": "Sélectionnez ou saisissez l'État de l'adresse de facturation.",
|
||||
"billingpostelcode": "Code postal de facturation",
|
||||
"billingpostelcodeinfo": "Fournissez le code postal pour une facturation précise.",
|
||||
"billingcounty": "Comté de facturation",
|
||||
"billingcountyinfo": "Sélectionnez le pays de l'adresse de facturation.",
|
||||
"billingphone": "Téléphone de facturation",
|
||||
"billingphoneinfo": "Saisissez le numéro de téléphone pour les questions relatives à la facturation.",
|
||||
"paymentinformation": "Informations de paiement",
|
||||
"paymentinformationdesc": "Afficher et gérer les détails de paiement, y compris le montant total et le paiement type.",
|
||||
"subtotal": "Sous-total",
|
||||
"subtotalinfo": "Montant total avant taxes et frais supplémentaires.",
|
||||
"tax": "Taxe",
|
||||
"taxinfo": "Montant de la taxe applicable calculé sur le sous-total.",
|
||||
"totalinfo": "Montant final à payer, sous-total et taxes inclus.",
|
||||
"entertotalamount": "Saisir le montant total",
|
||||
"paymenttype": "Type de paiement",
|
||||
"paymenttypeinfo": "Spécifiez le mode de paiement (par exemple, PayPal, Stripe, RazorPay, UPI, etc.)",
|
||||
"enterpaymenttype": "Saisissez le type de paiement",
|
||||
"paymenttypedesc": "Décrivez le mode de paiement utilisé.",
|
||||
"statusinfo": "Définissez le statut actuel de la commande (par exemple, en attente, terminée, annulée).",
|
||||
"success": "Succès",
|
||||
"failed": "Échec",
|
||||
"paymentgatewayinformation": "Informations sur la passerelle de paiement",
|
||||
"paymentgatewayinformationdesc": "Enregistrez les détails de la transaction liée à la commande sélectionnée Passerelle de paiement.",
|
||||
"gatewayinfo": "Sélectionnez la passerelle de paiement utilisée pour le traitement de la transaction.",
|
||||
"gatewayenvironment": "Environnement de la passerelle",
|
||||
"gatewayenvironmentinfo": "Choisissez entre le mode réel et le mode test pour les transactions.",
|
||||
"paymenttransactionid": "ID de transaction de paiement",
|
||||
"paymenttransactionidinfo": "Saisissez ou récupérez l'identifiant unique généré par la passerelle de paiement.",
|
||||
"paymenttransactioniddesc": "Généré par la passerelle. Utile pour référencer les commandes",
|
||||
"subscriptiontransactionidinfo": "L'identifiant de transaction lié à un paiement par abonnement.",
|
||||
"subscriptiontransactioniddesc": "Généré par la passerelle. Utile pour référencer l'abonnement",
|
||||
"selectgateway": "Sélectionner la passerelle",
|
||||
"selectgatewayenvironment": "Sélectionner l'environnement de la passerelle",
|
||||
"Deletemembershiporder": "Supprimer la commande d'adhésion ?",
|
||||
"areyousure": "Êtes-vous sûr de vouloir supprimer cette commande d'adhésion ?",
|
||||
"Deletemembershiporders": "Supprimer les commandes d'adhésion ?",
|
||||
"areyousures": "Êtes-vous sûr de vouloir supprimer ces commandes d'adhésion ?"
|
||||
}
|
||||
},
|
||||
"integrations": {
|
||||
"integration": "Intégration",
|
||||
"headtitle": "SpurtCMS Pro v1.2 – Code + Support",
|
||||
"title": "Prenez le contrôle total de votre CMS avec SpurtCMS Pro v1.2, déployé directement sur votre serveur, avec des fonctionnalités premium et des avantages à vie.",
|
||||
"keypoint1": "Tout ce que vous voyez dans la démo – Conservez-le",
|
||||
"keypoint2": "Mises à jour à vie – Gardez une longueur d'avance",
|
||||
"keypoint3": "Support développeur 30 heures – Déploiement simple",
|
||||
"keypoint4": "Entièrement en marque blanche – Personnalisez-le",
|
||||
"keypoint5": "Modèles Next.js exclusifs – Accès gratuit",
|
||||
"keypoint6": "Consultation d'experts – Pérennisez votre entreprise",
|
||||
"keypoint7": "Obtenir le code source complet",
|
||||
"cloudtite": "SpurtCMS Pro v1.2 Développé avec la technologie",
|
||||
"deschead": "FAQ sur les tarifs – SpurtCMS Pro v1.2",
|
||||
"list1": "Qu'est-ce que j'obtiens avec mon achat ?",
|
||||
"sublist1": "Vous recevrez la version complète de SpurtCMS Pro v1.2, identique à la démo. Elle inclut les mises à jour à vie, 30 heures d'assistance développeur, la création de marque blanche et l'accès à tous les modèles Next.js gratuits.",
|
||||
"list2": "Existe-t-il un paiement unique ou un abonnement ?",
|
||||
"sublist2": "Nous proposons un paiement unique. Payez une fois et profitez d'avantages à vie, notamment des mises à jour futures et des conseils d'experts.",
|
||||
"list3": "Proposez-vous un essai gratuit ou une démo ?",
|
||||
"sublist3": "Oui ! Vous pouvez essayer notre démo complète avant d'effectuer un achat. Ce que vous voyez dans la démo correspond exactement à ce que vous recevrez.",
|
||||
"list4": "Puis-je obtenir un remboursement si je ne suis pas satisfait ?",
|
||||
"sublist4": "En raison de la nature des produits numériques, nous n'offrons pas de remboursement une fois le produit téléchargé. Nous proposons toutefois une version de démonstration afin que vous puissiez évaluer la solution avant d'acheter.",
|
||||
"list5": "Qu'est-ce qui est inclus dans les 30 heures d'assistance développeur ?",
|
||||
"sublist5": "Nos développeurs vous assisteront pour :",
|
||||
"sublist6": "Installation et déploiement sur votre serveur",
|
||||
"sublist7": "Configuration et installation de base",
|
||||
"sublist8": "Corrections de bugs mineurs et optimisations",
|
||||
"sublist9": "Conseils de personnalisation",
|
||||
"sublist10": "Au-delà de 30 heures, une assistance supplémentaire est disponible à un tarif horaire.",
|
||||
"list6": "Puis-je utiliser SpurtCMS Pro v1.2 pour plusieurs projets ?",
|
||||
"sublist11": "Votre achat comprend une licence à usage unique pour un domaine/projet. Pour plusieurs projets, des licences supplémentaires sont requises.",
|
||||
"list7": "Comment fonctionne la marque blanche ?",
|
||||
"sublist12": "Vous pouvez renommer entièrement SpurtCMS Pro v1.2 en modifiant le logo, les couleurs, le nom de marque et d'autres éléments visuels pour qu'ils correspondent à l'identité de votre entreprise.",
|
||||
"list8": "Puis-je faire développer des fonctionnalités personnalisées ?",
|
||||
"sublist13": "Oui ! Nous proposons des services de conseil et de personnalisation. Si vous avez besoin de fonctionnalités supplémentaires, notre équipe de développement peut les créer pour vous à un tarif personnalisé.",
|
||||
"list9": "Quels modes de paiement acceptez-vous ?",
|
||||
"sublist14": "Nous acceptons les cartes de crédit/débit, PayPal et les virements bancaires. Contactez-nous si vous avez besoin d'autres options de paiement.",
|
||||
"list10": "Comment démarrer après l'achat ?",
|
||||
"sublist15": "Une fois votre achat finalisé, vous recevrez :",
|
||||
"sublist16": "Un lien de téléchargement pour SpurtCMS Pro v1.2",
|
||||
"sublist17": "Un guide d'installation détaillé",
|
||||
"sublist18": "Accès à notre équipe d'assistance aux développeurs pour vous aider à l'installation"
|
||||
},
|
||||
"AImodulesettings": {
|
||||
"cancel": "Annuler",
|
||||
"save": "Enregistrer",
|
||||
"create": "Créer un nouveau module d'IA",
|
||||
"aimodule": "Module d'IA",
|
||||
"description": "Description",
|
||||
"lastupdatedon": "Dernière mise à jour le",
|
||||
"status": "Statut",
|
||||
"model": "Modèle",
|
||||
"action": "Action",
|
||||
"edit": "Modifier",
|
||||
"delete": "Supprimer",
|
||||
"aiemptytitle": "Aucun module de paramètres d'IA trouvé ?",
|
||||
"aiemptydesc": "Améliorez votre système grâce à l'automatisation et à l'intelligence artificielle. Choisissez un fournisseur, configurez les paramètres et commencez dès aujourd'hui !",
|
||||
"selectmodule": "Sélectionner un module",
|
||||
"selectmoduledesc": "Intégrez facilement des fonctionnalités d'IA en sélectionnant un module, en ajoutant une clé API et en définissant le modèle d'IA.",
|
||||
"openai": "Ouvrir l'IA",
|
||||
"openaidesc": "Utilisez un traitement du langage naturel de pointe pour Création de contenu automatisée et réponses intelligentes.",
|
||||
"google": "Google",
|
||||
"googledesc": "Exploitez les outils d'IA de Google pour l'analyse de texte, la création de contenu et l'automatisation.",
|
||||
"deepseek": "Recherche approfondie",
|
||||
"deepseekdesc": "Exploitez les capacités d'apprentissage profond pour un traitement avancé des données et des informations basées sur l'IA.",
|
||||
"apikey": "Clé API",
|
||||
"apikeyplaceholder": "Veuillez saisir la clé API",
|
||||
"descriptionplaceholder": "Veuillez saisir une description",
|
||||
"aimodel": "Modèle d'IA",
|
||||
"selectaimodel": "Sélectionner un modèle d'IA",
|
||||
"aimodelerr": "Veuillez sélectionner le modèle IA"
|
||||
},
|
||||
"Securitys": {
|
||||
"security": "Sécurité",
|
||||
"changepassword": "Modifier le mot de passe",
|
||||
"changepassworddesc": "Mettez à jour votre mot de passe actuel pour renforcer la sécurité de votre compte.",
|
||||
"newpassword": "Nouveau mot de passe",
|
||||
"confirmpassword": "Confirmer le mot de passe",
|
||||
"cancel": "Annuler",
|
||||
"save": "Enregistrer",
|
||||
"newpasswordinfo": "Saisissez un nouveau mot de passe fort en respectant les consignes de sécurité.",
|
||||
"confirmpasswordinfo": "Saisissez à nouveau le nouveau mot de passe pour garantir son exactitude et éviter les erreurs."
|
||||
},
|
||||
"Course": {
|
||||
"course": "Cours",
|
||||
"manageandorganize": "Gérez et organisez le contenu éducatif facilement.",
|
||||
"createcourse": "Créer un Cours",
|
||||
"recordsavailable": "Enregistrements Disponibles",
|
||||
"all": "Tous",
|
||||
"selectfilters": "Sélectionner des Filtres",
|
||||
"coursetitle": "Titre du Cours",
|
||||
"entercoursetitle": "Entrez le Titre du Cours",
|
||||
"status": "Statut",
|
||||
"selectstatus": "Sélectionner le Statut",
|
||||
"pricing": "Tarification",
|
||||
"selectpricing": "Sélectionner la Tarification",
|
||||
"clear": "Effacer",
|
||||
"applyfilter": "Appliquer le Filtre",
|
||||
"sortby": "Trier Par",
|
||||
"lastupdated": "Dernière Mise à Jour",
|
||||
"createddate": "Date de Création",
|
||||
"ascending": "Ascendant",
|
||||
"descending": "Descendant",
|
||||
"createdBy": "Créé Par",
|
||||
"action": "Action",
|
||||
"lastupdatedon": "Dernière mise à jour le ",
|
||||
"createdon": "Créé le :",
|
||||
"publish": "Publier",
|
||||
"unpublish": "Annuler la publication",
|
||||
"delete": "Supprimer",
|
||||
"cancel": "Annuler",
|
||||
"save": "Enregistrer",
|
||||
"title": "Titre",
|
||||
"enteryourtitle": "Entrez Votre Titre",
|
||||
"titleinfo": "Entrez un titre unique et descriptif pour votre cours.",
|
||||
"description": "Description",
|
||||
"enteryourdescription": "Entrez Votre Description",
|
||||
"descriptioninfo": "Fournissez un résumé détaillé du cours, en soulignant les sujets et objectifs clés.",
|
||||
"category": "Catégorie",
|
||||
"categoryinfo": "Sélectionnez une catégorie appropriée pour organiser votre cours et le rendre facilement accessible.",
|
||||
"selectcategory": "Sélectionner une Catégorie",
|
||||
"searchcategory": "Rechercher une Catégorie",
|
||||
"uploadcoverimage": "Télécharger l'Image de Couverture",
|
||||
"uploadcoverimageinfo": "Choisissez une image pour représenter visuellement votre cours.",
|
||||
"browse": "Parcourir",
|
||||
"uploadnewfiles": "Téléchargez de nouveaux fichiers ou choisissez depuis le répertoire",
|
||||
"chooseonly": "Seuls les formats jpg/jpeg/png sont autorisés",
|
||||
"nocoursesyet": "Aucun cours pour le moment !",
|
||||
"startcreating": "Commencez dès aujourd'hui à créer des expériences d'apprentissage captivantes ! Ajoutez des cours qui offrent une excellente expérience à vos apprenants.",
|
||||
"deletecourse": "Supprimer le cours ?",
|
||||
"areyousure": "Êtes-vous sûr de vouloir supprimer ce cours ?",
|
||||
"titleerror": "Veuillez entrer le titre du cours",
|
||||
"descriptionerror": "Veuillez entrer la description du cours",
|
||||
"categoryerror": "Veuillez sélectionner une catégorie",
|
||||
"lesson": "Leçon",
|
||||
"section": "section",
|
||||
"settings": "Paramètres",
|
||||
"nolessonsyet": "Pas encore de leçons !",
|
||||
"startbuilding": "Commencez dès aujourd'hui à créer des parcours d'apprentissage enrichissants. Ajoutez des leçons qui inspirent, engagent et éduquent efficacement vos apprenants.",
|
||||
"createyourfirstlesson": "Créez Votre Première Leçon",
|
||||
"newlesson": "Nouvelle Leçon",
|
||||
"newSection": "Nouvelle Section",
|
||||
"addtext": "Ajouter du Texte",
|
||||
"addembed": "Ajouter une Intégration",
|
||||
"addquiz": "Ajouter un Quiz",
|
||||
"addFiles": "Ajouter des Fichiers",
|
||||
"deletelesson": "Supprimer la leçon ?",
|
||||
"areyousurewantlesson": "Êtes-vous sûr de vouloir supprimer cette leçon ?",
|
||||
"deletesection": "Supprimer la section ?",
|
||||
"areyousurewantsection": "Êtes-vous sûr de vouloir supprimer cette section ?",
|
||||
"createlesson": "Créer une leçon",
|
||||
"updatelesson": "Mettre à jour la leçon",
|
||||
"createsection": "Créer une section",
|
||||
"updatesection": "Mettre à jour la section"
|
||||
},
|
||||
"Coursessettings": {
|
||||
"settings": "Paramètres",
|
||||
"details": "Détails",
|
||||
"title": "Titre",
|
||||
"titledesc": "Saisissez un titre clair et concis pour le cours.",
|
||||
"description": "Description",
|
||||
"desccont": "Fournissez un aperçu détaillé du cours, y compris les sujets clés et les résultats d'apprentissage.",
|
||||
"image": "Image",
|
||||
"imagedesc": "Téléchargez une image de couverture qui représente le cours. Choisissez une image de haute qualité pour un meilleur engagement.",
|
||||
"chooseimg": "Choisir une image",
|
||||
"category": "Catégorie",
|
||||
"catdesc": "Sélectionnez la catégorie appropriée pour classer le cours afin de faciliter sa découverte.",
|
||||
"searchcat": "Catégories de recherche",
|
||||
"options": "Possibilités",
|
||||
"certificate": "Certificat",
|
||||
"cerdesc": "Activez cette option si vous souhaitez fournir un certificat à la fin du cours.",
|
||||
"cerstatus": "Fournir un certificat pour ce cours",
|
||||
"comments": "Commentaires",
|
||||
"commentsdesc": "Fournir toute information sur les prérequis à l’étude de ce cours ou les instructions particulières aux apprenants.",
|
||||
"active": "Active",
|
||||
"inactive": "En actif",
|
||||
"pricing": "Tarifs",
|
||||
"offer": "Offre",
|
||||
"offerdesc": "Sélectionnez le modèle de tarification de votre cours : gratuit, sur liste d'attente ou payant.",
|
||||
"offerchange": "Modifier les options de l'offre",
|
||||
"free": "Gratuite",
|
||||
"freedesc": "Le cours est accessible gratuitement aux apprenants.",
|
||||
"waitlist": "Liste d'attente",
|
||||
"waitlistdesc": "Les apprenants peuvent s'inscrire, mais l'accès est fourni plus tard.",
|
||||
"paid": "Payé",
|
||||
"paiddesc": "Le cours nécessite un paiement pour s'inscrire.",
|
||||
"availability": "Disponibilité",
|
||||
"status": "Statut",
|
||||
"statusdesc": "Définissez le cours comme actif ou inactif.",
|
||||
"visibility": "Visibilité",
|
||||
"visibilitydesc": "Définissez qui peut consulter le cours et s'y inscrire.",
|
||||
"published": "Publié",
|
||||
"unpublish": "Inédite",
|
||||
"draft": "Brouillon",
|
||||
"selectvisible": "Sélectionnez la visibilité",
|
||||
"public": "Publique",
|
||||
"private": "Privée",
|
||||
"startdate": "Date de début",
|
||||
"datedesc": "Fixez une date précise à laquelle le cours sera disponible.",
|
||||
"singuplimit": "Limite d'inscription",
|
||||
"singuplimitdesc": "Précisez un nombre maximum d'étudiants autorisés pour le cours.",
|
||||
"enterlimits": "Entrez les limites",
|
||||
"duration": "Durée",
|
||||
"durationdesc": "Déterminez combien de temps le cours reste accessible après l’inscription.",
|
||||
"selectduration": "Sélectionnez la durée",
|
||||
"month": "Mois",
|
||||
"year": "Année",
|
||||
"visiblityerr": "Veuillez choisir la visibilité",
|
||||
"dateerr": "Veuillez choisir une date précise",
|
||||
"limiterr": "Veuillez entrer les limites maximales d'inscription",
|
||||
"durationerr": "Veuillez choisir la durée du cours",
|
||||
"pricemodelerr": "Veuillez sélectionner le modèle de tarification pour votre cours"
|
||||
},
|
||||
"Menu": {
|
||||
"website": "Site web",
|
||||
"templates": "Modèles",
|
||||
"seo": "SEO",
|
||||
"setting": "Paramètres",
|
||||
"webdesc": "Personnalisez votre site web et faites briller votre marque",
|
||||
"bannertitle": "Outils puissants de gestion de site web",
|
||||
"bannerdesc": "Créez et personnalisez facilement votre site web grâce à des contrôles intuitifs et des modèles flexibles. L’onglet Site web vous permet d’organiser les pages, de configurer la navigation et de garantir que votre contenu est toujours à jour, afin d’offrir une expérience fluide à vos visiteurs.",
|
||||
"menu": "Menu",
|
||||
"menuname": "Nom du Menu",
|
||||
"totalitems": "Nombre Total d'Éléments",
|
||||
"status": "Statut",
|
||||
"lastmodified": "Dernière Modification",
|
||||
"action": "Action",
|
||||
"createmenu": "Créer un Menu",
|
||||
"createnewmenu": "Créer un Nouveau Menu",
|
||||
"description": "Description",
|
||||
"managemenu": "Gérer le Menu",
|
||||
"managemenudesc": "Gérer les options et paramètres du menu",
|
||||
"choosemenuitem": "Choisir les Éléments du Menu",
|
||||
"addmenuitems": "Ajouter des Éléments au Menu",
|
||||
"addtomenu": "Ajouter au menu",
|
||||
"mostrecent": "Le plus récent",
|
||||
"viewall": "Voir tout",
|
||||
"selectall": "Tout sélectionner",
|
||||
"addmenuitem": "Ajouter un Élément au Menu",
|
||||
"labelname": "Nom de l'Étiquette",
|
||||
"labelnameplcholder": "Entrez le nom de l'étiquette",
|
||||
"navigationpath": "Chemin de navigation",
|
||||
"navplcholder": "Indiquez le chemin du lien",
|
||||
"additem": "Ajouter un élément",
|
||||
"labelnameerr": "Veuillez entrer le nom de l'étiquette",
|
||||
"linkpatherr": "Veuillez entrer le chemin du lien",
|
||||
"menunameerr": "Veuillez entrer le nom du menu",
|
||||
"nameduplicateerr": "Le nom du menu existe déjà",
|
||||
"descriptionerror": "Veuillez entrer la description du menu",
|
||||
"namelimiterr": "Veuillez entrer seulement 15 caractères",
|
||||
"pathlimiterr": "Veuillez entrer seulement 30 caractères",
|
||||
"removeconfirmation": "Êtes-vous sûr de vouloir supprimer ce menu ?",
|
||||
"deletemenu": "Supprimer le menu",
|
||||
"deselectall": "Toutdéselectionner"
|
||||
},
|
||||
"Seo": {
|
||||
"homepage": "Página de Inicio",
|
||||
"pagetitle": "Título de la Página",
|
||||
"homepagetitle": "Título de la Página de Inicio",
|
||||
"pagedescription": "Descripción de la Página",
|
||||
"homepagedescription": "Descripción de la Página de Inicio",
|
||||
"pagekeyword": "Palabra Clave de la Página",
|
||||
"homepagekeyword": "Palabra Clave de la Página de Inicio",
|
||||
"save": "Guardar",
|
||||
"store": "Tienda",
|
||||
"storetitle": "Título de la Tienda",
|
||||
"storepagetitle": "Título de la Página de la Tienda",
|
||||
"storedescription": "Descripción de la Tienda",
|
||||
"storepagedescription": "Descripción de la Página de la Tienda",
|
||||
"storekeyword": "Palabra Clave de la Tienda",
|
||||
"storepagekeyword": "Palabra Clave de la Página de la Tienda",
|
||||
"sitemap": "Mapa del Sitio",
|
||||
"choosefile": "Elegir Archivo",
|
||||
"nofilechosen": "Ningún Archivo Elegido",
|
||||
"update": "Actualizar",
|
||||
"pleaseentertitle": "Por Favor Ingrese el Título",
|
||||
"pleaseenterdescripion": "Por Favor Ingrese la Descripción",
|
||||
"pleaseenterkeyword": "Por Favor Ingrese la Palabra Clave",
|
||||
"titlemustnotexceed55characters": "El Título No Debe Exceder los 55 Caracteres",
|
||||
"descriptionmustnotexceed155characters": "La Descripción No Debe Exceder los 155 Caracteres",
|
||||
"keywordmustnotexceed155characters": "La Palabra Clave No Debe Exceder los 155 Caracteres",
|
||||
"pleasechooseimage": "Por Favor Elija una Imagen"
|
||||
},
|
||||
"WebsiteSettings": {
|
||||
"sitename": "Nom du Site",
|
||||
"spurtcms": "SpurtCMS",
|
||||
"sitelogo": "Logo du Site",
|
||||
"sitefavicon": "Favicon du Site",
|
||||
"websiteurl": "URL du Site Web",
|
||||
"subdomain": "Sous-domaine",
|
||||
"spurtcmscom": ".spurtcms.com",
|
||||
"pleaseenteryoursitename": "Veuillez Saisir le Nom de Votre Site",
|
||||
"maximumlength20": "La Longueur Maximale Doit Être de 20 Caractères",
|
||||
"pleaseenteryourwebsiteurl": "Veuillez Saisir l'URL de Votre Site Web",
|
||||
"onlylowercaselettersandnumbersareallowed": "Seules les lettres minuscules et les chiffres sont autorisés"
|
||||
}
|
||||
}
|
||||
+595
-3
@@ -152,6 +152,9 @@
|
||||
"getsupport": "Get SpurtCMS Pro",
|
||||
"explore": "Исследовать",
|
||||
"aiwritingheading": "Создавайте контент на основе искусственного интеллекта с возможностью настройки.",
|
||||
"selling": "Продажа",
|
||||
"courses": "Курсы",
|
||||
"listing": "Листинг",
|
||||
"Setting": {
|
||||
"title": "Настройки",
|
||||
"manageroles": "Управление ролями",
|
||||
@@ -237,7 +240,8 @@
|
||||
"usernamelable": "Имя пользователя, которое будет использоваться для входа в систему",
|
||||
"rolelable": "Ваша роль в системе, назначенная администратором, определяющая ваш уровень доступа",
|
||||
"emailable": "Ваш зарегистрированный адрес электронной почты для связи и входа в систему",
|
||||
"mobilelable": "Ваш номер телефона, который будет использоваться для связи и общения"
|
||||
"mobilelable": "Ваш номер телефона, который будет использоваться для связи и общения",
|
||||
"aimodule": "Настройки модуля ИИ"
|
||||
},
|
||||
"Emailtemplate": {
|
||||
"searchtemplates": "Шаблоны поиска",
|
||||
@@ -366,7 +370,7 @@
|
||||
"entrypublished": "Запись опубликована",
|
||||
"entrynotpublished": "Запись не опубликована",
|
||||
"selectedrelatedarticle": "Выбранные связанные статьи",
|
||||
"content": "Контент",
|
||||
"content": "Библиотеки контента",
|
||||
"category": "Категория",
|
||||
"required": "Обязательно",
|
||||
"metatitle": "Заголовок метатега",
|
||||
@@ -1146,7 +1150,32 @@
|
||||
"AI Module Deleted Successfully": "Модуль ИИ успешно удален",
|
||||
"IntegrationUpdatedSuccessfully": "Интеграция успешно обновлена",
|
||||
"Course Created Successfully": "Курс создан успешно",
|
||||
"Course Deleted Successfully": "Курс удален успешно"
|
||||
"Course Deleted Successfully": "Курс удален успешно",
|
||||
"Section Created Successfully": "Раздел успешно создан",
|
||||
"Section Updated Successfully": "Раздел успешно обновлен",
|
||||
"Section Deleted Successfully": "Раздел успешно удален",
|
||||
"Lesson Created Successfully": "Урок успешно создан",
|
||||
"Lesson Updated Successfully": "Урок успешно обновлен",
|
||||
"Lesson Deleted Successfully": "Урок успешно удален",
|
||||
"Course Published Successfully": "Курс успешно опубликован",
|
||||
"Course Unpublished Successfully": "Курс успешно отменен",
|
||||
"Course Settings Updated Successfully": "Настройки курса успешно обновлены",
|
||||
"Integrationreapt": "Эта интеграция уже существует",
|
||||
"Template Updated Successfully": "Шаблон успешно обновлен",
|
||||
"SEO Details Updated Successfully": "Подробности SEO успешно обновлены",
|
||||
"Settings Details Updated Successfully": "Настройки Подробности Обновлены Успешно",
|
||||
"Menu Created Successfully": "Меню успешно создано",
|
||||
"Menu Updated Successfully": "Меню успешно обновлено",
|
||||
"Menu Deleted Successfully": "Меню успешно удалено",
|
||||
"Listing Deleted Successfully": "Листинг успешно удален",
|
||||
"Listing Created Successfully": "Листинг успешно создан",
|
||||
"Listing Updated Successfully": "Листинг успешно обновлен",
|
||||
"Website Deleted Successfully":"Веб-сайт успешно удален",
|
||||
"Website Created Successfully":"Веб-сайт успешно создан",
|
||||
"Website Updated Successfully":"Веб-сайт успешно обновлен",
|
||||
"Page Created Successfully":"Страница успешно создана",
|
||||
"Page Updated Successfully":"Страница успешно обновлена",
|
||||
"Page Deleted Successfully":"Страница успешно удалена"
|
||||
},
|
||||
"DashBoard": {
|
||||
"lastactive": "Последняя активность",
|
||||
@@ -1786,5 +1815,568 @@
|
||||
"validateWebhookName": "Пожалуйста, введите имя вебхука без специальных символов и без пробелов в начале или конце",
|
||||
"validateWebhookUrl": "Пожалуйста, введите корректный URL запроса"
|
||||
}
|
||||
},
|
||||
"memberships": {
|
||||
"membershiphead": "Участие",
|
||||
"membershipheaddesc": "Управление доступом и разрешениями участников",
|
||||
"membershipmember": "Участник",
|
||||
"membershipgroup": "Группа участников",
|
||||
"membershiplevel": "Уровень участия",
|
||||
"membershipsubscription": "Подписка",
|
||||
"membershiporders": "Заказы",
|
||||
"recordsavailable": "Доступные записи",
|
||||
"recordavailable": "Доступная запись",
|
||||
"member": {
|
||||
"recordsavailable": "Доступные участники",
|
||||
"recordavailable": "Доступный участник",
|
||||
"createMember": "Создать участника",
|
||||
"updateMember": "Обновить участника",
|
||||
"selectfilters": "Выбрать фильтры",
|
||||
"createdon": "Создано",
|
||||
"clear": "Очистить",
|
||||
"applyfilter": "Применить фильтр",
|
||||
"searchplacehoder": "Поиск (Ctrl + k для фокусировки)",
|
||||
"id": "ИД",
|
||||
"name": "Имя",
|
||||
"email": "Электронная почта",
|
||||
"level": "Уровень",
|
||||
"subscription": "Подписка",
|
||||
"startdate": "Дата начала",
|
||||
"enddate": "Дата окончания",
|
||||
"status": "Статус",
|
||||
"action": "Действие",
|
||||
"edit": "Изменить",
|
||||
"delete": "Удалить",
|
||||
"memberemptytitle": "Еще нет участников?",
|
||||
"memberemptydesc": "Участники не найдены! Добавляйте участников, управляйте отдельными участниками и назначайте им соответствующие уровни доступа для бесперебойного распространения контента.",
|
||||
"cancel": "Отмена",
|
||||
"save": "Сохранить",
|
||||
"active": "Активно",
|
||||
"firstname": "Имя",
|
||||
"firstnameplacceholder": "Введите имя участника",
|
||||
"lastname": "Фамилия",
|
||||
"lastnameplacceholder": "Введите фамилию участника",
|
||||
"emailplacceholder": "Введите адрес электронной почты участника",
|
||||
"mobile": "Номер мобильного телефона",
|
||||
"mobileplacehoder": "Введите номер мобильного телефона участника",
|
||||
"username": "Имя пользователя",
|
||||
"usernameplacehoder": "Введите имя пользователя участника",
|
||||
"password": "Пароль",
|
||||
"passwordplacehoder": "Введите пароль участника",
|
||||
"firstnameinfo": "Введите имя участника, как оно должно отображаться в записях.",
|
||||
"lastnameinfo": "Укажите фамилию участника для правильной идентификации.",
|
||||
"emailinfo": "Добавьте адрес электронной почты участника для связи и входа в систему.",
|
||||
"mobileinfo": "Введите действительный номер телефона для проверки и связи.",
|
||||
"usernameinfo": "Создайте уникальное имя пользователя для входа участника в систему.",
|
||||
"passwordinfo": "Установите надежный пароль для доступа к учетной записи и безопасности.",
|
||||
"deletemember": "Удалить участника?",
|
||||
"areyousure": "Вы уверены, что хотите удалить этого участника?",
|
||||
"deletemembers": "Удалить участника?",
|
||||
"areyousures": "Вы уверены, что хотите удалить этого участника?"
|
||||
},
|
||||
"membershipgroups": {
|
||||
"recordsavailable": "Доступные группы участников",
|
||||
"recordavailable": "Доступная группа участников",
|
||||
"createMembersiphgroup": "Создать группу участников",
|
||||
"updateMembersiphgroup": "Обновить группу участников",
|
||||
"selectfilters": "Выбрать фильтры",
|
||||
"lastupdatedon": "Последнее обновление",
|
||||
"clear": "Очистить",
|
||||
"applyfilter": "Применить фильтр",
|
||||
"status": "Статус",
|
||||
"active": "Активно",
|
||||
"inactive": "Неактивно",
|
||||
"searchplacehoder": "Поиск (Ctrl + k для фокусировки)",
|
||||
"group": "Группа",
|
||||
"description": "Описание",
|
||||
"action": "Действие",
|
||||
"membershipgroupemptytitle": "Нет групп уровня членства еще?",
|
||||
"membershipgroupemptydesc": "Группы уровня членства не найдены! Создайте группы, чтобы классифицировать различные уровни членства и упростить управление разрешениями.",
|
||||
"cancel": "Отмена",
|
||||
"save": "Сохранить",
|
||||
"groupname": "Группа Имя",
|
||||
"groupnameinfo": "Введите уникальное имя для группы уровня членства.",
|
||||
"groupnameplacehoder": "Введите имя вашей группы",
|
||||
"groupnamedesc": "Описание",
|
||||
"groupnamedescinfo": "Предоставьте краткое описание группы членства для лучшей идентификации и управления.",
|
||||
"groupnamedescplacehoder": "Введите описание вашей группы",
|
||||
"deletemembergroup": "Удалить группу уровня членства?",
|
||||
"areyousure": "Вы уверены, что хотите удалить эту группу уровня членства?"
|
||||
},
|
||||
"membershiplevels": {
|
||||
"create": "Создать уровень членства",
|
||||
"membershipavailable": "Доступный уровень членства",
|
||||
"membershipavailables": "Доступные уровни членства",
|
||||
"id": "ID",
|
||||
"level": "Уровень",
|
||||
"fee": "Плата",
|
||||
"status": "Статус",
|
||||
"action": "Действие",
|
||||
"edit": "Изменить",
|
||||
"delete": "Удалить",
|
||||
"cancel": "Отмена",
|
||||
"save": "Сохранить",
|
||||
"basicinfo": "Базовая информация",
|
||||
"basicinfodesc": "Определите данные о членстве, включая имя, тип и связанные группы.",
|
||||
"name": "Имя",
|
||||
"nameinfo": "Введите уникальное имя для уровня членства.",
|
||||
"selectmembership": "Выберите членство",
|
||||
"selectmembershipinfo": "Выберите шаблон членства, чтобы определить структуру этого уровня.",
|
||||
"selectmembershipplaceholde": "Шаблон членства",
|
||||
"selectmembershiplevelgroup": "Выберите группу уровня членства",
|
||||
"selectmembershiplevelgroupinfo": "Назначьте этот уровень определенной группе уровня членства",
|
||||
"selectmembershiplevelgroupplaceholder": "Группа уровня членства",
|
||||
"message": "Подробности уровня членства",
|
||||
"messageinfo": "Добавьте описание или сообщение, чтобы предоставить сведения об этом уровне членства",
|
||||
"billingdetails": "Сведения о выставлении счетов",
|
||||
"billingdetailsdesc": "Настройте условия оплаты, повторяющиеся счета и параметры пробного периода",
|
||||
"initialpayment": "Первоначальный платеж",
|
||||
"initialpaymentinfo": "Сумма, собранная при регистрации для этого уровня членства",
|
||||
"initialpaymentdesc": "Первоначальная сумма, собранная при регистрации",
|
||||
"recurringsubscription": "Повторяющаяся подписка",
|
||||
"recurringsubscriptioninfo": "Включите эту опцию, если это членство подразумевает повторяющиеся платежи",
|
||||
"recurringsubscriptiondesc": "Проверьте, есть ли на этом уровне повторяющийся платеж по подписке.",
|
||||
"billingamount": "Сумма выставления счета",
|
||||
"billingamountinfo": "Установите абонентскую плату для повторяющихся платежей.",
|
||||
"billingamountdesc": "Начальная сумма, взимаемая при регистрации",
|
||||
"per": "За",
|
||||
"day": "Дни",
|
||||
"week": "Недели",
|
||||
"year": "Годы",
|
||||
"month": "Месяцы",
|
||||
"billingcyclelimit": "Ограничение цикла выставления счета",
|
||||
"billingcyclelimitinfo": "Определите продолжительность или количество циклов выставления счета до истечения срока членства.",
|
||||
"billingcyclelimitdesc": "Установите количество циклов выставления счета перед продлением.",
|
||||
"customtrial": "Пользовательский пробный период",
|
||||
"customtrialinfo": "Включите и установите пробный период для новых участников перед началом регулярного выставления счета.",
|
||||
"customtrialdesc": "Отметьте, чтобы добавить пользовательский пробный период.",
|
||||
"trailbillingamount": "Сумма пробного платежа",
|
||||
"trailbillingamountinfo": "Укажите сумму, взимаемую в течение пробного периода.",
|
||||
"trailbillingamountdesc": "Начальная сумма, взимаемая при регистрации",
|
||||
"forthefirst": "Для первого",
|
||||
"subscriptionpayment": "Оплата подписки",
|
||||
"membershiplevelemptytitle": "Уровни членства не найдены?",
|
||||
"membershiplevelemptydesc": "Уровни членства не найдены! Определите и настройте уровни членства с различными уровнями доступа и планами подписки.",
|
||||
"membershipdesc": "Описание"
|
||||
},
|
||||
"subscriptions": {
|
||||
"create": "Создать подписку",
|
||||
"subscriptionavailable": "Доступна подписка",
|
||||
"subscriptionavailables": "Доступны подписки",
|
||||
"subcriptionid": "ID подписки",
|
||||
"user": "Пользователь",
|
||||
"level": "Уровень",
|
||||
"fee": "Плата",
|
||||
"gateway": "Шлюз",
|
||||
"paymenton": "Оплата",
|
||||
"status": "Статус",
|
||||
"action": "Действие",
|
||||
"edit": "Изменить",
|
||||
"delete": "Удалить",
|
||||
"cancel": "Отмена",
|
||||
"save": "Сохранить",
|
||||
"subscriptionemptytitle": "Подписки не найдены?",
|
||||
"subscriptionemptydesc": "Подписки не найдены! Свяжите участников с планами подписки, чтобы управлять доступом и предоставлять эксклюзивный контент.",
|
||||
"selectgateway": "Выбрать шлюз",
|
||||
"membershiplevel": "Уровень членства",
|
||||
"selectlevel": "Выбрать уровень",
|
||||
"subscriptiontransactionid": "Идентификатор транзакции подписки",
|
||||
"entertransactionid": "Введите идентификатор транзакции",
|
||||
"linksubscription": "Связать подписку с доступом участника",
|
||||
"linksubscriptiondesc": "Простая связь подписок пользователей с контролем доступа и разрешениями для эффективного управления членством. для предоставления бесперебойного доступа к эксклюзивному контенту или услугам членства.",
|
||||
"subscriptiontransactionidinfo": "Уникальный идентификатор транзакции подписки для отслеживания и ссылки.",
|
||||
"subscriptiontransactioniddesc": "например. Идентификатор транзакции, связанный с платежом на основе подписки.",
|
||||
"gatewayinfo": "Выберите платежный шлюз, используемый для обработки подписки.",
|
||||
"gatewayenvironment": "Среда шлюза",
|
||||
"gatewayenvironmentinfo": "Выберите режим реального времени или тестовый режим для настройки обработки подписки.",
|
||||
"memberid": "Идентификатор участника",
|
||||
"memberidinfo": "Введите уникальный идентификатор пользователя, чтобы связать подписку с определенным участником.",
|
||||
"membershiplevelid": "Идентификатор уровня участника",
|
||||
"membershiplevelidinfo": "Выберите план или уровень участника, назначенный пользователю для управления доступом.",
|
||||
"selectmember": "Выберите участника",
|
||||
"transactionid": "ID транзакции",
|
||||
"transactionidinfo": "Уникальный идентификатор транзакции подписки для отслеживания и ссылки.",
|
||||
"Deletesubscription": "Удалить подписку?",
|
||||
"Deletesubscriptions": "Удалить подписки?",
|
||||
"areyousure": "Вы уверены, что хотите удалить эту подписку?",
|
||||
"areyousures": "Вы уверены, что хотите удалить эти подписки?"
|
||||
},
|
||||
"orders": {
|
||||
"create": "Создать заказ",
|
||||
"orderavailable": "Доступный заказ",
|
||||
"orderavailables": "Доступные заказы",
|
||||
"orderid": "ID заказа",
|
||||
"user": "Пользователь",
|
||||
"level": "Уровень",
|
||||
"total": "Всего",
|
||||
"gateway": "Шлюз",
|
||||
"paymenton": "Оплата",
|
||||
"subscriptiontransactionid": "ID транзакции по подписке",
|
||||
"status": "Статус",
|
||||
"action": "Действие",
|
||||
"edit": "Изменить",
|
||||
"delete": "Удалить",
|
||||
"cancel": "Отмена",
|
||||
"save": "Сохранить",
|
||||
"orderemptytitle": "Заказы на членство не найдены?",
|
||||
"orderemptydesc": "Заказы на членство не найдены! Эффективно отслеживайте и управляйте транзакциями, связанными с членством, с помощью структурированных деталей заказа.",
|
||||
"enterorderid": "Введите идентификатор заказа",
|
||||
"entertransactionid": "Введите идентификатор транзакции",
|
||||
"membershiplevel": "Уровень членства",
|
||||
"selectlevel": "Выбрать уровень",
|
||||
"memberinformation": "Информация об участнике",
|
||||
"memberinformationdesc": "Назначьте пользователям уровни членства для доступа и преимуществ.",
|
||||
"userid": "Nользователя",
|
||||
"useridinfo": "Введите уникальный идентификатор участника, размещающего заказ.",
|
||||
"membershiplevelid": "Yровня членства",
|
||||
"membershiplevelidinfo": "Выберите уровень членства, назначенный пользователю.",
|
||||
"selectmember": "Выбрать участника",
|
||||
"selectmembershiplevel": "Выбрать уровень членства",
|
||||
"searchmembershiplevel": "Поиск уровня членства",
|
||||
"billingaddress": "Адрес для выставления счета",
|
||||
"billingaddressdesc": "Введите платежные данные, связанные с членством или покупкой.",
|
||||
"billingname": "Имя для выставления счета",
|
||||
"billingnameinfo": "Введите имя лица или компании для выставления счета.",
|
||||
"billingstreet": "Биллинг Стрит",
|
||||
"billingstreetinfo": "Укажите основной адрес для выставления счета",
|
||||
"billingstreet2": "Биллинг Стрит 2",
|
||||
"billingstreetinfo2": "(Необязательно) Введите дополнительные данные об улице, если необходимо",
|
||||
"billingcity": "Город выставления счета",
|
||||
"billingcityinfo": "Укажите город для адреса выставления счета",
|
||||
"billingstate": "Штат выставления счета",
|
||||
"billingstateinfo": "Выберите или введите штат для адреса выставления счета",
|
||||
"billingpostelcode": "Почтовый индекс для выставления счета",
|
||||
"billingpostelcodeinfo": "Укажите почтовый индекс для точного выставления счета",
|
||||
"billingcounty": "Округ для выставления счета",
|
||||
"billingcountyinfo": "Выберите страну для адреса выставления счета",
|
||||
"billingphone": "Телефон для выставления счета",
|
||||
"billingphoneinfo": "Введите номер телефона для связи по вопросам, связанным с выставлением счета",
|
||||
"paymentinformation": "Информация о платеже",
|
||||
"paymentinformationdesc": "Просмотр и управление платежными данными, включая общую сумму и тип оплаты",
|
||||
"subtotal": "Итого",
|
||||
"subtotalinfo": "Общая сумма до вычета налогов и дополнительных сборов",
|
||||
"tax": "Налог",
|
||||
"taxinfo": "Применимый размер налога, рассчитанный на основе промежуточной суммы",
|
||||
"totalinfo": "Окончательная сумма к оплате, включая промежуточную сумму и налог",
|
||||
"entertotalamount": "Введите общую сумму",
|
||||
"paymenttype": "Тип оплаты",
|
||||
"paymenttypeinfo": "Укажите способ оплаты (например, PayPal, Stripe, RazorPay, UPI и т. д.)",
|
||||
"enterpaymenttype": "Введите тип оплаты",
|
||||
"paymenttypedesc": "Опишите используемый способ оплаты",
|
||||
"statusinfo": "Установите текущий статус заказа (например, ожидающий, завершенный, отмененный)",
|
||||
"success": "Успешно",
|
||||
"failed": "Не удалось",
|
||||
"paymentgatewayinformation": "Информация о платежном шлюзе",
|
||||
"paymentgatewayinformationdesc": "Сохраните сведения о транзакции, связанные с выбранным платежным шлюзом",
|
||||
"gatewayinfo": "Выберите платежный шлюз, используемый для обработки транзакции",
|
||||
"gatewayenvironment": "Среда шлюза",
|
||||
"gatewayenvironmentinfo": "Выберите режим реального времени или тестового режима для транзакций",
|
||||
"paymenttransactionid": "Идентификатор платежной транзакции",
|
||||
"paymenttransactionidinfo": "Введите или получите уникальный идентификатор, сгенерированный платежным шлюзом",
|
||||
"paymenttransactioniddesc": "Сгенерировано шлюзом. Полезно для перекрестных ссылок на заказы",
|
||||
"subscriptiontransactionidinfo": "Идентификатор транзакции, связанный с платежом на основе подписки",
|
||||
"subscriptiontransactioniddesc": "Сгенерировано шлюзом. Полезно для перекрестных ссылок на подписку",
|
||||
"selectgateway": "Выберите шлюз",
|
||||
"selectgatewayenvironment": "Выберите среду шлюза",
|
||||
"Deletemembershiporder": "Удалить заказ на членство?",
|
||||
"areyousure": "Вы уверены, что хотите удалить этот заказ на членство?",
|
||||
"Deletemembershiporders": "Удалить заказы на членство?",
|
||||
"areyousures": "Вы уверены, что хотите удалить эти заказы на членство?"
|
||||
}
|
||||
},
|
||||
"integrations": {
|
||||
"integration": "Интеграция",
|
||||
"headtitle": "SpurtCMS Pro v1.2 – Код + Поддержка",
|
||||
"title": "Полностью управляйте своей CMS с помощью SpurtCMS Pro v1.2, развернутой непосредственно на вашем сервере с премиум-функциями и пожизненными преимуществами.",
|
||||
"keypoint1": "Все, что вы видите в демоверсии — ваше",
|
||||
"keypoint2": "Пожизненные обновления — будьте впереди",
|
||||
"keypoint3": "30-часовая поддержка разработчиков — развертывание без проблем",
|
||||
"keypoint4": "Полностью White-Label — сделайте его своим",
|
||||
"keypoint5": "Эксклюзивные шаблоны Next.js — бесплатный доступ",
|
||||
"keypoint6": "Консультация эксперта — подготовьте свой бизнес к будущему",
|
||||
"keypoint7": "Получить полный исходный код",
|
||||
"cloudtite": "SpurtCMS Pro v1.2 Сборка с использованием технологий",
|
||||
"deschead": "Цены Часто задаваемые вопросы – SpurtCMS Pro v1.2",
|
||||
"list1": "Что я получу с покупкой?",
|
||||
"sublist1": "Вы получите полную версию SpurtCMS Pro v1.2, точно такую, как показано в демоверсии. Она включает в себя пожизненные обновления, 30 часов поддержки разработчиков, брендинг white label и доступ ко всем бесплатным шаблонам Next.js.",
|
||||
"list2": "Есть ли модель единовременной оплаты или подписки?",
|
||||
"sublist2": "Мы предлагаем модель единовременной оплаты. Заплатите один раз и пользуйтесь пожизненными преимуществами, включая будущие обновления и консультации экспертов.",
|
||||
"list3": "Вы предлагаете бесплатную пробную версию или демоверсию?",
|
||||
"sublist3": "Да! Вы можете попробовать нашу полнофункциональную демоверсию перед покупкой. То, что вы видите в демоверсии, — это именно то, что вы получите.",
|
||||
"list4": "Могу ли я получить возврат, если я не удовлетворен?",
|
||||
"sublist4": "Ввиду природы цифровых продуктов мы не предлагаем возврат средств после загрузки продукта. Однако мы предоставляем демо-версию, чтобы вы могли оценить ее перед покупкой.",
|
||||
"list5": "Что включено в 30 часов поддержки разработчиков?",
|
||||
"sublist5": "Наши разработчики помогут вам с:",
|
||||
"sublist6": "Установка и развертывание на вашем сервере",
|
||||
"sublist7": "Базовая конфигурация и настройка",
|
||||
"sublist8": "Незначительные исправления ошибок и оптимизация",
|
||||
"sublist9": "Руководство по настройке",
|
||||
"sublist10": "После 30 часов дополнительная поддержка доступна по почасовой ставке.",
|
||||
"list6": "Могу ли я использовать SpurtCMS Pro v1.2 для нескольких проектов?",
|
||||
"sublist11": "Ваша покупка включает одноразовую лицензию для одного домена/проекта. Для нескольких проектов требуются дополнительные лицензии.",
|
||||
"list7": "Как работает брендинг white-label?",
|
||||
"sublist12": "Вы можете полностью переименовать SpurtCMS Pro v1.2, изменив логотип, цвета, название бренда и другие визуальные элементы в соответствии с фирменным стилем вашего бизнеса.",
|
||||
"list8": "Могу ли я получить разработку индивидуальных функций?",
|
||||
"sublist13": "Да! Мы предлагаем услуги по консультированию и настройке. Если вам нужны дополнительные функции, наша команда разработчиков может создать их для вас по индивидуальной цене.",
|
||||
"list9": "Какие способы оплаты вы принимаете?",
|
||||
"sublist14": "Мы принимаем кредитные/дебетовые карты, PayPal и банковские переводы. Свяжитесь с нами, если вам нужны альтернативные варианты оплаты.",
|
||||
"list10": "Как начать работу после покупки?",
|
||||
"sublist15": "После завершения покупки вы получите:",
|
||||
"sublist16": "Ссылка для загрузки SpurtCMS Pro v1.2",
|
||||
"sublist17": "Подробное руководство по настройке",
|
||||
"sublist18": "Доступ к нашей команде поддержки разработчиков для помощи с установкой"
|
||||
},
|
||||
"AImodulesettings": {
|
||||
"cancel": "Отмена",
|
||||
"save": "Сохранить",
|
||||
"create": "Создать новый модуль ИИ",
|
||||
"aimodule": "Модуль ИИ",
|
||||
"description": "Описание",
|
||||
"lastupdatedon": "Последнее обновление",
|
||||
"status": "Статус",
|
||||
"model": "Модель",
|
||||
"action": "Действие",
|
||||
"edit": "Изменить",
|
||||
"delete": "Удалить",
|
||||
"aiemptytitle": "Модуль настроек ИИ не найден?",
|
||||
"aiemptydesc": "Улучшите свою систему с помощью автоматизации и интеллекта на основе ИИ. Выберите поставщика, настройте параметры и начните сегодня!",
|
||||
"selectmodule": "Выберите модуль",
|
||||
"selectmoduledesc": "Легко интегрируйте возможности ИИ, выбрав модуль, добавив ключ API и определив модель ИИ.",
|
||||
"openai": "Открыть ИИ",
|
||||
"openaidesc": "Использовать современная обработка естественного языка для автоматизированного создания контента и интеллектуальных ответов.",
|
||||
"google": "Google",
|
||||
"googledesc": "Используйте инструменты Google на базе ИИ для анализа текста, создания контента и автоматизации.",
|
||||
"deepseek": "Deep Seek",
|
||||
"deepseekdesc": "Используйте возможности глубокого обучения для расширенной обработки данных и аналитики на основе ИИ.",
|
||||
"apikey": "Ключ API",
|
||||
"apikeyplaceholder": "Введите ключ API",
|
||||
"descriptionplaceholder": "Введите описание",
|
||||
"aimodel": "Модель ИИ",
|
||||
"selectaimodel": "Выберите модель ИИ",
|
||||
"aimodelerr": "Пожалуйста, выберите Модель AI"
|
||||
},
|
||||
"Securitys": {
|
||||
"security": "Безопасность",
|
||||
"changepassword": "Изменить пароль",
|
||||
"changepassworddesc": "Обновите текущий пароль, чтобы повысить безопасность учетной записи.",
|
||||
"newpassword": "Новый пароль",
|
||||
"confirmpassword": "Подтвердите пароль",
|
||||
"cancel": "Отмена",
|
||||
"save": "Сохранить",
|
||||
"newpasswordinfo": "Введите надежный новый пароль, следуя требуемым рекомендациям по безопасности.",
|
||||
"confirmpasswordinfo": "Введите новый пароль еще раз, чтобы обеспечить точность и избежать ошибок."
|
||||
},
|
||||
"Course": {
|
||||
"course": "Курс",
|
||||
"manageandorganize": "Управляйте и организуйте образовательный контент с лёгкостью.",
|
||||
"createcourse": "Создать Курс",
|
||||
"recordsavailable": "Доступные Записи",
|
||||
"all": "Все",
|
||||
"selectfilters": "Выбрать Фильтры",
|
||||
"coursetitle": "Название Курса",
|
||||
"entercoursetitle": "Введите Название Курса",
|
||||
"status": "Статус",
|
||||
"selectstatus": "Выбрать Статус",
|
||||
"pricing": "Цены",
|
||||
"selectpricing": "Выбрать Цену",
|
||||
"clear": "Очистить",
|
||||
"applyfilter": "Применить Фильтр",
|
||||
"sortby": "Сортировать По",
|
||||
"lastupdated": "Последнее Обновление",
|
||||
"createddate": "Дата Создания",
|
||||
"ascending": "По Возрастанию",
|
||||
"descending": "По Убыванию",
|
||||
"createdBy": "Создано",
|
||||
"action": "Действие",
|
||||
"lastupdatedon": "Последнее обновление: ",
|
||||
"createdon": "Создано: ",
|
||||
"publish": "Опубликовать",
|
||||
"unpublish": "Отменить публикацию",
|
||||
"delete": "Удалить",
|
||||
"cancel": "Отмена",
|
||||
"save": "Сохранить",
|
||||
"title": "Заголовок",
|
||||
"enteryourtitle": "Введите Ваш Заголовок",
|
||||
"titleinfo": "Введите уникальный и описательный заголовок для вашего курса.",
|
||||
"description": "Описание",
|
||||
"enteryourdescription": "Введите Ваше Описание",
|
||||
"descriptioninfo": "Предоставьте подробное описание курса, выделяя ключевые темы и цели.",
|
||||
"category": "Категория",
|
||||
"categoryinfo": "Выберите подходящую категорию, чтобы организовать курс для лёгкого поиска.",
|
||||
"selectcategory": "Выбрать Категорию",
|
||||
"searchcategory": "Поиск Категории",
|
||||
"uploadcoverimage": "Загрузить Обложку",
|
||||
"uploadcoverimageinfo": "Выберите изображение для визуального представления курса.",
|
||||
"browse": "Обзор",
|
||||
"uploadnewfiles": "Загрузите новые файлы или выберите из директории",
|
||||
"chooseonly": "Допустимы только форматы jpg/jpeg/png",
|
||||
"nocoursesyet": "Курсов пока нет!",
|
||||
"startcreating": "Начните создавать увлекательные образовательные материалы уже сегодня! Добавьте курсы, которые подарят отличные впечатления вашим ученикам.",
|
||||
"deletecourse": "Удалить курс?",
|
||||
"areyousure": "Вы уверены, что хотите удалить этот курс?",
|
||||
"titleerror": "Пожалуйста, введите название курса",
|
||||
"descriptionerror": "Пожалуйста, введите описание курса",
|
||||
"categoryerror": "Пожалуйста, выберите категорию",
|
||||
"lesson": "Урок",
|
||||
"section": "раздел",
|
||||
"settings": "Настройки",
|
||||
"nolessonsyet": "Пока нет уроков!",
|
||||
"startbuilding": "Начните создавать значимые образовательные маршруты уже сегодня. Добавляйте уроки, которые вдохновляют, увлекают и эффективно обучают ваших учеников.",
|
||||
"createyourfirstlesson": "Создайте Свой Первый Урок",
|
||||
"newlesson": "Новый Урок",
|
||||
"newSection": "Новый Раздел",
|
||||
"addtext": "Добавить Текст",
|
||||
"addembed": "Добавить Встраивание",
|
||||
"addquiz": "Добавить Викторину",
|
||||
"addFiles": "Добавить Файлы",
|
||||
"deletelesson": "Удалить урок?",
|
||||
"areyousurewantlesson": "Вы уверены, что хотите удалить этот урок?",
|
||||
"deletesection": "Удалить раздел?",
|
||||
"areyousurewantsection": "Вы уверены, что хотите удалить этот раздел?",
|
||||
"createlesson": "Создать урок",
|
||||
"updatelesson": "Обновить урок",
|
||||
"createsection": "Создать раздел",
|
||||
"updatesection": "Обновить раздел"
|
||||
},
|
||||
"Coursessettings": {
|
||||
"settings": "Настройки",
|
||||
"details": "Подробности",
|
||||
"title": "Заголовок",
|
||||
"titledesc": "Введите четкое и краткое название курса.",
|
||||
"description": "Описание",
|
||||
"desccont": "Предоставьте подробный обзор курса, включая ключевые темы и результаты обучения.",
|
||||
"image": "Изображение",
|
||||
"imagedesc": "Загрузите изображение обложки, представляющее курс. Выберите высококачественное изображение для лучшего взаимодействия.",
|
||||
"chooseimg": "Выберите изображение",
|
||||
"category": "Категория",
|
||||
"catdesc": "Выберите соответствующую категорию, чтобы классифицировать курс для облегчения поиска.",
|
||||
"searchcat": "Категории поиска",
|
||||
"options": "Параметры",
|
||||
"certificate": "Сертификат",
|
||||
"cerdesc": "Включите эту опцию, если вы хотите предоставить сертификат по завершении курса.",
|
||||
"cerstatus": "Предоставить сертификат на этот курс",
|
||||
"comments": "Комментарии",
|
||||
"commentsdesc": "Предоставьте любую информацию о предварительных условиях для изучения этого курса или специальные инструкции для учащихся.",
|
||||
"active": "Активный",
|
||||
"inactive": "В активном состоянии",
|
||||
"pricing": "Цены",
|
||||
"offer": "Предложение",
|
||||
"offerdesc": "Выберите модель ценообразования для своего курса — бесплатно, по листу ожидания или платно.",
|
||||
"offerchange": "Изменить параметры предложения",
|
||||
"free": "Бесплатно",
|
||||
"freedesc": "Курс доступен слушателям бесплатно.",
|
||||
"waitlist": "Список ожидания",
|
||||
"waitlistdesc": "Учащиеся могут зарегистрироваться, но доступ предоставляется позже.",
|
||||
"paid": "Оплаченный",
|
||||
"paiddesc": "Для регистрации на курс требуется оплата.",
|
||||
"availability": "Доступность",
|
||||
"status": "Статус",
|
||||
"statusdesc": "Установите курс как активный или неактивный.",
|
||||
"visibility": "Видимость",
|
||||
"visibilitydesc": "Определите, кто может просматривать курс и записываться на него.",
|
||||
"published": "Опубликовано",
|
||||
"unpublish": "Неопубликовано",
|
||||
"draft": "Черновик",
|
||||
"selectvisible": "Выберите Видимость",
|
||||
"public": "Общественный",
|
||||
"private": "Частный",
|
||||
"startdate": "Дата начала",
|
||||
"datedesc": "Установите конкретную дату, когда курс станет доступен.",
|
||||
"singuplimit": "Лимит регистрации",
|
||||
"singuplimitdesc": "Specify a maximum number of students allowed for the course.",
|
||||
"enterlimits": "Введите пределы",
|
||||
"duration": "Продолжительность",
|
||||
"durationdesc": "Определите, как долго курс будет доступен после регистрации.",
|
||||
"selectduration": "Выберите продолжительность",
|
||||
"month": "Месяц",
|
||||
"year": "Год",
|
||||
"visiblityerr": "Пожалуйста, выберите видимость",
|
||||
"dateerr": "Пожалуйста, выберите конкретную дату",
|
||||
"limiterr": "Пожалуйста, введите максимальные лимиты регистрации",
|
||||
"durationerr": "Пожалуйста, выберите Продолжительность курса",
|
||||
"pricemodelerr": "Пожалуйста, выберите модель ценообразования для вашего курса"
|
||||
},
|
||||
"Menu": {
|
||||
"website": "Веб-сайт",
|
||||
"templates": "Шаблоны",
|
||||
"seo": "SEO",
|
||||
"setting": "Настройки",
|
||||
"webdesc": "Настройте свой сайт и позвольте вашему бренду сиять",
|
||||
"bannertitle": "Мощные инструменты управления сайтом",
|
||||
"bannerdesc": "Легко создавайте и настраивайте свой сайт с помощью интуитивных элементов управления и гибких шаблонов. Вкладка «Веб-сайт» позволяет организовывать страницы, настраивать навигацию и всегда поддерживать актуальность контента, обеспечивая вашим посетителям бесшовный опыт.",
|
||||
"menu": "Меню",
|
||||
"menuname": "Название Меню",
|
||||
"totalitems": "Всего Элементов",
|
||||
"status": "Статус",
|
||||
"lastmodified": "Последнее Изменение",
|
||||
"action": "Действие",
|
||||
"createmenu": "Создать Меню",
|
||||
"createnewmenu": "Создать Новое Меню",
|
||||
"description": "Описание",
|
||||
"managemenu": "Управление Меню",
|
||||
"managemenudesc": "Управляйте параметрами и настройками меню",
|
||||
"choosemenuitem": "Выбрать Элементы Меню",
|
||||
"addmenuitems": "Добавить Элементы в Меню",
|
||||
"addtomenu": "Добавить в меню",
|
||||
"mostrecent": "Самые последние",
|
||||
"viewall": "Показать все",
|
||||
"selectall": "Выбрать все",
|
||||
"addmenuitem": "Добавить Элемент Меню",
|
||||
"labelname": "Имя Метки",
|
||||
"labelnameplcholder": "Введите имя метки",
|
||||
"navigationpath": "Путь навигации",
|
||||
"navplcholder": "Укажите путь ссылки",
|
||||
"additem": "Добавить элемент",
|
||||
"labelnameerr": "Пожалуйста, введите имя метки",
|
||||
"linkpatherr": "Пожалуйста, введите путь ссылки",
|
||||
"menunameerr": "Пожалуйста, введите название меню",
|
||||
"nameduplicateerr": "Название меню уже существует",
|
||||
"descriptionerror": "Пожалуйста, введите описание меню",
|
||||
"namelimiterr": "Пожалуйста, введите не более 15 символов",
|
||||
"pathlimiterr": "Пожалуйста, введите не более 30 символов",
|
||||
"removeconfirmation": "Вы уверены, что хотите удалить это меню?",
|
||||
"deletemenu": "Удалить меню",
|
||||
"deselectall": "Отменитьвыборвсех"
|
||||
},
|
||||
"Seo": {
|
||||
"homepage": "Главная Страница",
|
||||
"pagetitle": "Заголовок Страницы",
|
||||
"homepagetitle": "Заголовок Главной Страницы",
|
||||
"pagedescription": "Описание Страницы",
|
||||
"homepagedescription": "Описание Главной Страницы",
|
||||
"pagekeyword": "Ключевое Слово Страницы",
|
||||
"homepagekeyword": "Ключевое Слово Главной Страницы",
|
||||
"save": "Сохранить",
|
||||
"store": "Магазин",
|
||||
"storetitle": "Заголовок Магазина",
|
||||
"storepagetitle": "Заголовок Страницы Магазина",
|
||||
"storedescription": "Описание Магазина",
|
||||
"storepagedescription": "Описание Страницы Магазина",
|
||||
"storekeyword": "Ключевое Слово Магазина",
|
||||
"storepagekeyword": "Ключевое Слово Страницы Магазина",
|
||||
"sitemap": "Карта Сайта",
|
||||
"choosefile": "Выбрать Файл",
|
||||
"nofilechosen": "Файл Не Выбран",
|
||||
"update": "Обновить",
|
||||
"pleaseentertitle": "Пожалуйста, Введите Заголовок",
|
||||
"pleaseenterdescripion": "Пожалуйста, Введите Описание",
|
||||
"pleaseenterkeyword": "Пожалуйста, Введите Ключевое Слово",
|
||||
"titlemustnotexceed55characters": "Заголовок Не Должен Превышать 55 Символов",
|
||||
"descriptionmustnotexceed155characters": "Описание Не Должно Превышать 155 Символов",
|
||||
"keywordmustnotexceed155characters": "Ключевое Слово Не Должно Превышать 155 Символов",
|
||||
"pleasechooseimage": "Пожалуйста, Выберите Изображение"
|
||||
},
|
||||
"WebsiteSettings": {
|
||||
"sitename": "Название Сайта",
|
||||
"spurtcms": "SpurtCMS",
|
||||
"sitelogo": "Логотип Сайта",
|
||||
"sitefavicon": "Фавикон Сайта",
|
||||
"websiteurl": "URL Веб-сайта",
|
||||
"subdomain": "Поддомен",
|
||||
"spurtcmscom": ".spurtcms.com",
|
||||
"pleaseenteryoursitename": "Пожалуйста, Введите Название Сайта",
|
||||
"maximumlength20": "Максимальная Длина Не Должна Превышать 20 Символов",
|
||||
"pleaseenteryourwebsiteurl": "Пожалуйста, Введите URL Вашего Сайта",
|
||||
"onlylowercaselettersandnumbersareallowed": "Разрешены только строчные буквы и цифры"
|
||||
}
|
||||
}
|
||||
Executable → Regular
+23
-24
@@ -6,7 +6,7 @@ import (
|
||||
"os"
|
||||
)
|
||||
|
||||
var LogFile = "logs/error.log"
|
||||
var LogFilePath = "logs/error.log"
|
||||
|
||||
const (
|
||||
InfoLevel = iota
|
||||
@@ -25,45 +25,44 @@ var logger *Logger
|
||||
|
||||
func init() {
|
||||
|
||||
makedir := os.Mkdir("logs", os.ModePerm)
|
||||
_, err := os.Stat(LogFilePath)
|
||||
|
||||
if makedir != nil {
|
||||
|
||||
fmt.Println(makedir)
|
||||
|
||||
}
|
||||
|
||||
_, err := os.Stat(LogFile)
|
||||
|
||||
var file *os.File
|
||||
var LogFile *os.File
|
||||
|
||||
if os.IsNotExist(err) {
|
||||
// Create the file since it does not exist
|
||||
_, err = os.Create(LogFile)
|
||||
|
||||
if err != nil {
|
||||
fmt.Printf("Failed to create log file: %v", err)
|
||||
makErr := os.MkdirAll("logs/", 0777)
|
||||
|
||||
if makErr != nil {
|
||||
|
||||
fmt.Println(makErr)
|
||||
|
||||
}
|
||||
|
||||
fmt.Println("Created new log file.")
|
||||
_, err = os.Create(LogFilePath)
|
||||
|
||||
if err != nil {
|
||||
|
||||
fmt.Printf("failed to create log file: %v\n",err)
|
||||
}
|
||||
|
||||
fmt.Println("Created a new log file")
|
||||
}
|
||||
|
||||
file, err = os.OpenFile(LogFile, os.O_APPEND|os.O_WRONLY, 0666)
|
||||
LogFile, err = os.OpenFile(LogFilePath, os.O_APPEND|os.O_WRONLY, 0666)
|
||||
|
||||
if err != nil {
|
||||
|
||||
fmt.Printf("Failed to open log file: %v", err)
|
||||
fmt.Printf("failed to open log file: %v\n",err)
|
||||
}
|
||||
|
||||
log.SetOutput(file)
|
||||
|
||||
logger = &Logger{
|
||||
Level: InfoLevel,
|
||||
InfoLogger: log.New(file, "INFO ", log.LstdFlags|log.Lshortfile),
|
||||
WarnLogger: log.New(file, "WARN ", log.LstdFlags|log.Lshortfile),
|
||||
ErrorLogger: log.New(file, "ERROR ", log.LstdFlags|log.Lshortfile),
|
||||
InfoLogger: log.New(LogFile, "INFO ", log.LstdFlags|log.Lshortfile),
|
||||
WarnLogger: log.New(LogFile, "WARN ", log.LstdFlags|log.Lshortfile),
|
||||
ErrorLogger: log.New(LogFile, "ERROR ", log.LstdFlags|log.Lshortfile),
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func ErrorLog()*log.Logger{
|
||||
@@ -72,4 +71,4 @@ func ErrorLog()*log.Logger{
|
||||
|
||||
func WarnLog()*log.Logger{
|
||||
return logger.ErrorLogger
|
||||
}
|
||||
}
|
||||
|
||||
Executable → Regular
+356
-2396
File diff suppressed because it is too large
Load Diff
@@ -37,10 +37,9 @@ func main() {
|
||||
|
||||
controllers.LastUpdated()
|
||||
|
||||
|
||||
var wg sync.WaitGroup
|
||||
|
||||
wg.Add(3)
|
||||
wg.Add(4)
|
||||
|
||||
go RunAdminPanel(&wg)
|
||||
|
||||
|
||||
Executable → Regular
+213
-26
@@ -104,12 +104,12 @@ func TestMemberGroupList(t *testing.T) {
|
||||
},
|
||||
}))
|
||||
|
||||
U := r.Group("/membersgroup") // Assuming your routes are under this group
|
||||
U := r.Group("/usergroup") // Assuming your routes are under this group
|
||||
{
|
||||
U.GET("/", middleware.JWTAuth(), controllers.MemberGroupList)
|
||||
}
|
||||
|
||||
req, err := http.NewRequest("GET", "/membersgroup/", nil)
|
||||
req, err := http.NewRequest("GET", "/usergroup/", nil)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -149,7 +149,6 @@ func TestMemberGroupList(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Create member group
|
||||
|
||||
func TestCreateNewMemberGroup(t *testing.T) {
|
||||
@@ -159,11 +158,11 @@ func TestCreateNewMemberGroup(t *testing.T) {
|
||||
|
||||
token, _, _ := controllers.NewAuth.Checklogin("Admin", "Admin@123", controllers.TenantId)
|
||||
|
||||
MG := r.Group("/membersgroup") // Assuming your routes are under this group
|
||||
MG := r.Group("/usergroup") // Assuming your routes are under this group
|
||||
{
|
||||
MG.POST("/newgroup", middleware.JWTAuth(), controllers.CreateNewMemberGroup)
|
||||
}
|
||||
req, err := http.NewRequest("POST", "/membersgroup/newgroup", strings.NewReader("membergroup_name=newtodaygrp&membergroup_desc=success&1"))
|
||||
req, err := http.NewRequest("POST", "/usergroup/newgroup", strings.NewReader("membergroup_name=newtodaygrp&membergroup_desc=success&1"))
|
||||
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -193,11 +192,11 @@ func TestUpdateMemberGroup(t *testing.T) {
|
||||
|
||||
token, _, _ := controllers.NewAuth.Checklogin("Admin", "Admin@123", controllers.TenantId)
|
||||
|
||||
MG := r.Group("/membersgroup") // Assuming your routes are under this group
|
||||
MG := r.Group("/usergroup") // Assuming your routes are under this group
|
||||
{
|
||||
MG.POST("/updategroup", middleware.JWTAuth(), controllers.UpdateMemberGroup)
|
||||
}
|
||||
req, err := http.NewRequest("POST", "/membersgroup/updategroup", strings.NewReader("id=2&membergroup_name=newtodaygrp&membergroup_desc=success"))
|
||||
req, err := http.NewRequest("POST", "/usergroup/updategroup", strings.NewReader("id=2&membergroup_name=newtodaygrp&membergroup_desc=success"))
|
||||
|
||||
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
|
||||
|
||||
@@ -281,12 +280,12 @@ func TestDeleteMemberGroup(t *testing.T) {
|
||||
},
|
||||
}))
|
||||
|
||||
U := r.Group("/membersgroup") // Assuming your routes are under this group
|
||||
U := r.Group("/usergroup") // Assuming your routes are under this group
|
||||
{
|
||||
U.GET("/deletegroup", middleware.JWTAuth(), controllers.DeleteMemberGroup)
|
||||
}
|
||||
var id = "13"
|
||||
req, err := http.NewRequest("GET", "/membersgroup/deletegroup?id="+id, nil)
|
||||
req, err := http.NewRequest("GET", "/usergroup/deletegroup?id="+id, nil)
|
||||
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -596,7 +595,7 @@ func TestMemberList(t *testing.T) {
|
||||
U.GET("/", middleware.JWTAuth(), controllers.MemberList)
|
||||
}
|
||||
|
||||
req, err := http.NewRequest("GET", "/member/", nil)
|
||||
req, err := http.NewRequest("GET", "/user/", nil)
|
||||
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -656,7 +655,7 @@ func TestCreateMember(t *testing.T) {
|
||||
}
|
||||
|
||||
// Create a new HTTP request with the form data encoded
|
||||
req, err := http.NewRequest("POST", "/member/newmember", strings.NewReader("mem_name=IPL&mem_email=ipl@gmail.com&mem_mobile=8824003212&mem_usrname=welcome&mem_pass=mempassword123&mem_activestat=1&membergroupvalue=1"))
|
||||
req, err := http.NewRequest("POST", "/user/newmember", strings.NewReader("mem_name=IPL&mem_email=ipl@gmail.com&mem_mobile=8824003212&mem_usrname=welcome&mem_pass=mempassword123&mem_activestat=1&membergroupvalue=1"))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -691,7 +690,7 @@ func TestUpdateMember(t *testing.T) {
|
||||
}
|
||||
|
||||
// Create a new HTTP request with the form data encoded
|
||||
req, err := http.NewRequest("POST", "/member/updatemember", strings.NewReader("mem_name=IPL 2024&mem_email=ipl@gmail.com&mem_mobile=8824003212&mem_usrname=welcome&mem_pass=mempassword123&mem_activestat=1&membergroupvalue=1"))
|
||||
req, err := http.NewRequest("POST", "/user/updatemember", strings.NewReader("mem_name=IPL 2024&mem_email=ipl@gmail.com&mem_mobile=8824003212&mem_usrname=welcome&mem_pass=mempassword123&mem_activestat=1&membergroupvalue=1"))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -728,7 +727,7 @@ func TestDeleteMember(t *testing.T) {
|
||||
}
|
||||
|
||||
id := "44"
|
||||
req, err := http.NewRequest("GET", "/member/deletemember?id="+id, nil)
|
||||
req, err := http.NewRequest("GET", "/user/deletemember?id="+id, nil)
|
||||
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -1885,7 +1884,7 @@ func TestCreateChannel(t *testing.T) {
|
||||
formData.Set("sectionvalue", `{"sections":[{"SectionId":"13","SectionNewId":"34","SectionName":"New Section","MasterFieldId":"0","OrderIndex":"0"}]}`)
|
||||
// formData.Set("fval", `{"fiedlvalue":[{"MasterFieldId":"0","FieldId":"14","NewFieldId":"34","MasterFieldId":"0","FieldName":"Text"}]}`)
|
||||
formData.Set("categoryvalue", "[12]")
|
||||
req, err := http.NewRequest("POST", "/channels/newchannel", strings.NewReader(formData.Encode()))
|
||||
req, err := http.NewRequest("POST", "/channels/create", strings.NewReader(formData.Encode()))
|
||||
|
||||
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
|
||||
if err != nil {
|
||||
@@ -2262,7 +2261,7 @@ func TestAllEntries(t *testing.T) {
|
||||
U.GET("/entrylist/", middleware.JWTAuth(), controllers.AllEntries)
|
||||
}
|
||||
|
||||
req, err := http.NewRequest("GET", "/channel/entrylist/", nil)
|
||||
req, err := http.NewRequest("GET", "/entries/entrylist/", nil)
|
||||
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -2370,7 +2369,7 @@ func TestEntries(t *testing.T) {
|
||||
|
||||
id := "97"
|
||||
|
||||
req, err := http.NewRequest("GET", "/channel/entrylist/"+id, nil)
|
||||
req, err := http.NewRequest("GET", "/entries/entrylist/"+id, nil)
|
||||
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -2473,10 +2472,10 @@ func TestCreateEntry(t *testing.T) {
|
||||
|
||||
MG := r.Group("/channel") // Assuming your routes are under this group
|
||||
{
|
||||
MG.GET("/newentry", middleware.JWTAuth(), controllers.EditEntry)
|
||||
MG.GET("/create", middleware.JWTAuth(), controllers.EditEntry)
|
||||
}
|
||||
|
||||
req, err := http.NewRequest("GET", "/channel/newentry", nil)
|
||||
req, err := http.NewRequest("GET", "/entries/create", nil)
|
||||
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -2528,7 +2527,7 @@ func TestEntryStatus(t *testing.T) {
|
||||
// status publish functionality
|
||||
id := "102"
|
||||
|
||||
req, err := http.NewRequest("POST", "/channel/changestatus/"+id, strings.NewReader("entryid=111&cname=Blog&status=0"))
|
||||
req, err := http.NewRequest("POST", "/entries/changestatus/"+id, strings.NewReader("entryid=111&cname=Blog&status=0"))
|
||||
|
||||
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
|
||||
if err != nil {
|
||||
@@ -2618,7 +2617,7 @@ func TestEditDetails(t *testing.T) {
|
||||
id := "110"
|
||||
channelname := "Blog"
|
||||
|
||||
req, err := http.NewRequest("GET", "/channel/editentrydetails/"+channelname+"/"+id, nil)
|
||||
req, err := http.NewRequest("GET", "/entries/editentrydetails/"+channelname+"/"+id, nil)
|
||||
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -2677,16 +2676,16 @@ func TestPublishEntry(t *testing.T) {
|
||||
|
||||
// status publish functionality
|
||||
id := "108"
|
||||
// req, err := http.NewRequest("POST", "/channel/publishentry/"+id, strings.NewReader("id=105&cname=Welcome&title=Today&text=today test case pass&image=/storage/media/deer(680*340)(2024-03-27T11:08:49.783Z).jpg&status=1"))
|
||||
// req, err := http.NewRequest("POST", "/entries/publishentry/"+id, strings.NewReader("id=105&cname=Welcome&title=Today&text=today test case pass&image=/storage/media/deer(680*340)(2024-03-27T11:08:49.783Z).jpg&status=1"))
|
||||
|
||||
req, err := http.NewRequest("POST", "/channel/draftentry/"+id, strings.NewReader("id=105&cname=Welcome&title=Today&text=today test case pass&image=/storage/media/deer(680*340)(2024-03-27T11:08:49.783Z).jpg&status=1"))
|
||||
req, err := http.NewRequest("POST", "/entries/draftentry/"+id, strings.NewReader("id=105&cname=Welcome&title=Today&text=today test case pass&image=/storage/media/deer(680*340)(2024-03-27T11:08:49.783Z).jpg&status=1"))
|
||||
|
||||
// create entry
|
||||
// id := "undefined"
|
||||
// req, err := http.NewRequest("POST", "/channel/publishentry/"+id, strings.NewReader("id=98&cname=Welcome&title=Today&text=today test case pass&image=/storage/media/deer(680*340)(2024-03-27T11:08:49.783Z).jpg&status=1"))
|
||||
// req, err := http.NewRequest("POST", "/entries/publishentry/"+id, strings.NewReader("id=98&cname=Welcome&title=Today&text=today test case pass&image=/storage/media/deer(680*340)(2024-03-27T11:08:49.783Z).jpg&status=1"))
|
||||
|
||||
// draft functionality
|
||||
// req, err := http.NewRequest("POST", "/channel/publishentry/"+id, strings.NewReader("id=98&cname=Welcome&title=Today&text=today test case pass&image=/storage/media/deer(680*340)(2024-03-27T11:08:49.783Z).jpg&status=0"))
|
||||
// req, err := http.NewRequest("POST", "/entries/publishentry/"+id, strings.NewReader("id=98&cname=Welcome&title=Today&text=today test case pass&image=/storage/media/deer(680*340)(2024-03-27T11:08:49.783Z).jpg&status=0"))
|
||||
|
||||
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
|
||||
if err != nil {
|
||||
@@ -2775,7 +2774,7 @@ func TestEditEntry(t *testing.T) {
|
||||
|
||||
id := "108"
|
||||
|
||||
req, err := http.NewRequest("GET", "/channel/copyentry/"+id, nil)
|
||||
req, err := http.NewRequest("GET", "/entries/copyentry/"+id, nil)
|
||||
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -2876,7 +2875,7 @@ func TestDeleteEntries(t *testing.T) {
|
||||
var id = "105"
|
||||
var cname = "NEW"
|
||||
var page = "1"
|
||||
req, err := http.NewRequest("GET", "/channel/deleteentries/?id="+id+"&cname="+cname+"&page"+page, nil)
|
||||
req, err := http.NewRequest("GET", "/entries/deleteentries/?id="+id+"&cname="+cname+"&page"+page, nil)
|
||||
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -2911,6 +2910,194 @@ func TestDeleteEntries(t *testing.T) {
|
||||
|
||||
}
|
||||
|
||||
// Media list
|
||||
func TestMediaList(t *testing.T) {
|
||||
|
||||
controllers.PackageInitialize()
|
||||
|
||||
token, _, _ := controllers.NewAuth.Checklogin("Admin", "Admin@123", controllers.TenantId)
|
||||
// Create a new Gin router
|
||||
r := gin.Default()
|
||||
|
||||
r.Use(lang.TranslateHandler)
|
||||
|
||||
var htmlfiles []string
|
||||
|
||||
filepath.Walk("./", func(path string, info os.FileInfo, err error) error {
|
||||
if strings.HasSuffix(path, ".html") {
|
||||
htmlfiles = append(htmlfiles, path)
|
||||
}
|
||||
return nil
|
||||
})
|
||||
r.LoadHTMLFiles(htmlfiles...)
|
||||
|
||||
json_folder := "locales/"
|
||||
|
||||
var default_lang models.TblLanguage
|
||||
|
||||
translation, err := lang.LoadTranslation(default_lang.JsonPath)
|
||||
|
||||
if err != nil {
|
||||
|
||||
translation, err = lang.LoadTranslation(json_folder + "en.json")
|
||||
|
||||
if err != nil {
|
||||
|
||||
c.AbortWithError(http.StatusInternalServerError, err)
|
||||
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
r.Use(func(c *gin.Context) {
|
||||
c.Set("translation", translation)
|
||||
c.Next()
|
||||
})
|
||||
|
||||
store := cookie.NewStore([]byte(os.Getenv("CSRF_SECRET")))
|
||||
|
||||
r.Use(sessions.Sessions(os.Getenv("SESSION_KEY3"), store))
|
||||
|
||||
r.Use(csrf.Middleware(csrf.Options{
|
||||
|
||||
Secret: "secret123",
|
||||
ErrorFunc: func(c *gin.Context) {
|
||||
c.String(400, "CSRF token mismatch")
|
||||
c.Abort()
|
||||
|
||||
},
|
||||
}))
|
||||
|
||||
U := r.Group("/media") // Assuming your routes are under this group
|
||||
{
|
||||
U.GET("/", middleware.JWTAuth(), controllers.MediaList)
|
||||
}
|
||||
|
||||
req, err := http.NewRequest("GET", "/media/", nil)
|
||||
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
req.Header.Add("myspurtcms", token)
|
||||
|
||||
// Create a new session
|
||||
session, err := store.Get(req, os.Getenv("SESSION_KEY"))
|
||||
if err != nil {
|
||||
t.Errorf("Failed to get session: %v", err)
|
||||
return
|
||||
}
|
||||
|
||||
// Set the token in the session
|
||||
session.Values["token"] = token
|
||||
err = session.Save(req, httptest.NewRecorder())
|
||||
if err != nil {
|
||||
t.Errorf("Failed to save session: %v", err)
|
||||
return
|
||||
}
|
||||
w := httptest.NewRecorder()
|
||||
|
||||
r.ServeHTTP(w, req)
|
||||
|
||||
// Check the HTTP status code
|
||||
if w.Code != http.StatusOK { // Change the expected status code to http.StatusOK
|
||||
t.Errorf("Expected status code %d, got %d", http.StatusOK, w.Code)
|
||||
} else {
|
||||
t.Logf("Expected status code %d, got %d", http.StatusOK, w.Code)
|
||||
|
||||
}
|
||||
|
||||
expectedChannel := "deer(680*340)(2024-03-27T11:16:25.278Z).jpg"
|
||||
if !strings.Contains(w.Body.String(), expectedChannel) {
|
||||
t.Errorf("Expected Image %s not found in response body", expectedChannel)
|
||||
} else {
|
||||
|
||||
t.Logf("Expected Image %v found in response body", expectedChannel)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Create Media Folder
|
||||
|
||||
func TestAddFolder(t *testing.T) {
|
||||
|
||||
// Create a new Gin router
|
||||
r := gin.Default()
|
||||
|
||||
controllers.PackageInitialize()
|
||||
|
||||
token, _, _ := controllers.NewAuth.Checklogin("Admin", "Admin@123", controllers.TenantId)
|
||||
MG := r.Group("/media") // Assuming your routes are under this group
|
||||
{
|
||||
MG.POST("/createfolder", middleware.JWTAuth(), controllers.AddFolder)
|
||||
}
|
||||
req, err := http.NewRequest("POST", "/media/createfolder", strings.NewReader("foldername=New"))
|
||||
|
||||
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
req.Header.Add("myspurtcms", token)
|
||||
|
||||
// controllers.AUTH = spurtcore.NewInstance(&auth.Option{DB: DB, Token: token, Secret: os.Getenv("JWT_SECRET")})
|
||||
|
||||
w := httptest.NewRecorder()
|
||||
|
||||
r.ServeHTTP(w, req)
|
||||
|
||||
// Check the HTTP status code
|
||||
if w.Code != http.StatusOK { // Change the expected status code tohttp.StatusMovedPermanently
|
||||
t.Errorf("Expected status code %d, got %d", http.StatusOK, w.Code)
|
||||
} else {
|
||||
t.Logf("Expected status code %d, got %d", http.StatusOK, w.Code)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Delete Media folder
|
||||
func TestDeleteFolderFile(t *testing.T) {
|
||||
|
||||
// Create a new Gin router
|
||||
r := gin.Default()
|
||||
|
||||
controllers.PackageInitialize()
|
||||
|
||||
token, _, _ := controllers.NewAuth.Checklogin("Admin", "Admin@123", controllers.TenantId)
|
||||
|
||||
U := r.Group("/media") // Assuming your routes are under this group
|
||||
{
|
||||
U.POST("/deletefolfile", middleware.JWTAuth(), controllers.DeleteFolderFile)
|
||||
}
|
||||
|
||||
// formData.Set("id", "['deer(680*340)(2024-03-27T11:16:25.278Z).jpg']")
|
||||
formData := url.Values{}
|
||||
|
||||
formData.Set("id", "['deer.jpg']")
|
||||
|
||||
req, err := http.NewRequest("POST", "/media/deletefolfile", strings.NewReader(formData.Encode()))
|
||||
// req, err := http.NewRequest("POST", "/media/deletefolfile", strings.NewReader("id=['New']"))
|
||||
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
req.Header.Add("myspurtcms", token)
|
||||
|
||||
// controllers.AUTH = spurtcore.NewInstance(&auth.Option{DB: DB, Token: token, Secret: os.Getenv("JWT_SECRET")})
|
||||
|
||||
w := httptest.NewRecorder()
|
||||
|
||||
r.ServeHTTP(w, req)
|
||||
|
||||
// Check the HTTP status code
|
||||
if w.Code != http.StatusOK { // Change the expected status code to http.StatusOK
|
||||
t.Errorf("Expected status code %d, got %d ", http.StatusOK, w.Code)
|
||||
} else {
|
||||
t.Logf("Expected status code %d, got %d", http.StatusOK, w.Code)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Category group list
|
||||
func TestCategoryGroupList(t *testing.T) {
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ import (
|
||||
"spurt-cms/controllers"
|
||||
"spurt-cms/models"
|
||||
|
||||
// "strconv"
|
||||
|
||||
"github.com/dgrijalva/jwt-go"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@@ -16,6 +18,10 @@ func JWTAuth() gin.HandlerFunc {
|
||||
|
||||
return func(c *gin.Context) {
|
||||
|
||||
c.Header("Cache-Control", "no-store, no-cache, must-revalidate, private")
|
||||
c.Header("Pragma", "no-cache")
|
||||
c.Header("Expires", "0")
|
||||
|
||||
session, _ := controllers.Store.Get(c.Request, os.Getenv("SESSION_KEY"))
|
||||
|
||||
tkn := session.Values["token"]
|
||||
@@ -62,6 +68,10 @@ func JWTAuth() gin.HandlerFunc {
|
||||
|
||||
session.Save(c.Request, c.Writer)
|
||||
|
||||
for _, cookie := range c.Request.Cookies() {
|
||||
c.SetCookie(cookie.Name, "", -1, "/", "", false, true)
|
||||
}
|
||||
|
||||
c.Redirect(301, "/")
|
||||
return
|
||||
}
|
||||
@@ -90,14 +100,52 @@ func JWTAuth() gin.HandlerFunc {
|
||||
|
||||
session.Save(c.Request, c.Writer)
|
||||
|
||||
for _, cookie := range c.Request.Cookies() {
|
||||
c.SetCookie(cookie.Name, "", -1, "/", "", false, true)
|
||||
}
|
||||
|
||||
c.Redirect(301, "/")
|
||||
|
||||
}
|
||||
|
||||
c.Set("default_language_id", user.DefaultLanguageId)
|
||||
|
||||
c.Set("tenant_id", user.TenantId)
|
||||
|
||||
c.Set("userDetails", user)
|
||||
|
||||
c.Set("go_template_default", user.GoTemplateDefault)
|
||||
|
||||
// host := c.Request.Host
|
||||
|
||||
// if strings.Contains(host, "spurtcms.com") {
|
||||
|
||||
// sub := strings.Split(host, ".")[0]
|
||||
|
||||
// if sub != "" {
|
||||
|
||||
// if sub != user.Subdomain {
|
||||
// c.HTML(404, "nodata.html", nil)
|
||||
// c.Abort()
|
||||
// return
|
||||
// }
|
||||
|
||||
// }
|
||||
// } else if strings.Contains(host, "lvh.me") {
|
||||
|
||||
// sub := strings.Split(host, ".")[0]
|
||||
|
||||
// if sub != "" {
|
||||
|
||||
// if sub != user.Subdomain {
|
||||
// c.HTML(404, "nodata.html", nil)
|
||||
// c.Abort()
|
||||
// return
|
||||
// }
|
||||
|
||||
// }
|
||||
// }
|
||||
|
||||
controllers.Tenant_Id(c)
|
||||
|
||||
//set middleware user datas
|
||||
@@ -0,0 +1,65 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
"spurt-cms/controllers"
|
||||
"strconv"
|
||||
|
||||
"github.com/dgrijalva/jwt-go"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func DashBoardAuth() gin.HandlerFunc {
|
||||
|
||||
return func(c *gin.Context) {
|
||||
|
||||
session, _ := controllers.Store.Get(c.Request, os.Getenv("SESSION_KEY"))
|
||||
|
||||
tkn := session.Values["token"]
|
||||
|
||||
if tkn != "" && tkn != nil {
|
||||
|
||||
tkn := session.Values["token"].(string)
|
||||
|
||||
claims := jwt.MapClaims{}
|
||||
token, err := jwt.ParseWithClaims(tkn, claims, func(token *jwt.Token) (interface{}, error) {
|
||||
return []byte(os.Getenv("JWT_SECRET")), nil
|
||||
})
|
||||
if err != nil || !token.Valid {
|
||||
c.Redirect(http.StatusFound, "/")
|
||||
return
|
||||
}
|
||||
|
||||
userIDFloat, ok := claims["user_id"].(float64)
|
||||
if !ok {
|
||||
|
||||
c.Redirect(http.StatusFound, "/")
|
||||
return
|
||||
}
|
||||
userID := int(userIDFloat)
|
||||
|
||||
user, _, _ := controllers.NewTeamWP.GetUserById(userID, []int{})
|
||||
|
||||
host := c.Request.Host
|
||||
|
||||
var redirectURL string
|
||||
|
||||
if host == "spurtcms.com" {
|
||||
|
||||
redirectURL = fmt.Sprintf("https://%s.spurtcms.com/admin/dashboard", user.FirstName+strconv.Itoa(user.Id))
|
||||
|
||||
} else {
|
||||
redirectURL = fmt.Sprintf("http://%s.lvh.me:8080/admin/dashboard", user.Subdomain)
|
||||
}
|
||||
|
||||
c.Writer.Header().Set("Pragma", "no-cache")
|
||||
|
||||
c.Redirect(301, redirectURL)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"os"
|
||||
"spurt-cms/controllers"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func DashBoardAuth() gin.HandlerFunc {
|
||||
|
||||
return func(c *gin.Context) {
|
||||
session, _ := controllers.Store.Get(c.Request, os.Getenv("SESSION_KEY"))
|
||||
|
||||
token := session.Values["token"]
|
||||
|
||||
if token != nil {
|
||||
|
||||
c.Writer.Header().Set("Pragma", "no-cache")
|
||||
|
||||
c.Redirect(301, "/dashboard")
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+8
-15
@@ -70,6 +70,13 @@ func InsertDefaultValues() {
|
||||
|
||||
query = strings.ReplaceAll(query, "current_time", timeStamp)
|
||||
|
||||
baseurl := os.Getenv("BASE_URL")
|
||||
baseurl = strings.TrimPrefix(baseurl, "https://")
|
||||
baseurl = strings.TrimPrefix(baseurl, "http://")
|
||||
baseurl = strings.TrimSuffix(baseurl, "/")
|
||||
|
||||
query = strings.ReplaceAll(query, "base_url", baseurl)
|
||||
|
||||
if strings.Contains(query, "tbl_forms") {
|
||||
|
||||
query = strings.ReplaceAll(query, "uu_id", Uuid)
|
||||
@@ -122,7 +129,7 @@ func InsertDefaultValues() {
|
||||
|
||||
blocktag_count, blockcolln_count, gensetting_count int64
|
||||
|
||||
graphqlsetting_count, template_count, tempmodule_count, emailConf_count, emailTemp_count, form_count, Subscription_count int64
|
||||
template_count, tempmodule_count, emailConf_count, emailTemp_count, form_count, Subscription_count int64
|
||||
)
|
||||
|
||||
if err := db.Table("tbl_modules").Count(&module_count).Error; err != nil {
|
||||
@@ -199,10 +206,7 @@ func InsertDefaultValues() {
|
||||
|
||||
log.Println(err)
|
||||
}
|
||||
if err := db.Table("tbl_graphql_settings").Count(&graphqlsetting_count).Error; err != nil {
|
||||
|
||||
log.Println(err)
|
||||
}
|
||||
if err := db.Table("tbl_template_modules").Count(&tempmodule_count).Error; err != nil {
|
||||
|
||||
log.Println(err)
|
||||
@@ -447,18 +451,7 @@ func InsertDefaultValues() {
|
||||
db.Exec(fmt.Sprintf("ALTER SEQUENCE tbl_template_modules_id_seq RESTART WITH %v", templateModuleMaxId+1))
|
||||
|
||||
}
|
||||
if graphqlsetting_count > 0 {
|
||||
|
||||
var GraphqlSettingMaxId int
|
||||
|
||||
if err := db.Raw("SELECT COALESCE((select max(id) from tbl_graphql_settings),0)").Scan(&GraphqlSettingMaxId); err != nil {
|
||||
// Handle error
|
||||
log.Println(err)
|
||||
}
|
||||
|
||||
db.Exec(fmt.Sprintf("ALTER SEQUENCE tbl_graphql_settings_id_seq RESTART WITH %v", GraphqlSettingMaxId+1))
|
||||
|
||||
}
|
||||
if emailConf_count > 0 {
|
||||
|
||||
var emailConfMaxId int
|
||||
|
||||
+340
-186
@@ -18,39 +18,45 @@ type TblRoles struct {
|
||||
CreatedBy int `gorm:"type:int"`
|
||||
ModifiedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
ModifiedBy int `gorm:"DEFAULT:NULL;type:int"`
|
||||
TenantId int `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblUsers struct {
|
||||
Id int `gorm:"primaryKey;autoIncrement;type:int"`
|
||||
Uuid string `gorm:"type:varchar(255)"`
|
||||
FirstName string `gorm:"type:varchar(255)"`
|
||||
LastName string `gorm:"type:varchar(255)"`
|
||||
RoleId int `gorm:"type:int"`
|
||||
Email string `gorm:"type:varchar(255)"`
|
||||
Username string `gorm:"type:varchar(255)"`
|
||||
Password string `gorm:"type:varchar(255)"`
|
||||
MobileNo string `gorm:"type:varchar(255)"`
|
||||
IsActive int `gorm:"type:int"`
|
||||
ProfileImage string `gorm:"type:varchar(255)"`
|
||||
ProfileImagePath string `gorm:"type:varchar(255)"`
|
||||
StorageType string `gorm:"type:varchar(255)"`
|
||||
DataAccess int `gorm:"type:int"`
|
||||
DefaultLanguageId int `gorm:"type:int"`
|
||||
CreatedOn time.Time `gorm:"type:datetime"`
|
||||
CreatedBy int `gorm:"type:int"`
|
||||
ModifiedOn time.Time `gorm:"type:datetime;default:NULL"`
|
||||
ModifiedBy int `gorm:"type:int;default:NULL"`
|
||||
LastLogin time.Time `gorm:"type:datetime;default:NULL"`
|
||||
IsDeleted int `gorm:"type:int"`
|
||||
DeletedOn time.Time `gorm:"type:datetime;default:NULL"`
|
||||
DeletedBy int `gorm:"type:int;default:NULL"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
Otp int `gorm:"type:int;default:NULL"`
|
||||
OtpExpiry time.Time `gorm:"type:datetime;default:NULL"`
|
||||
S3FolderName string `gorm:"type:varchar(255)"`
|
||||
ArticleCount int `gorm:"type:int"`
|
||||
TotalCount int `gorm:"type:int"`
|
||||
Id int `gorm:"primaryKey;auto_increment"`
|
||||
Uuid string `gorm:"type:varchar(255)"`
|
||||
FirstName string `gorm:"type:varchar(255)"`
|
||||
LastName string `gorm:"type:varchar(255)"`
|
||||
RoleId int `gorm:"type:int"`
|
||||
Email string `gorm:"type:varchar(255)"`
|
||||
Username string `gorm:"type:varchar(255)"`
|
||||
Password string `gorm:"type:varchar(255)"`
|
||||
MobileNo string `gorm:"type:varchar(255)"`
|
||||
IsActive int `gorm:"type:int"`
|
||||
ProfileImage string `gorm:"type:varchar(255)"`
|
||||
ProfileImagePath string `gorm:"type:varchar(255)"`
|
||||
StorageType string `gorm:"type:varchar(255)"`
|
||||
DataAccess int `gorm:"type:int"`
|
||||
DefaultLanguageId int `gorm:"type:int"`
|
||||
CreatedOn time.Time `gorm:"type:datetime"`
|
||||
CreatedBy int `gorm:"type:int"`
|
||||
ModifiedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
ModifiedBy int `gorm:"DEFAULT:NULL;type:int"`
|
||||
LastLogin time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
IsDeleted int `gorm:"type:int"`
|
||||
DeletedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
DeletedBy int `gorm:"DEFAULT:NULL;type:int"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
Otp int `gorm:"DEFAULT:NULL;type:int"`
|
||||
OtpExpiry time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
S3FolderName string `gorm:"type:varchar(255)"`
|
||||
ArticleCount int `gorm:"type:int;"`
|
||||
TotalCount int `gorm:"type:int;"`
|
||||
GoTemplateDefault int `gorm:"type:int;"`
|
||||
Subdomain string `gorm:"type:varchar(255)"`
|
||||
UsageMode string `gorm:"type:varchar(255)"`
|
||||
ChannelId int `gorm:"type:int;"`
|
||||
Country string `gorm:"type:varchar(255)"`
|
||||
ChooseType string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblCategories struct {
|
||||
@@ -67,30 +73,29 @@ type TblCategories struct {
|
||||
IsDeleted int `gorm:"type:int"`
|
||||
DeletedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
DeletedBy int `gorm:"type:int;DEFAULT:NULL;type:int"`
|
||||
TenantId int `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblChannels struct {
|
||||
Id int `gorm:"primaryKey;autoIncrement;type:int"`
|
||||
ChannelName string `gorm:"type:varchar(255)"`
|
||||
ChannelUniqueId string `gorm:"type:varchar(255)"`
|
||||
ChannelDescription string `gorm:"type:varchar(255)"`
|
||||
SlugName string `gorm:"type:varchar(255)"`
|
||||
FieldGroupId int `gorm:"type:int"`
|
||||
IsActive int `gorm:"type:int"`
|
||||
IsDeleted int `gorm:"type:int"`
|
||||
CreatedOn time.Time `gorm:"type:datetime"`
|
||||
CreatedBy int `gorm:"type:int"`
|
||||
ModifiedOn time.Time `gorm:"type:datetime;default:NULL"`
|
||||
ModifiedBy int `gorm:"type:int;default:NULL"`
|
||||
ChannelType string `gorm:"type:varchar(255)"`
|
||||
CollectionCount int `gorm:"type:int"`
|
||||
CloneCount int `gorm:"type:int"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
ImagePath string `gorm:"type:varchar(255)"`
|
||||
Id int `gorm:"primaryKey;auto_increment"`
|
||||
ChannelName string `gorm:"type:varchar(255)"`
|
||||
ChannelUniqueId string `gorm:"type:varchar(255)"`
|
||||
ChannelDescription string `gorm:"type:LONGTEXT"`
|
||||
SlugName string `gorm:"type:varchar(255)"`
|
||||
FieldGroupId int `gorm:"type:int"`
|
||||
IsActive int `gorm:"type:int"`
|
||||
IsDeleted int `gorm:"type:int"`
|
||||
CreatedOn time.Time `gorm:"type:datetime"`
|
||||
CreatedBy int `gorm:"type:int"`
|
||||
ModifiedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
ModifiedBy int `gorm:"DEFAULT:NULL;type:int"`
|
||||
ChannelType string `gorm:"type:varchar(255)"`
|
||||
CollectionCount int `gorm:"type:int"`
|
||||
CloneCount int `gorm:"type:int"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
ImagePath string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
|
||||
type TblMemberGroups struct {
|
||||
Id int `gorm:"primaryKey;auto_increment"`
|
||||
Name string `gorm:"type:varchar(255)"`
|
||||
@@ -104,7 +109,7 @@ type TblMemberGroups struct {
|
||||
ModifiedBy int `gorm:"DEFAULT:NULL;type:int"`
|
||||
DeletedBy int `gorm:"type:int"`
|
||||
DeletedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
TenantId int `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblMembers struct {
|
||||
@@ -132,7 +137,7 @@ type TblMembers struct {
|
||||
ModifiedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
ModifiedBy int `gorm:"DEFAULT:NULL;type:int"`
|
||||
StorageType string `gorm:"type:varchar(255)"`
|
||||
TenantId int `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblAccessControls struct {
|
||||
@@ -146,7 +151,7 @@ type TblAccessControls struct {
|
||||
IsDeleted int `gorm:"type:int"`
|
||||
DeletedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
DeletedBy int `gorm:"DEFAULT:NULL;type:int"`
|
||||
TenantId int `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblAccessControlPages struct {
|
||||
@@ -164,7 +169,7 @@ type TblAccessControlPages struct {
|
||||
DeletedBy int `gorm:"DEFAULT:NULL;type:int"`
|
||||
ChannelId int `gorm:"type:int"`
|
||||
EntryId int `gorm:"type:int"`
|
||||
TenantId int `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblAccessControlUserGroups struct {
|
||||
@@ -178,7 +183,7 @@ type TblAccessControlUserGroups struct {
|
||||
IsDeleted int `gorm:"type:int"`
|
||||
DeletedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
DeletedBy int `gorm:"DEFAULT:NULL;type:int"`
|
||||
TenantId int `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblEmailTemplates struct {
|
||||
@@ -198,7 +203,7 @@ type TblEmailTemplates struct {
|
||||
IsDeleted int `gorm:"DEFAULT:0"`
|
||||
IsActive int `gorm:"type:int"`
|
||||
IsDefault int `gorm:"type:int"`
|
||||
TenantId int `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblFields struct {
|
||||
@@ -224,7 +229,7 @@ type TblFields struct {
|
||||
IsDeleted int `gorm:"DEFAULT:0"`
|
||||
DeletedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
DeletedBy int `gorm:"DEFAULT:NULL;type:int"`
|
||||
TenantId int `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblFieldGroups struct {
|
||||
@@ -237,7 +242,7 @@ type TblFieldGroups struct {
|
||||
IsDeleted int `gorm:"DEFAULT:0"`
|
||||
DeletedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
DeletedBy int `gorm:"DEFAULT:NULL;type:int"`
|
||||
TenantId string `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblFieldOptions struct {
|
||||
@@ -252,7 +257,7 @@ type TblFieldOptions struct {
|
||||
IsDeleted int `gorm:"DEFAULT:0"`
|
||||
DeletedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
DeletedBy int `gorm:"DEFAULT:NULL;type:int"`
|
||||
TenantId int `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
OrderIndex int `gorm:"DEFAULT:NULL;type:int"`
|
||||
}
|
||||
|
||||
@@ -266,7 +271,7 @@ type TblFieldTypes struct {
|
||||
CreatedOn time.Time `gorm:"type:datetime"`
|
||||
ModifiedBy int `gorm:"type:int"`
|
||||
ModifiedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
TenantId string `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblLanguages struct {
|
||||
@@ -285,7 +290,7 @@ type TblLanguages struct {
|
||||
DeletedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
DeletedBy int `gorm:"DEFAULT:NULL;type:int"`
|
||||
IsDeleted int `gorm:"DEFAULT:0"`
|
||||
TenantId int `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblModules struct {
|
||||
@@ -303,7 +308,7 @@ type TblModules struct {
|
||||
MenuType string `gorm:"type:varchar(255)"`
|
||||
FullAccessPermission int `gorm:"type:int"`
|
||||
GroupFlg int `gorm:"type:int"`
|
||||
TenantId int `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblModulePermissions struct {
|
||||
@@ -322,7 +327,8 @@ type TblModulePermissions struct {
|
||||
CreatedOn time.Time `gorm:"type:datetime"`
|
||||
ModifiedBy int `gorm:"DEFAULT:NULL;type:int"`
|
||||
ModifiedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
TenantId int `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
ChannelId int `gorm:"column:channel_id"`
|
||||
}
|
||||
|
||||
type TblRolePermissions struct {
|
||||
@@ -331,7 +337,7 @@ type TblRolePermissions struct {
|
||||
PermissionId int `gorm:"type:int"`
|
||||
CreatedBy int `gorm:"type:int"`
|
||||
CreatedOn time.Time `gorm:"type:datetime"`
|
||||
TenantId int `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblChannelCategories struct {
|
||||
@@ -340,14 +346,14 @@ type TblChannelCategories struct {
|
||||
CategoryId string `gorm:"type:varchar(255)"`
|
||||
CreatedAt int `gorm:"type:int"`
|
||||
CreatedOn time.Time `gorm:"type:datetime"`
|
||||
TenantId string `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblGroupFields struct {
|
||||
Id int `gorm:"primaryKey;auto_increment"`
|
||||
ChannelId int `gorm:"type:int"`
|
||||
FieldId int `gorm:"type:int"`
|
||||
TenantId string `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblUserPersonalizes struct {
|
||||
@@ -360,7 +366,7 @@ type TblUserPersonalizes struct {
|
||||
ExpandLogoPath string `gorm:"type:varchar(255)"`
|
||||
CreatedOn time.Time `gorm:"type:datetime"`
|
||||
ModifiedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
TenantId int `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblRoleUsers struct {
|
||||
@@ -371,48 +377,51 @@ type TblRoleUsers struct {
|
||||
CreatedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
ModifiedBy int `gorm:"DEFAULT:NULL;type:int"`
|
||||
ModifiedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
TenantId string `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblChannelEntries struct {
|
||||
Id int `gorm:"primaryKey;auto_increment"`
|
||||
Title string `gorm:"type:varchar(255)"`
|
||||
Slug string `gorm:"type:varchar(255)"`
|
||||
Description string `gorm:"LONGTEXT"`
|
||||
UserId int `gorm:"type:int"`
|
||||
ChannelId int `gorm:"type:int"`
|
||||
Status int `gorm:"type:int"` //0-draft 1-publish 2-unpublish
|
||||
CoverImage string `gorm:"type:varchar(255)"`
|
||||
ThumbnailImage string `gorm:"type:varchar(255)"`
|
||||
MetaTitle string `gorm:"type:varchar(255)"`
|
||||
MetaDescription string `gorm:"type:varchar(255)"`
|
||||
Keyword string `gorm:"type:varchar(255)"`
|
||||
CategoriesId string `gorm:"type:varchar(255)"`
|
||||
RelatedArticles string `gorm:"type:varchar(255)"`
|
||||
Feature int `gorm:"DEFAULT:0"`
|
||||
ViewCount int `gorm:"DEFAULT:0"`
|
||||
CreateTime time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
PublishedTime time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
ImageAltTag string `gorm:"type:varchar(255)"`
|
||||
Author string `gorm:"type:varchar(255)"`
|
||||
SortOrder int `gorm:"type:int"`
|
||||
Excerpt string `gorm:"type:varchar(255)"`
|
||||
ReadingTime int `gorm:"type:int"`
|
||||
Tags string `gorm:"type:varchar(255)"`
|
||||
CreatedOn time.Time `gorm:"type:datetime"`
|
||||
CreatedBy int `gorm:"type:int"`
|
||||
ModifiedBy int `gorm:"DEFAULT:NULL;type:int"`
|
||||
ModifiedOn time.Time `gorm:"DEFAULT:NULL;type:datetime"`
|
||||
IsActive int `gorm:"type:int"`
|
||||
IsDeleted int `gorm:"DEFAULT:0"`
|
||||
DeletedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
DeletedBy int `gorm:"DEFAULT:NULL;type:int"`
|
||||
TenantId int `gorm:"type:int;"`
|
||||
Uuid string `gorm:"type:varchar(255)"`
|
||||
ParentId int `gorm:"type:int;"`
|
||||
OrderIndex int `gorm:"type:int;"`
|
||||
MembergroupId string `gorm:"type:varchar(255)"`
|
||||
CtaId int `gorm:"type:int"`
|
||||
Id int `gorm:"primaryKey;auto_increment"`
|
||||
Title string `gorm:"type:varchar(255)"`
|
||||
Slug string `gorm:"type:varchar(255)"`
|
||||
Description string `gorm:"type:LONGTEXT"` // kept as LONGTEXT for flexibility
|
||||
UserId int `gorm:"type:int"`
|
||||
ChannelId int `gorm:"type:int"`
|
||||
Status int `gorm:"type:int"` // 0-draft, 1-publish, 2-unpublish
|
||||
CoverImage string `gorm:"type:varchar(255)"`
|
||||
ThumbnailImage string `gorm:"type:varchar(255)"`
|
||||
MetaTitle string `gorm:"type:varchar(255)"`
|
||||
MetaDescription string `gorm:"type:varchar(255)"`
|
||||
Keyword string `gorm:"type:varchar(255)"`
|
||||
CategoriesId string `gorm:"type:varchar(255)"`
|
||||
MemebrshipLevelIds string `gorm:"type:varchar(255)"` // ✅ added, corrected name
|
||||
RelatedArticles string `gorm:"type:varchar(255)"`
|
||||
Feature int `gorm:"DEFAULT:0"`
|
||||
ViewCount int `gorm:"DEFAULT:0"`
|
||||
CreateTime time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
PublishedTime time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
ImageAltTag string `gorm:"type:varchar(255)"`
|
||||
Author string `gorm:"type:varchar(255)"`
|
||||
SortOrder int `gorm:"type:int"`
|
||||
Excerpt string `gorm:"type:varchar(255)"`
|
||||
ReadingTime int `gorm:"type:int"`
|
||||
Tags string `gorm:"type:varchar(255)"`
|
||||
CreatedOn time.Time `gorm:"type:datetime"`
|
||||
CreatedBy int `gorm:"type:int"`
|
||||
ModifiedBy int `gorm:"DEFAULT:NULL;type:int"`
|
||||
ModifiedOn time.Time `gorm:"DEFAULT:NULL;type:datetime"`
|
||||
IsActive int `gorm:"type:int"`
|
||||
IsDeleted int `gorm:"DEFAULT:0"`
|
||||
DeletedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
DeletedBy int `gorm:"DEFAULT:NULL;type:int"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
Uuid string `gorm:"type:varchar(255)"`
|
||||
ParentId int `gorm:"type:int"`
|
||||
OrderIndex int `gorm:"type:int"`
|
||||
MembergroupId string `gorm:"type:varchar(255)"`
|
||||
CtaId int `gorm:"type:int"`
|
||||
LanguageId int `gorm:"type:int"`
|
||||
EntryReferenceId int `gorm:"type:int"`
|
||||
}
|
||||
|
||||
type TblChannelEntryFields struct {
|
||||
@@ -427,7 +436,7 @@ type TblChannelEntryFields struct {
|
||||
ModifiedBy int `gorm:"DEFAULT:NULL;type:int"`
|
||||
DeletedBy int `gorm:"DEFAULT:NULL;type:int"`
|
||||
DeletedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
TenantId int `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblMemberProfiles struct {
|
||||
@@ -457,7 +466,7 @@ type TblMemberProfiles struct {
|
||||
DeletedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
StorageType string `gorm:"type:varchar(255)"`
|
||||
ClaimDate time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
TenantId int `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblMemberNotesHighlights struct {
|
||||
@@ -474,7 +483,7 @@ type TblMemberNotesHighlights struct {
|
||||
DeletedBy int `gorm:"type:int"`
|
||||
DeletedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
IsDeleted int `gorm:"type:int"`
|
||||
TenantId int `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblStorageTypes struct {
|
||||
@@ -484,14 +493,14 @@ type TblStorageTypes struct {
|
||||
Azure datatypes.JSONMap `gorm:"type:jsonb"`
|
||||
Drive datatypes.JSONMap `gorm:"type:jsonb"`
|
||||
SelectedType string `gorm:"type:varchar(255)"`
|
||||
TenantId int `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblEmailConfigurations struct {
|
||||
Id int `gorm:"primaryKey;auto_increment;"`
|
||||
StmpConfig datatypes.JSONMap `gorm:"type:jsonb"`
|
||||
SelectedType string `gorm:"type:varchar(255)"`
|
||||
TenantId int `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblGeneralSettings struct {
|
||||
@@ -505,10 +514,9 @@ type TblGeneralSettings struct {
|
||||
LanguageId int `gorm:"type:int"`
|
||||
ModifiedBy int `gorm:"type:int"`
|
||||
ModifiedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
TenantId int `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
StorageType string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblMemberSettings struct {
|
||||
Id int `gorm:"primaryKey;auto_increment;"`
|
||||
AllowRegistration int `gorm:"type:int"`
|
||||
@@ -516,7 +524,7 @@ type TblMemberSettings struct {
|
||||
ModifiedBy int `gorm:"type:integer"`
|
||||
ModifiedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
NotificationUsers string `gorm:"type:varchar(255)"`
|
||||
TenantId int `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblGraphqlSettings struct {
|
||||
@@ -534,13 +542,13 @@ type TblGraphqlSettings struct {
|
||||
Token string `gorm:"type:varchar(255)"`
|
||||
IsDefault int `gorm:"type:int;DEFAULT:0"`
|
||||
ExpiryTime time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
TenantId int `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblTimezones struct {
|
||||
Id int `gorm:"primaryKey;auto_increment"`
|
||||
Timezone string `gorm:"type:varchar(255)"`
|
||||
tenantid string `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblForms struct {
|
||||
@@ -557,7 +565,7 @@ type TblForms struct {
|
||||
DeletedBy int `gorm:"type:int;default:NULL"`
|
||||
DeletedOn time.Time `gorm:"type:timestamp;default:NULL"`
|
||||
IsDeleted int `gorm:"type:int;default:0"`
|
||||
TenantId int `gorm:"type:int"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
Uuid string `gorm:"type:varchar(255)"`
|
||||
FormImagePath string `gorm:"type:varchar(255)"`
|
||||
FormDescription string `gorm:"type:varchar(255)"`
|
||||
@@ -576,21 +584,24 @@ type TblFormResponse struct {
|
||||
IsDeleted int `gorm:"type:int;default:0"`
|
||||
CreatedBy int `gorm:"type:int"`
|
||||
CreatedOn time.Time `gorm:"type:timestamp;default:NULL"`
|
||||
TenantId int `gorm:"type:int"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
EntryId int `gorm:"type:int"`
|
||||
}
|
||||
|
||||
type TblFormRegistrations struct {
|
||||
Id int `gorm:"primaryKey;auto_increment;type:serial"`
|
||||
FormId int `gorm:"type:integer;DEFAULT:NULL"`
|
||||
Id int `gorm:"primaryKey;auto_increment"`
|
||||
Name string `gorm:"type:varchar(255)"`
|
||||
EmailId string `gorm:"type:varchar(255)"`
|
||||
MobileNo string `gorm:"type:varchar(255)"`
|
||||
FormId int `gorm:"type:int;DEFAULT:NULL"`
|
||||
CreatedBy int `gorm:"type:int"`
|
||||
CreatedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
ModifiedBy int `gorm:"type:integer;DEFAULT:NULL"`
|
||||
ModifiedBy int `gorm:"type:int;DEFAULT:NULL"`
|
||||
ModifiedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
DeletedBy int `gorm:"type:integer;DEFAULT:NULL"`
|
||||
DeletedBy int `gorm:"type:int;DEFAULT:NULL"`
|
||||
DeletedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
IsDeleted int `gorm:"type:int;DEFAULT:0"`
|
||||
TenantId string `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblFormFields struct {
|
||||
@@ -607,7 +618,7 @@ type TblFormFields struct {
|
||||
DeletedBy int `gorm:"type:integer;DEFAULT:NULL"`
|
||||
DeletedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
IsDeleted int `gorm:"type:int;DEFAULT:0"`
|
||||
TenantId int `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblFormValues struct {
|
||||
@@ -622,7 +633,7 @@ type TblFormValues struct {
|
||||
DeletedBy int `gorm:"type:integer;DEFAULT:NULL"`
|
||||
DeletedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
IsDeleted int `gorm:"type:int;DEFAULT:0"`
|
||||
TenantId string `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblFormMasterFields struct {
|
||||
@@ -638,7 +649,7 @@ type TblFormMasterFields struct {
|
||||
DeletedBy int `gorm:"type:integer;DEFAULT:NULL"`
|
||||
DeletedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
IsDeleted int `gorm:"type:int;DEFAULT:0"`
|
||||
TenantId int `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblFormFieldOptions struct {
|
||||
@@ -652,9 +663,8 @@ type TblFormFieldOptions struct {
|
||||
DeletedBy int `gorm:"type:integer;DEFAULT:NULL"`
|
||||
DeletedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
IsDeleted int `gorm:"type:int;DEFAULT:0"`
|
||||
TenantId string `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblPageTypes struct {
|
||||
Id int `gorm:"primaryKey;auto_increment"`
|
||||
Title string `gorm:"type:varchar(255)"`
|
||||
@@ -666,11 +676,11 @@ type TblPageTypes struct {
|
||||
DeletedBy int `gorm:"DEFAULT:NULL;type:int"`
|
||||
DeletedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
IsDeleted int `gorm:"DEFAULT:0"`
|
||||
TenantId string `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblTemplates struct {
|
||||
Id int `gorm:"primaryKey;auto_increment;"`
|
||||
Id int `gorm:"primaryKey;auto_increment"`
|
||||
TemplateName string `gorm:"type:varchar(255)"`
|
||||
TemplateSlug string `gorm:"type:varchar(255)"`
|
||||
TemplateModuleId int `gorm:"type:int"`
|
||||
@@ -686,39 +696,39 @@ type TblTemplates struct {
|
||||
DeletedBy int `gorm:"type:int;DEFAULT:NULL"`
|
||||
ModifiedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
ModifiedBy int `gorm:"type:int"`
|
||||
TenantId int `gorm:"type:int;"`
|
||||
ChannelId int `gorm:"type:int;"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
Preview string `gorm:"type:varchar(255)"`
|
||||
SlugName string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
type TblBlocks struct {
|
||||
Id int `gorm:"primaryKey;autoIncrement;type:int"`
|
||||
Title string `gorm:"type:varchar(255)"`
|
||||
SlugName string `gorm:"type:varchar(255)"`
|
||||
ChannelSlugname string `gorm:"type:varchar(255)"`
|
||||
BlockDescription string `gorm:"type:text"`
|
||||
BlockContent string `gorm:"type:text"`
|
||||
BlockCss string `gorm:"type:text"`
|
||||
IconImage string `gorm:"type:varchar(255)"`
|
||||
CoverImage string `gorm:"type:varchar(255)"`
|
||||
Prime int `gorm:"type:int"`
|
||||
IsActive int `gorm:"type:int"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
CreatedOn time.Time `gorm:"type:datetime;default:NULL"`
|
||||
CreatedBy int `gorm:"type:int"`
|
||||
ModifiedBy int `gorm:"type:int"`
|
||||
ModifiedOn time.Time `gorm:"type:datetime;default:NULL"`
|
||||
DeletedOn time.Time `gorm:"type:datetime;default:NULL"`
|
||||
DeletedBy int `gorm:"type:int;default:NULL"`
|
||||
IsDeleted int `gorm:"type:int;default:0"`
|
||||
ChannelId int `gorm:"type:int"`
|
||||
Id int `gorm:"primaryKey;auto_increment"`
|
||||
Title string `gorm:"type:varchar(255)"`
|
||||
SlugName string `gorm:"type:varchar(255)"`
|
||||
ChannelSlugname string `gorm:"type:varchar(255)"` // ✅ Added
|
||||
BlockDescription string `gorm:"type:LONGTEXT"`
|
||||
BlockContent string `gorm:"type:text"`
|
||||
BlockCss string `gorm:"type:text"`
|
||||
IconImage string `gorm:"type:varchar(255)"` // ✅ Changed from LONGTEXT to varchar(255)
|
||||
CoverImage string `gorm:"type:varchar(255)"`
|
||||
Prime int `gorm:"type:int"`
|
||||
IsActive int `gorm:"type:int"`
|
||||
TenantId string `gorm:"type:varchar(255)"` // ✅ Fixed from int to string
|
||||
CreatedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
CreatedBy int `gorm:"type:int"`
|
||||
ModifiedBy int `gorm:"type:int"`
|
||||
ModifiedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
DeletedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
DeletedBy int `gorm:"type:int;DEFAULT:NULL"`
|
||||
IsDeleted int `gorm:"type:int;DEFAULT:0"`
|
||||
ChannelId string `gorm:"type:varchar(255)"` // ✅ Added
|
||||
}
|
||||
|
||||
|
||||
type TblBlockTags struct {
|
||||
Id int `gorm:"primaryKey;auto_increment;"`
|
||||
BlockId int `gorm:"type:int"`
|
||||
TagId int `gorm:"type:int"`
|
||||
TagName string `gorm:"type:varchar(255)"`
|
||||
TenantId string `gorm:"type:int"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
CreatedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
CreatedBy int `gorm:"type:int"`
|
||||
DeletedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
@@ -729,7 +739,7 @@ type TblBlockTags struct {
|
||||
type TblBlockMstrTags struct {
|
||||
Id int `gorm:"primaryKey;auto_increment"`
|
||||
TagTitle string `gorm:"type:varchar(255)"`
|
||||
TenantId string `gorm:"type:int"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
CreatedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
CreatedBy int `gorm:"type:int"`
|
||||
}
|
||||
@@ -738,7 +748,7 @@ type TblBlockCollections struct {
|
||||
Id int `gorm:"primaryKey;auto_increment;"`
|
||||
UserId int `gorm:"type:int"`
|
||||
BlockId int `gorm:"type:int"`
|
||||
TenantId string `gorm:"type:int"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
DeletedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
DeletedBy int `gorm:"type:int;DEFAULT:NULL"`
|
||||
IsDeleted int `gorm:"type:int;DEFAULT:0"`
|
||||
@@ -746,46 +756,27 @@ type TblBlockCollections struct {
|
||||
|
||||
type TblMstrTenant struct {
|
||||
Id int `gorm:"primaryKey;auto_increment;"`
|
||||
TenantId int `gorm:"type:int"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
S3StoragePath string `gorm:"type:varchar(255)"`
|
||||
IsDeleted int `gorm:"type:int;DEFAULT:0"`
|
||||
DeletedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
DeletedBy int `gorm:"type:int;DEFAULT:NULL"`
|
||||
}
|
||||
|
||||
type TblWebhooks struct {
|
||||
Id int `gorm:"primaryKey;auto_increment;"`
|
||||
WebhookName string `gorm:"type:varchar(255)"`
|
||||
PayloadType string `gorm:"type:varchar(255)"`
|
||||
RequestMethod string `gorm:"type:varchar(255)"`
|
||||
RequestUrl string `gorm:"type:varchar(255)"`
|
||||
EventType string `gorm:"type:varchar(255)"`
|
||||
IsActive int `gorm:"type:int;DEFAULT:NULL"`
|
||||
Headers map[string]interface{} `gorm:"type:json"`
|
||||
Fields map[string]interface{} `gorm:"type:json"`
|
||||
TenantId int `gorm:"type:int;DEFAULT:NULL"`
|
||||
CreatedBy int `gorm:"type:int"`
|
||||
CreatedOn time.Time `gorm:"type:datetime"`
|
||||
ModifiedBy int `gorm:"type:int;DEFAULT:NULL"`
|
||||
ModifiedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
IsDeleted int `gorm:"type:int;DEFAULT:0"`
|
||||
DeletedBy int `gorm:"type:int;DEFAULT:NULL"`
|
||||
DeletedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
}
|
||||
|
||||
type TblTemplateModules struct {
|
||||
Id int `gorm:"primaryKey;auto_increment;"`
|
||||
Id int `gorm:"primaryKey;auto_increment"`
|
||||
TemplateModuleName string `gorm:"type:varchar(255)"`
|
||||
TemplateModuleSlug string `gorm:"type:varchar(255)"`
|
||||
Description string `gorm:"type:varchar(600)"`
|
||||
IsActive int `gorm:"type:int;DEFAULT:1"`
|
||||
CreatedBy int `gorm:"type:int"`
|
||||
CreatedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
TenantId int `gorm:"type:int"`
|
||||
ChannelId int `gorm:"type:int"`
|
||||
TenantId string `gorm:"type:varchar(255)"` // ✅ Fixed
|
||||
IsDeleted int `gorm:"type:int;DEFAULT:0"`
|
||||
DeletedBy int `gorm:"type:int;DEFAULT:NULL"`
|
||||
DeletedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
SlugName string `gorm:"type:varchar(255)"` // ✅ Added
|
||||
}
|
||||
|
||||
type TblApps struct {
|
||||
@@ -803,7 +794,7 @@ type TblApps struct {
|
||||
IsDeleted int `gorm:"type:integer;DEFAULT:0"`
|
||||
DeletedBy int `gorm:"type:integer;DEFAULT:NULL"`
|
||||
DeletedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
TenantId int `gorm:"type:integer;DEFAULT:NULL"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
type TblAiPrompt struct {
|
||||
Id int `gorm:"primaryKey;auto_increment"`
|
||||
@@ -822,7 +813,166 @@ type TblAiPrompt struct {
|
||||
IsDeleted int `gorm:"type:integer;DEFAULT:0"`
|
||||
DeletedBy int `gorm:"type:integer;DEFAULT:NULL"`
|
||||
DeletedOn time.Time `gorm:"type:datetime;DEFAULT:NULL"`
|
||||
TenantId int `gorm:"type:integer;DEFAULT:NULL"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblAiSettingsModule struct {
|
||||
Id int `gorm:"primaryKey;autoIncrement"`
|
||||
AIModule string `gorm:"type:varchar(255)"`
|
||||
ApiKey string `gorm:"type:varchar(255)"`
|
||||
Description string `gorm:"type:varchar(255)"`
|
||||
AiModel string `gorm:"type:varchar(255)"`
|
||||
IsActive int `gorm:"type:int"`
|
||||
CreatedOn time.Time `gorm:"type:datetime;not null"`
|
||||
CreatedBy int `gorm:"type:int"`
|
||||
IsDeleted int `gorm:"type:int"`
|
||||
DeletedOn *time.Time `gorm:"type:datetime;default:null"`
|
||||
DeletedBy *int `gorm:"default:null"`
|
||||
ModifiedOn *time.Time `gorm:"type:datetime;default:null"`
|
||||
ModifiedBy *int `gorm:"default:null"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblCountrie struct {
|
||||
Id int `gorm:"primaryKey;autoIncrement"`
|
||||
CountryCode string `gorm:"type:varchar(255)"`
|
||||
CountryName string `gorm:"type:varchar(255)"`
|
||||
IsActive int `gorm:"type:int"`
|
||||
CreatedOn time.Time `gorm:"type:datetime;not null"`
|
||||
CreatedBy int `gorm:"type:int"`
|
||||
IsDeleted int `gorm:"type:int"`
|
||||
DeletedOn *time.Time `gorm:"type:datetime;default:null"`
|
||||
DeletedBy *int `gorm:"default:null"`
|
||||
ModifiedOn *time.Time `gorm:"type:datetime;default:null"`
|
||||
ModifiedBy *int `gorm:"default:null"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblSavedEntries struct {
|
||||
Id int `gorm:"primaryKey;autoIncrement"`
|
||||
EntryId int `gorm:"type:int"`
|
||||
UserId int `gorm:"type:int"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
CreatedOn time.Time `gorm:"type:datetime;not null"`
|
||||
IsDeleted int `gorm:"type:int"`
|
||||
}
|
||||
|
||||
type TblCourseSettings struct {
|
||||
Id int `gorm:"primaryKey;autoIncrement"`
|
||||
CourseId int `gorm:"type:int"`
|
||||
Certificate int `gorm:"type:int"`
|
||||
Comments int `gorm:"type:int"`
|
||||
Offer string `gorm:"type:varchar(255)"`
|
||||
Visibility string `gorm:"type:varchar(255)"`
|
||||
StartDate string `gorm:"type:varchar(255)"`
|
||||
SignUpLimits int `gorm:"type:int"`
|
||||
Duration string `gorm:"type:varchar(255)"`
|
||||
CreatedOn time.Time `gorm:"type:datetime;not null"`
|
||||
CreatedBy int `gorm:"type:int"`
|
||||
IsDeleted int `gorm:"type:int"`
|
||||
DeletedOn *time.Time `gorm:"type:datetime;default:null"`
|
||||
DeletedBy *int `gorm:"default:null"`
|
||||
ModifiedOn *time.Time `gorm:"type:datetime;default:null"`
|
||||
ModifiedBy *int `gorm:"default:null"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblMenus struct {
|
||||
Id int `gorm:"primaryKey;autoIncrement"`
|
||||
Name string `gorm:"type:varchar(255)"`
|
||||
Description string `gorm:"type:varchar(255)"`
|
||||
SlugName string `gorm:"type:varchar(255)"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
CreatedOn time.Time `gorm:"type:datetime;not null"`
|
||||
CreatedBy int `gorm:"type:int"`
|
||||
IsDeleted int `gorm:"type:int"`
|
||||
DeletedOn *time.Time `gorm:"type:datetime;default:null"`
|
||||
DeletedBy *int `gorm:"default:null"`
|
||||
ModifiedOn *time.Time `gorm:"type:datetime;default:null"`
|
||||
ModifiedBy *int `gorm:"default:null"`
|
||||
Status int `gorm:"type:int"`
|
||||
UrlPath string `gorm:"type:varchar(255)"`
|
||||
ParentId int `gorm:"type:int"`
|
||||
Type string `gorm:"type:varchar(255)"`
|
||||
TypeId int `gorm:"type:int"`
|
||||
WebsiteId int `gorm:"type:int"`
|
||||
ListingsIds string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblGoTemplates struct {
|
||||
Id int `gorm:"primaryKey;autoIncrement"`
|
||||
TemplateName string `gorm:"type:varchar(255)"`
|
||||
TemplateImage string `gorm:"type:varchar(255)"`
|
||||
TemplateDescription string `gorm:"type:varchar(255)"`
|
||||
IsDeleted int `gorm:"type:int"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
CreatedOn time.Time `gorm:"type:datetime;not null"`
|
||||
CreatedBy int `gorm:"type:int"`
|
||||
ChannelSlugName string `gorm:"type:varchar(255)"`
|
||||
TemplateModuleName string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
type TblGoTemplateSeo struct {
|
||||
Id int `gorm:"primaryKey;autoIncrement"`
|
||||
PageTitle string `gorm:"type:varchar(255)"`
|
||||
PageDescription string `gorm:"type:varchar(255)"`
|
||||
PageKeyword string `gorm:"type:varchar(255)"`
|
||||
StoreTitle string `gorm:"type:varchar(255)"`
|
||||
StoreDescription string `gorm:"type:varchar(255)"`
|
||||
StoreKeyword string `gorm:"type:varchar(255)"`
|
||||
SiteMapName string `gorm:"type:varchar(255)"`
|
||||
SiteMapPath string `gorm:"type:varchar(255)"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
WebsiteId int `gorm:"type:int"`
|
||||
}
|
||||
|
||||
type TblGoTemplateSettings struct {
|
||||
Id int `gorm:"primaryKey;autoIncrement"`
|
||||
SiteName string `gorm:"type:varchar(255)"`
|
||||
SiteLogo string `gorm:"type:varchar(255)"`
|
||||
SiteLogoPath string `gorm:"type:varchar(255)"`
|
||||
SiteFavIcon string `gorm:"type:varchar(255)"`
|
||||
SiteFavIconPath string `gorm:"type:varchar(255)"`
|
||||
WebsiteUrl string `gorm:"type:varchar(255)"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
WebsiteId int `gorm:"type:int"`
|
||||
}
|
||||
|
||||
type TblTemplatePages struct {
|
||||
Id int `gorm:"primaryKey;autoIncrement"`
|
||||
Name string `gorm:"type:varchar(255)"`
|
||||
Slug string `gorm:"type:varchar(255)"`
|
||||
PageDescription string `gorm:"type:varchar(255)"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
IsDeleted int `gorm:"type:int"`
|
||||
DeletedOn *time.Time `gorm:"type:datetime;default:null"`
|
||||
DeletedBy *int `gorm:"type:int;default:null"`
|
||||
CreatedOn time.Time `gorm:"type:datetime;not null"`
|
||||
CreatedBy int `gorm:"type:int"`
|
||||
ModifiedOn *time.Time `gorm:"type:datetime;default:null"`
|
||||
ModifiedBy *int `gorm:"type:int;default:null"`
|
||||
Status int `gorm:"type:int"`
|
||||
MetaTitle string `gorm:"type:varchar(255)"`
|
||||
MetaDescription string `gorm:"type:varchar(255)"`
|
||||
MetaKeywords string `gorm:"type:varchar(255)"`
|
||||
MetaSlug string `gorm:"type:varchar(255)"`
|
||||
WebsiteId int `gorm:"type:int"`
|
||||
}
|
||||
|
||||
type TblWebsite struct {
|
||||
Id int `gorm:"primaryKey;autoIncrement"`
|
||||
Name string `gorm:"type:varchar(255)"`
|
||||
ChannelNames string `gorm:"type:varchar(255)"`
|
||||
TemplateId int `gorm:"type:int"`
|
||||
TenantId string `gorm:"type:varchar(255)"`
|
||||
IsDeleted int `gorm:"type:int"`
|
||||
DeletedOn *time.Time `gorm:"type:datetime;default:null"`
|
||||
DeletedBy *int `gorm:"type:int;default:null"`
|
||||
CreatedOn time.Time `gorm:"type:datetime;not null"`
|
||||
CreatedBy int `gorm:"type:int"`
|
||||
ModifiedOn *time.Time `gorm:"type:datetime;default:null"`
|
||||
ModifiedBy *int `gorm:"type:int;default:null"`
|
||||
Status int `gorm:"type:int"`
|
||||
}
|
||||
|
||||
func MigrationTables() {
|
||||
@@ -863,11 +1013,6 @@ func MigrationTables() {
|
||||
TblTimezones{},
|
||||
TblForms{},
|
||||
TblFormResponse{},
|
||||
// TblFormFieldOptions{},
|
||||
// TblFormFields{},
|
||||
// TblFormMasterFields{},
|
||||
// TblFormRegistrations{},
|
||||
// TblFormValues{},
|
||||
TblPageTypes{},
|
||||
TblTemplates{},
|
||||
TblBlocks{},
|
||||
@@ -876,9 +1021,18 @@ func MigrationTables() {
|
||||
TblBlockTags{},
|
||||
TblMstrTenant{},
|
||||
TblTemplateModules{},
|
||||
TblWebhooks{},
|
||||
TblApps{},
|
||||
TblAiPrompt{},
|
||||
TblAiSettingsModule{},
|
||||
TblCountrie{},
|
||||
TblSavedEntries{},
|
||||
TblCourseSettings{},
|
||||
TblMenus{},
|
||||
TblGoTemplates{},
|
||||
TblGoTemplateSeo{},
|
||||
TblGoTemplateSettings{},
|
||||
TblTemplatePages{},
|
||||
TblWebsite{},
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
|
||||
+157
-22
@@ -51,6 +51,12 @@ type TblUsers struct {
|
||||
S3FolderName string `gorm:"type:character varying"`
|
||||
ArticleCount int `gorm:"type:integer"`
|
||||
TotalCount int `gorm:"type:integer"`
|
||||
GoTemplateDefault int `gorm:"type:integer"`
|
||||
Subdomain string `gorm:"type:character varying"`
|
||||
UsageMode string `gorm:"type:character varying"`
|
||||
ChannelId int `gorm:"type:integer"`
|
||||
Country string `gorm:"type:character varying"`
|
||||
ChooseType string `gorm:"type:character varying"`
|
||||
}
|
||||
|
||||
type TblCategories struct {
|
||||
@@ -90,7 +96,6 @@ type TblChannels struct {
|
||||
ImagePath string `gorm:"type:character varying"`
|
||||
}
|
||||
|
||||
|
||||
type TblMemberGroups struct {
|
||||
Id int `gorm:"primaryKey;auto_increment;type:serial"`
|
||||
Name string `gorm:"type:character varying"`
|
||||
@@ -323,6 +328,7 @@ type TblModulePermissions struct {
|
||||
ModifiedBy int `gorm:"DEFAULT:NULL"`
|
||||
ModifiedOn time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
|
||||
TenantId string `gorm:"type:character varying"`
|
||||
ChannelId int `gorm:"column:channel_id"`
|
||||
}
|
||||
|
||||
type TblRolePermissions struct {
|
||||
@@ -414,6 +420,8 @@ type TblChannelEntries struct {
|
||||
OrderIndex int `gorm:"type:integer"`
|
||||
MembergroupId string `gorm:"type:character varying"`
|
||||
CtaId int `gorm:"type:integer"`
|
||||
LanguageId int `gorm:"type:integer"`
|
||||
EntryReferenceId int `gorm:"type:integer"`
|
||||
}
|
||||
|
||||
type TblChannelEntryFields struct {
|
||||
@@ -755,26 +763,6 @@ type TblMstrTenant struct {
|
||||
DeletedBy int `gorm:"type:integer;DEFAULT:NULL"`
|
||||
}
|
||||
|
||||
type TblWebhooks struct {
|
||||
Id int `gorm:"primaryKey;auto_increment;type:serial"`
|
||||
WebhookName string `gorm:"type:character varying"`
|
||||
PayloadType string `gorm:"type:character varying"`
|
||||
RequestMethod string `gorm:"type:character varying"`
|
||||
RequestUrl string `gorm:"type:character varying"`
|
||||
EventType string `gorm:"type:character varying"`
|
||||
IsActive int `gorm:"type:integer;DEFAULT:NULL"`
|
||||
Headers map[string]interface{} `gorm:"type:json"`
|
||||
Fields map[string]interface{} `gorm:"type:json"`
|
||||
TenantId string `gorm:"type:character varying"`
|
||||
CreatedBy int `gorm:"type:integer"`
|
||||
CreatedOn time.Time `gorm:"type:timestamp without time zone"`
|
||||
ModifiedBy int `gorm:"type:integer;DEFAULT:NULL"`
|
||||
ModifiedOn time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
|
||||
IsDeleted int `gorm:"type:integer;DEFAULT:0"`
|
||||
DeletedBy int `gorm:"type:integer;DEFAULT:NULL"`
|
||||
DeletedOn time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
|
||||
}
|
||||
|
||||
type TblTemplateModules struct {
|
||||
Id int `gorm:"primaryKey;auto_increment;type:serial"`
|
||||
TemplateModuleName string `gorm:"type:character varying"`
|
||||
@@ -828,6 +816,145 @@ type TblAiPrompt struct {
|
||||
TenantId string `gorm:"type:character varying"`
|
||||
}
|
||||
|
||||
type TblAiSettingsModule struct {
|
||||
Id int `gorm:"primaryKey;auto_increment;type:serial"`
|
||||
AIModule string `gorm:"type:character varying"`
|
||||
ApiKey string `gorm:"type:character varying"`
|
||||
Description string `gorm:"type:character varying"`
|
||||
AiModel string `gorm:"type:character varying"`
|
||||
IsActive int `gorm:"type:integer"`
|
||||
CreatedOn time.Time `gorm:"type:timestamp without time zone"`
|
||||
CreatedBy int `gorm:"type:integer"`
|
||||
IsDeleted int `gorm:"type:integer"`
|
||||
DeletedOn time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
|
||||
DeletedBy int `gorm:"DEFAULT:NULL"`
|
||||
ModifiedOn time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
|
||||
ModifiedBy int `gorm:"DEFAULT:NULL"`
|
||||
TenantId string `gorm:"type:character varying"`
|
||||
}
|
||||
|
||||
type TblCountrie struct {
|
||||
Id int `gorm:"primaryKey;auto_increment;type:serial"`
|
||||
CountryCode string `gorm:"type:character varying"`
|
||||
CountryName string `gorm:"type:character varying"`
|
||||
IsActive int `gorm:"type:integer"`
|
||||
CreatedOn time.Time `gorm:"type:timestamp without time zone"`
|
||||
CreatedBy int `gorm:"type:integer"`
|
||||
IsDeleted int `gorm:"type:integer"`
|
||||
DeletedOn time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
|
||||
DeletedBy int `gorm:"DEFAULT:NULL"`
|
||||
ModifiedOn time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
|
||||
ModifiedBy int `gorm:"DEFAULT:NULL"`
|
||||
TenantId string `gorm:"type:character varying"`
|
||||
}
|
||||
|
||||
type TblSavedEntries struct {
|
||||
Id int `gorm:"primaryKey;auto_increment;type:serial"`
|
||||
EntryId int `gorm:"type:integer"`
|
||||
UserId int `gorm:"type:integer"`
|
||||
TenantId string `gorm:"type:character varying"`
|
||||
CreatedOn time.Time `gorm:"type:timestamp without time zone"`
|
||||
IsDeleted int `gorm:"type:integer"`
|
||||
}
|
||||
|
||||
type TblMenus struct {
|
||||
Id int `gorm:"primaryKey;auto_increment;type:serial"`
|
||||
Name string `gorm:"type:character varying"`
|
||||
Description string `gorm:"type:character varying"`
|
||||
SlugName string `gorm:"type:character varying"`
|
||||
TenantId string `gorm:"type:character varying"`
|
||||
CreatedOn time.Time `gorm:"type:timestamp without time zone"`
|
||||
CreatedBy int `gorm:"type:integer"`
|
||||
IsDeleted int `gorm:"type:integer"`
|
||||
DeletedOn time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
|
||||
DeletedBy int `gorm:"DEFAULT:NULL"`
|
||||
ModifiedOn time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
|
||||
ModifiedBy int `gorm:"DEFAULT:NULL"`
|
||||
Status int ` gorm:"type:integer"`
|
||||
UrlPath string `gorm:"type:character varying"`
|
||||
ParentId int `gorm:"type:integer"`
|
||||
Type string `gorm:"type:character varying"`
|
||||
TypeId int `gorm:"type:integer"`
|
||||
WebsiteId int `gorm:"type:integer"`
|
||||
ListingsIds string `gorm:"type:character varying"`
|
||||
}
|
||||
|
||||
type TblGoTemplates struct {
|
||||
Id int `gorm:"primaryKey;autoIncrement;type:serial"`
|
||||
TemplateName string `gorm:"type:character varying"`
|
||||
TemplateImage string `gorm:"type:character varying"`
|
||||
TemplateDescription string `gorm:"type:character varying"`
|
||||
IsDeleted int `gorm:"type:integer"`
|
||||
TenantId string `gorm:"type:character varying"`
|
||||
CreatedOn time.Time `gorm:"type:timestamp without time zone"`
|
||||
CreatedBy int `gorm:"type:integer"`
|
||||
ChannelSlugName string `gorm:"type:character varying"`
|
||||
TemplateModuleName string `gorm:"type:character varying"`
|
||||
}
|
||||
|
||||
type TblGoTemplateSeo struct {
|
||||
Id int `gorm:"primaryKey;auto_increment;type:serial"`
|
||||
PageTitle string `gorm:"type:character varying"`
|
||||
PageDescription string `gorm:"type:character varying"`
|
||||
PageKeyword string `gorm:"type:character varying"`
|
||||
StoreTitle string `gorm:"type:character varying"`
|
||||
StoreDescription string `gorm:"type:character varying"`
|
||||
StoreKeyword string `gorm:"type:character varying"`
|
||||
SiteMapName string `gorm:"type:character varying"`
|
||||
SiteMapPath string `gorm:"type:character varying"`
|
||||
TenantId string `gorm:"type:character varying"`
|
||||
WebsiteId int `gorm:"type:integer"`
|
||||
}
|
||||
|
||||
type TblGoTemplateSettings struct {
|
||||
Id int `gorm:"primaryKey;auto_increment;type:serial"`
|
||||
SiteName string `gorm:"type:character varying"`
|
||||
SiteLogo string `gorm:"type:character varying"`
|
||||
SiteLogoPath string `gorm:"type:character varying"`
|
||||
SiteFavIcon string `gorm:"type:character varying"`
|
||||
SiteFavIconPath string `gorm:"type:character varying"`
|
||||
WebsiteUrl string `gorm:"type:character varying"`
|
||||
TenantId string `gorm:"type:character varying"`
|
||||
WebsiteId int `gorm:"type:integer"`
|
||||
}
|
||||
|
||||
type TblTemplatePages struct {
|
||||
Id int `gorm:"primaryKey;auto_increment;type:serial"`
|
||||
Name string `gorm:"type:character varying"`
|
||||
Slug string `gorm:"type:character varying"`
|
||||
PageDescription string `gorm:"type:character varying"`
|
||||
TenantId string `gorm:"type:character varying"`
|
||||
IsDeleted int `gorm:"type:integer"`
|
||||
DeletedOn time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
|
||||
DeletedBy int `gorm:"DEFAULT:NULL"`
|
||||
CreatedOn time.Time `gorm:"type:timestamp without time zone"`
|
||||
CreatedBy int `gorm:"type:integer"`
|
||||
ModifiedOn time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
|
||||
ModifiedBy int `gorm:"DEFAULT:NULL;type:integer"`
|
||||
Status int `gorm:"type:integer"`
|
||||
MetaTitle string `gorm:"type:character varying"`
|
||||
MetaDescription string `gorm:"type:character varying"`
|
||||
MetaKeywords string `gorm:"type:character varying"`
|
||||
MetaSlug string `gorm:"type:character varying"`
|
||||
WebsiteId int `gorm:"type:integer"`
|
||||
}
|
||||
|
||||
type TblWebsite struct {
|
||||
Id int `gorm:"primaryKey;auto_increment;type:serial"`
|
||||
Name string `gorm:"type:character varying"`
|
||||
ChannelNames string `gorm:"type:character varying"`
|
||||
TemplateId int `gorm:"type:integer"`
|
||||
TenantId string `gorm:"type:character varying"`
|
||||
IsDeleted int `gorm:"type:integer"`
|
||||
DeletedOn time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
|
||||
DeletedBy int `gorm:"DEFAULT:NULL"`
|
||||
CreatedOn time.Time `gorm:"type:timestamp without time zone"`
|
||||
CreatedBy int `gorm:"type:integer"`
|
||||
ModifiedOn time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
|
||||
ModifiedBy int `gorm:"DEFAULT:NULL;type:integer"`
|
||||
Status int `gorm:"type:integer"`
|
||||
}
|
||||
|
||||
func MigrationTables() {
|
||||
|
||||
err := controllers.DB.AutoMigrate(
|
||||
@@ -873,10 +1000,18 @@ func MigrationTables() {
|
||||
TblBlockMstrTags{},
|
||||
TblBlockTags{},
|
||||
TblMstrTenant{},
|
||||
TblWebhooks{},
|
||||
TblTemplateModules{},
|
||||
TblApps{},
|
||||
TblAiPrompt{},
|
||||
TblAiSettingsModule{},
|
||||
TblCountrie{},
|
||||
TblSavedEntries{},
|
||||
TblMenus{},
|
||||
TblGoTemplates{},
|
||||
TblGoTemplateSeo{},
|
||||
TblGoTemplateSettings{},
|
||||
TblTemplatePages{},
|
||||
TblWebsite{},
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
|
||||
+23
-1
@@ -70,7 +70,29 @@ type TblMstrForms struct {
|
||||
FormPreviewImagepath string `gorm:"type:character varying"`
|
||||
FormPreviewImagename string `gorm:"type:character varying"`
|
||||
}
|
||||
|
||||
type TblMstrchannel struct {
|
||||
Id int `gorm:"column:id"`
|
||||
ChannelName string `gorm:"column:channel_name"`
|
||||
ChannelDescription string `gorm:"column:channel_description"`
|
||||
SlugName string `gorm:"column:slug_name"`
|
||||
FieldGroupId int `gorm:"column:field_group_id"`
|
||||
IsActive int `gorm:"column:is_active"`
|
||||
IsDeleted int `gorm:"column:is_deleted"`
|
||||
CreatedOn time.Time `gorm:"column:created_on"`
|
||||
CreatedBy int `gorm:"column:created_by"`
|
||||
ModifiedOn time.Time `gorm:"column:modified_on;DEFAULT:NULL"`
|
||||
ModifiedBy int `gorm:"column:modified_by;DEFAULT:NULL"`
|
||||
DateString string `gorm:"-"`
|
||||
ProfileImagePath string `gorm:"<-:false"`
|
||||
AuthorDetails TblUser `gorm:"foreignKey:Id;references:CreatedBy"`
|
||||
ChannelType string `gorm:"column:channel_type"`
|
||||
TenantId int `gorm:"column:tenant_id"`
|
||||
Username string `gorm:"<-:false"`
|
||||
FirstName string `gorm:"<-:false"`
|
||||
LastName string `gorm:"<-:false"`
|
||||
NameString string `gorm:"<-:false"`
|
||||
ImagePath string `gorm:"column:image_path"`
|
||||
}
|
||||
|
||||
type TblMstrIntegration struct {
|
||||
Id int `gorm:"primaryKey;auto_increment;type:serial"`
|
||||
|
||||
@@ -107,30 +107,6 @@ type TblModule struct {
|
||||
GroupFlg int
|
||||
}
|
||||
|
||||
type TblMstrchannel struct {
|
||||
Id int `gorm:"column:id"`
|
||||
ChannelName string `gorm:"column:channel_name"`
|
||||
ChannelDescription string `gorm:"column:channel_description"`
|
||||
SlugName string `gorm:"column:slug_name"`
|
||||
FieldGroupId int `gorm:"column:field_group_id"`
|
||||
IsActive int `gorm:"column:is_active"`
|
||||
IsDeleted int `gorm:"column:is_deleted"`
|
||||
CreatedOn time.Time `gorm:"column:created_on"`
|
||||
CreatedBy int `gorm:"column:created_by"`
|
||||
ModifiedOn time.Time `gorm:"column:modified_on;DEFAULT:NULL"`
|
||||
ModifiedBy int `gorm:"column:modified_by;DEFAULT:NULL"`
|
||||
DateString string `gorm:"-"`
|
||||
ProfileImagePath string `gorm:"<-:false"`
|
||||
AuthorDetails TblUser `gorm:"foreignKey:Id;references:CreatedBy"`
|
||||
ChannelType string `gorm:"column:channel_type"`
|
||||
TenantId int `gorm:"column:tenant_id"`
|
||||
Username string `gorm:"<-:false"`
|
||||
FirstName string `gorm:"<-:false"`
|
||||
LastName string `gorm:"<-:false"`
|
||||
NameString string `gorm:"<-:false"`
|
||||
ImagePath string `gorm:"column:image_path"`
|
||||
}
|
||||
|
||||
func Exportentriesdata(exportdata *[]chn.Tblchannelentries, id []int, tenantid string) error {
|
||||
|
||||
if err := DB.Table("tbl_channel_entries").Select("tbl_channel_entries.*,tbl_users.username,tbl_channels.channel_name").Joins("inner join tbl_users on tbl_users.id = tbl_channel_entries.created_by").Joins("inner join tbl_channels on tbl_channels.id = tbl_channel_entries.channel_id").Where("tbl_channel_entries.is_deleted=0 and tbl_channel_entries.id IN ? and (tbl_channel_entries.tenant_id is NULL or tbl_channel_entries.tenant_id = ?)", id, tenantid).Order("tbl_channel_entries.id desc").Preload("TblChannelEntryField", func(db *gorm.DB) *gorm.DB {
|
||||
@@ -0,0 +1,33 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
|
||||
type TblCountrie struct {
|
||||
Id int `gorm:"primaryKey;auto_increment;type:serial"`
|
||||
CountryCode string `gorm:"type:character varying"`
|
||||
CountryName string `gorm:"type:character varying"`
|
||||
IsActive int `gorm:"type:integer"`
|
||||
CreatedOn time.Time `gorm:"type:timestamp without time zone"`
|
||||
CreatedBy int `gorm:"type:integer"`
|
||||
IsDeleted int `gorm:"type:integer"`
|
||||
DeletedOn time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
|
||||
DeletedBy int `gorm:"DEFAULT:NULL"`
|
||||
ModifiedOn time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
|
||||
ModifiedBy int `gorm:"DEFAULT:NULL"`
|
||||
TenantId int `gorm:"type:integer"`
|
||||
}
|
||||
|
||||
|
||||
func GetCountryLIst()([]TblCountrie,error){
|
||||
|
||||
var CountryList []TblCountrie
|
||||
if err := DB.Table("tbl_countries").Find(&CountryList).Error; err != nil {
|
||||
|
||||
return []TblCountrie{},err
|
||||
}
|
||||
|
||||
return CountryList,nil
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user