feat: UI improvements - default to customers tab, refresh button, installed extensions first
This commit is contained in:
@@ -215,6 +215,9 @@ function CustomerDetail({ customerId }) {
|
|||||||
const installedNames = new Set(exts.filter(e => e.installed_version).map(e => e.name))
|
const installedNames = new Set(exts.filter(e => e.installed_version).map(e => e.name))
|
||||||
|
|
||||||
const sorted = [...exts].sort((a, b) => {
|
const sorted = [...exts].sort((a, b) => {
|
||||||
|
const aInstalled = a.installed_version ? 0 : 1
|
||||||
|
const bInstalled = b.installed_version ? 0 : 1
|
||||||
|
if (aInstalled !== bInstalled) return aInstalled - bInstalled
|
||||||
const ia = order.indexOf(a.name)
|
const ia = order.indexOf(a.name)
|
||||||
const ib = order.indexOf(b.name)
|
const ib = order.indexOf(b.name)
|
||||||
return (ia === -1 ? 999 : ia) - (ib === -1 ? 999 : ib)
|
return (ia === -1 ? 999 : ia) - (ib === -1 ? 999 : ib)
|
||||||
@@ -308,6 +311,11 @@ function CustomerDetail({ customerId }) {
|
|||||||
<h3 className="text-xl font-black text-slate-900">{customer.name}</h3>
|
<h3 className="text-xl font-black text-slate-900">{customer.name}</h3>
|
||||||
<p className="text-sm text-slate-500" dir="ltr">{customer.espocrm_url}</p>
|
<p className="text-sm text-slate-500" dir="ltr">{customer.espocrm_url}</p>
|
||||||
</div>
|
</div>
|
||||||
|
<button onClick={() => reload()}
|
||||||
|
className="p-2 text-slate-400 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-all"
|
||||||
|
title="רענון הרחבות">
|
||||||
|
<Icon name="refresh" className="text-lg" />
|
||||||
|
</button>
|
||||||
<button onClick={() => setEditing(true)}
|
<button onClick={() => setEditing(true)}
|
||||||
className="p-2 text-slate-400 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-all"
|
className="p-2 text-slate-400 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-all"
|
||||||
title="עריכת לקוח">
|
title="עריכת לקוח">
|
||||||
@@ -516,7 +524,7 @@ function Loader() {
|
|||||||
|
|
||||||
// --- Main App ---
|
// --- Main App ---
|
||||||
export default function App() {
|
export default function App() {
|
||||||
const [tab, setTab] = useState('extensions')
|
const [tab, setTab] = useState('customers')
|
||||||
const tabs = [
|
const tabs = [
|
||||||
{ id: 'extensions', label: 'הרחבות', icon: 'extension' },
|
{ id: 'extensions', label: 'הרחבות', icon: 'extension' },
|
||||||
{ id: 'customers', label: 'לקוחות', icon: 'group' },
|
{ id: 'customers', label: 'לקוחות', icon: 'group' },
|
||||||
|
|||||||
Reference in New Issue
Block a user