更新为Jingrow
This commit is contained in:
parent
0a5fbc26c5
commit
0b47780f86
@ -106,7 +106,7 @@ const reload = defineModel('reload')
|
|||||||
const emit = defineEmits(['scroll'])
|
const emit = defineEmits(['scroll'])
|
||||||
|
|
||||||
const { getUser } = usersStore()
|
const { getUser } = usersStore()
|
||||||
const { updateOnboardingStep } = useOnboarding('frappecrm')
|
const { updateOnboardingStep } = useOnboarding('jingrowcrm')
|
||||||
|
|
||||||
const showEmailBox = ref(false)
|
const showEmailBox = ref(false)
|
||||||
const showCommentBox = ref(false)
|
const showCommentBox = ref(false)
|
||||||
|
|||||||
@ -310,7 +310,7 @@ function getIcon(routeName, icon) {
|
|||||||
// onboarding
|
// onboarding
|
||||||
const { user } = sessionStore()
|
const { user } = sessionStore()
|
||||||
const { users, isManager } = usersStore()
|
const { users, isManager } = usersStore()
|
||||||
const { isOnboardingStepsCompleted, setUp } = useOnboarding('frappecrm')
|
const { isOnboardingStepsCompleted, setUp } = useOnboarding('jingrowcrm')
|
||||||
|
|
||||||
async function getFirstLead() {
|
async function getFirstLead() {
|
||||||
let firstLead = localStorage.getItem('firstLead' + user)
|
let firstLead = localStorage.getItem('firstLead' + user)
|
||||||
|
|||||||
@ -65,7 +65,7 @@ let links = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: __('Telegram Channel'),
|
label: __('Telegram Channel'),
|
||||||
url: 'https://t.me/frappecrm',
|
url: 'https://t.me/jingrowcrm',
|
||||||
icon: TelegramIcon,
|
icon: TelegramIcon,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -64,7 +64,7 @@ import { ref, watch } from 'vue'
|
|||||||
const show = defineModel()
|
const show = defineModel()
|
||||||
|
|
||||||
const { getUser } = usersStore()
|
const { getUser } = usersStore()
|
||||||
const { updateOnboardingStep } = useOnboarding('frappecrm')
|
const { updateOnboardingStep } = useOnboarding('jingrowcrm')
|
||||||
|
|
||||||
const newPassword = ref('')
|
const newPassword = ref('')
|
||||||
const confirmPassword = ref('')
|
const confirmPassword = ref('')
|
||||||
|
|||||||
@ -117,7 +117,7 @@ const router = useRouter()
|
|||||||
const { statusOptions, getDealStatus } = statusesStore()
|
const { statusOptions, getDealStatus } = statusesStore()
|
||||||
const { isManager } = usersStore()
|
const { isManager } = usersStore()
|
||||||
const { user } = sessionStore()
|
const { user } = sessionStore()
|
||||||
const { updateOnboardingStep } = useOnboarding('frappecrm')
|
const { updateOnboardingStep } = useOnboarding('jingrowcrm')
|
||||||
|
|
||||||
const existingContactChecked = ref(false)
|
const existingContactChecked = ref(false)
|
||||||
const existingOrganizationChecked = ref(false)
|
const existingOrganizationChecked = ref(false)
|
||||||
|
|||||||
@ -66,7 +66,7 @@ const props = defineProps({
|
|||||||
const { user } = sessionStore()
|
const { user } = sessionStore()
|
||||||
const { getUser, isManager } = usersStore()
|
const { getUser, isManager } = usersStore()
|
||||||
const { getLeadStatus, statusOptions } = statusesStore()
|
const { getLeadStatus, statusOptions } = statusesStore()
|
||||||
const { updateOnboardingStep } = useOnboarding('frappecrm')
|
const { updateOnboardingStep } = useOnboarding('jingrowcrm')
|
||||||
|
|
||||||
const show = defineModel()
|
const show = defineModel()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|||||||
@ -88,7 +88,7 @@ const emit = defineEmits(['after'])
|
|||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
const { updateOnboardingStep } = useOnboarding('frappecrm')
|
const { updateOnboardingStep } = useOnboarding('jingrowcrm')
|
||||||
|
|
||||||
const error = ref(null)
|
const error = ref(null)
|
||||||
const title = ref(null)
|
const title = ref(null)
|
||||||
|
|||||||
@ -146,7 +146,7 @@ const emit = defineEmits(['updateTask', 'after'])
|
|||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const { users, getUser } = usersStore()
|
const { users, getUser } = usersStore()
|
||||||
const { updateOnboardingStep } = useOnboarding('frappecrm')
|
const { updateOnboardingStep } = useOnboarding('jingrowcrm')
|
||||||
|
|
||||||
const error = ref(null)
|
const error = ref(null)
|
||||||
const title = ref(null)
|
const title = ref(null)
|
||||||
|
|||||||
@ -101,7 +101,7 @@ import { createListResource, createResource, FormControl } from 'jingrow-ui'
|
|||||||
import { useOnboarding } from 'jingrow-ui/jingrow'
|
import { useOnboarding } from 'jingrow-ui/jingrow'
|
||||||
import { ref, computed } from 'vue'
|
import { ref, computed } from 'vue'
|
||||||
|
|
||||||
const { updateOnboardingStep } = useOnboarding('frappecrm')
|
const { updateOnboardingStep } = useOnboarding('jingrowcrm')
|
||||||
const { users, isAdmin, isManager } = usersStore()
|
const { users, isAdmin, isManager } = usersStore()
|
||||||
|
|
||||||
const invitees = ref([])
|
const invitees = ref([])
|
||||||
|
|||||||
@ -6,7 +6,7 @@ const LogoSendgrid = '/images/sendgrid.png'
|
|||||||
const LogoSparkpost = '/images/sparkpost.webp'
|
const LogoSparkpost = '/images/sparkpost.webp'
|
||||||
const LogoYahoo = '/images/yahoo.png'
|
const LogoYahoo = '/images/yahoo.png'
|
||||||
const LogoYandex = '/images/yandex.png'
|
const LogoYandex = '/images/yandex.png'
|
||||||
const LogoFrappeMail = '/images/jingrow-mail.svg'
|
const LogoJingrowMail = '/images/jingrow-mail.svg'
|
||||||
|
|
||||||
const fixedFields = [
|
const fixedFields = [
|
||||||
{
|
{
|
||||||
@ -74,7 +74,7 @@ export const customProviderFields = [
|
|||||||
label: 'Jingrow Mail Site',
|
label: 'Jingrow Mail Site',
|
||||||
name: 'jingrow_mail_site',
|
name: 'jingrow_mail_site',
|
||||||
type: 'text',
|
type: 'text',
|
||||||
placeholder: 'https://frappemail.com',
|
placeholder: 'https://jingrowmail.com',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'API Key',
|
label: 'API Key',
|
||||||
@ -141,7 +141,7 @@ export const services = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Jingrow Mail',
|
name: 'Jingrow Mail',
|
||||||
icon: LogoFrappeMail,
|
icon: LogoJingrowMail,
|
||||||
info: __(
|
info: __(
|
||||||
`Setting up Jingrow Mail requires you to have an API key and API Secret of your email account. Read more `,
|
`Setting up Jingrow Mail requires you to have an API key and API Secret of your email account. Read more `,
|
||||||
),
|
),
|
||||||
@ -157,7 +157,7 @@ export const emailIcon = {
|
|||||||
SparkPost: LogoSparkpost,
|
SparkPost: LogoSparkpost,
|
||||||
Yahoo: LogoYahoo,
|
Yahoo: LogoYahoo,
|
||||||
Yandex: LogoYandex,
|
Yandex: LogoYandex,
|
||||||
'Jingrow Mail': LogoFrappeMail,
|
'Jingrow Mail': LogoJingrowMail,
|
||||||
}
|
}
|
||||||
|
|
||||||
export function validateInputs(state, isCustom) {
|
export function validateInputs(state, isCustom) {
|
||||||
|
|||||||
@ -50,14 +50,14 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import BrandLogo from '@/components/BrandLogo.vue'
|
import BrandLogo from '@/components/BrandLogo.vue'
|
||||||
import FrappeCloudIcon from '@/components/Icons/FrappeCloudIcon.vue'
|
import JingrowCloudIcon from '@/components/Icons/JingrowCloudIcon.vue'
|
||||||
import Apps from '@/components/Apps.vue'
|
import Apps from '@/components/Apps.vue'
|
||||||
import { sessionStore } from '@/stores/session'
|
import { sessionStore } from '@/stores/session'
|
||||||
import { usersStore } from '@/stores/users'
|
import { usersStore } from '@/stores/users'
|
||||||
import { getSettings } from '@/stores/settings'
|
import { getSettings } from '@/stores/settings'
|
||||||
import { showSettings, isMobileView } from '@/composables/settings'
|
import { showSettings, isMobileView } from '@/composables/settings'
|
||||||
import { showAboutModal } from '@/composables/modals'
|
import { showAboutModal } from '@/composables/modals'
|
||||||
import { confirmLoginToFrappeCloud } from '@/composables/jingrowcloud'
|
import { confirmLoginToJingrowCloud } from '@/composables/jingrowcloud'
|
||||||
import { Dropdown } from 'jingrow-ui'
|
import { Dropdown } from 'jingrow-ui'
|
||||||
import { theme, toggleTheme } from '@/stores/theme'
|
import { theme, toggleTheme } from '@/stores/theme'
|
||||||
import { computed, h, markRaw } from 'vue'
|
import { computed, h, markRaw } from 'vue'
|
||||||
@ -147,9 +147,9 @@ function getStandardItem(item) {
|
|||||||
}
|
}
|
||||||
case 'login_to_fc':
|
case 'login_to_fc':
|
||||||
return {
|
return {
|
||||||
icon: h(FrappeCloudIcon),
|
icon: h(JingrowCloudIcon),
|
||||||
label: __(item.label),
|
label: __(item.label),
|
||||||
onClick: () => confirmLoginToFrappeCloud(),
|
onClick: () => confirmLoginToJingrowCloud(),
|
||||||
condition: () => !isMobileView.value && window.is_fc_site,
|
condition: () => !isMobileView.value && window.is_fc_site,
|
||||||
}
|
}
|
||||||
case 'about':
|
case 'about':
|
||||||
|
|||||||
@ -14,7 +14,7 @@ export const currentSiteInfo = createResource({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
export const confirmLoginToFrappeCloud = () => {
|
export const confirmLoginToJingrowCloud = () => {
|
||||||
currentSiteInfo.fetch()
|
currentSiteInfo.fetch()
|
||||||
|
|
||||||
const { $dialog } = globalStore()
|
const { $dialog } = globalStore()
|
||||||
@ -29,7 +29,7 @@ export const confirmLoginToFrappeCloud = () => {
|
|||||||
label: __('Confirm'),
|
label: __('Confirm'),
|
||||||
variant: 'solid',
|
variant: 'solid',
|
||||||
onClick(close) {
|
onClick(close) {
|
||||||
loginToFrappeCloud()
|
loginToJingrowCloud()
|
||||||
close()
|
close()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -37,7 +37,7 @@ export const confirmLoginToFrappeCloud = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const loginToFrappeCloud = () => {
|
const loginToJingrowCloud = () => {
|
||||||
window.open(
|
window.open(
|
||||||
`${baseEndpoint.value}/dashboard/sites/${siteName.value}`,
|
`${baseEndpoint.value}/dashboard/sites/${siteName.value}`,
|
||||||
'_blank',
|
'_blank',
|
||||||
|
|||||||
@ -383,7 +383,7 @@ const { statusOptions, getDealStatus } = statusesStore()
|
|||||||
const { doctypeMeta } = getMeta('CRM Deal')
|
const { doctypeMeta } = getMeta('CRM Deal')
|
||||||
|
|
||||||
const { updateOnboardingStep, isOnboardingStepsCompleted } =
|
const { updateOnboardingStep, isOnboardingStepsCompleted } =
|
||||||
useOnboarding('frappecrm')
|
useOnboarding('jingrowcrm')
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import frappeUIPreset from 'jingrow-ui/src/tailwind/preset'
|
import jingrowUIPreset from 'jingrow-ui/src/tailwind/preset'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
presets: [frappeUIPreset],
|
presets: [jingrowUIPreset],
|
||||||
content: [
|
content: [
|
||||||
'./index.html',
|
'./index.html',
|
||||||
'./src/**/*.{vue,js,ts,jsx,tsx}',
|
'./src/**/*.{vue,js,ts,jsx,tsx}',
|
||||||
|
|||||||
@ -8,12 +8,12 @@ import { VitePWA } from 'vite-plugin-pwa'
|
|||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig(async ({ mode }) => {
|
export default defineConfig(async ({ mode }) => {
|
||||||
const isDev = mode === 'development'
|
const isDev = mode === 'development'
|
||||||
const jingrowui = await importFrappeUIPlugin(isDev)
|
const jingrowui = await importJingrowUIPlugin(isDev)
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
plugins: [
|
plugins: [
|
||||||
jingrowui({
|
jingrowui({
|
||||||
frappeProxy: true,
|
jingrowProxy: true,
|
||||||
lucideIcons: true,
|
lucideIcons: true,
|
||||||
jinjaBootData: true,
|
jinjaBootData: true,
|
||||||
buildConfig: {
|
buildConfig: {
|
||||||
@ -88,9 +88,9 @@ export default defineConfig(async ({ mode }) => {
|
|||||||
try {
|
try {
|
||||||
// Check if the local jingrow-ui directory exists
|
// Check if the local jingrow-ui directory exists
|
||||||
const fs = await import('node:fs')
|
const fs = await import('node:fs')
|
||||||
const localFrappeUIPath = path.resolve(__dirname, '../jingrow-ui')
|
const localJingrowUIPath = path.resolve(__dirname, '../jingrow-ui')
|
||||||
if (fs.existsSync(localFrappeUIPath)) {
|
if (fs.existsSync(localJingrowUIPath)) {
|
||||||
config.resolve.alias['jingrow-ui'] = localFrappeUIPath
|
config.resolve.alias['jingrow-ui'] = localJingrowUIPath
|
||||||
} else {
|
} else {
|
||||||
console.warn('Local jingrow-ui directory not found, using npm package')
|
console.warn('Local jingrow-ui directory not found, using npm package')
|
||||||
}
|
}
|
||||||
@ -105,7 +105,7 @@ export default defineConfig(async ({ mode }) => {
|
|||||||
return config
|
return config
|
||||||
})
|
})
|
||||||
|
|
||||||
async function importFrappeUIPlugin(isDev) {
|
async function importJingrowUIPlugin(isDev) {
|
||||||
if (isDev) {
|
if (isDev) {
|
||||||
try {
|
try {
|
||||||
const module = await import('../jingrow-ui/vite')
|
const module = await import('../jingrow-ui/vite')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user