- {product.title} |
+ {product.MobileOrEmail} |
- {product.description} |
+ {product.Complaint} |
{new Date(product.createdAt).toLocaleString('en-IN', {
weekday: 'short',
diff --git a/src/views/configuration/ApplicationName.js b/src/views/configuration/ApplicationName.js
new file mode 100644
index 0000000..5e1597d
--- /dev/null
+++ b/src/views/configuration/ApplicationName.js
@@ -0,0 +1,119 @@
+import React, { useEffect, useState } from 'react'
+import { Link } from 'react-router-dom'
+import ClipLoader from 'react-spinners/ClipLoader'
+
+import swal from 'sweetalert'
+import axios from 'axios'
+import { isAutheticated } from 'src/auth'
+
+function ApplicationName() {
+ const [loading, setLoading] = useState(false)
+ const token = isAutheticated()
+
+ const [appName, setAppName] = useState('')
+
+ useEffect(() => {
+ async function getConfiguration() {
+ const configDetails = await axios.get(`/api/config`, {
+ headers: {
+ Authorization: `Bearer ${token}`,
+ },
+ })
+ configDetails.data.result.map((item) => {
+ setAppName(item?.appName)
+
+ })
+ }
+ getConfiguration()
+ }, [])
+
+ async function handelChange(e) {
+
+
+ setAppName(e.target.value)
+ }
+ async function handelSubmit() {
+ setLoading(true)
+
+ let res = await axios.post(`/api/config/application/name`, { appName }, {
+ headers: {
+ Authorization: `Bearer ${token}`,
+ },
+ })
+
+ if (res) {
+ setLoading(false)
+ console.log(res)
+ swal('Success!', res.data.message, res.data.status)
+ }
+ }
+ return (
+
+ )
+}
+
+export default ApplicationName
diff --git a/src/views/configuration/CopyrightMessage.js b/src/views/configuration/CopyrightMessage.js
new file mode 100644
index 0000000..4b2d896
--- /dev/null
+++ b/src/views/configuration/CopyrightMessage.js
@@ -0,0 +1,122 @@
+
+
+import React, { useEffect, useState } from 'react'
+import { Link } from 'react-router-dom'
+import ClipLoader from 'react-spinners/ClipLoader'
+
+import swal from 'sweetalert'
+import axios from 'axios'
+import { isAutheticated } from 'src/auth'
+
+function CopyrightMessage() {
+ const [loading, setLoading] = useState(false)
+ const token = isAutheticated()
+
+ const [copyright, setCopyright] = useState('')
+
+ useEffect(() => {
+ async function getConfiguration() {
+ const configDetails = await axios.get(`/api/config`, {
+ headers: {
+ Authorization: `Bearer ${token}`,
+ },
+ })
+ configDetails.data.result.map((item) => {
+ setCopyright(item?.copyrightMessage)
+
+ })
+ }
+ getConfiguration()
+ }, [])
+
+ async function handelChange(e) {
+
+
+ setCopyright(e.target.value)
+ }
+ async function handelSubmit() {
+ setLoading(true)
+
+ let res = await axios.post(`/api/config/copyright/message`, { copyright }, {
+ headers: {
+ Authorization: `Bearer ${token}`,
+ },
+ })
+
+ if (res) {
+ setLoading(false)
+ console.log(res)
+ swal('Success!', res.data.message, res.data.status)
+ }
+ }
+ return (
+
+
+
+
+
+
+
+
+
+
+
+ Copyright Message
+
+
+
+
+
+ {/* */}
+
+
+
+
+
+ {/* */}
+
+ {/* */}
+
+
+ )
+}
+
+export default CopyrightMessage
|